Documentation ¶
Index ¶
- Constants
- type ControllerMetrics
- func (im *ControllerMetrics) DeleteIngress(ingKey string)
- func (im *ControllerMetrics) DeleteL4ILBDualStackService(svcKey string)
- func (im *ControllerMetrics) DeleteL4ILBService(svcKey string)
- func (im *ControllerMetrics) DeleteL4NetLBDualStackService(svcKey string)
- func (im *ControllerMetrics) DeleteL4NetLBService(svcKey string)
- func (im *ControllerMetrics) DeleteNegService(svcKey string)
- func (im *ControllerMetrics) DeleteService(serviceKey string)
- func (im *ControllerMetrics) DeleteServiceAttachment(saKey string)
- func (im *ControllerMetrics) Run(stopCh <-chan struct{})
- func (im *ControllerMetrics) SetIngress(ingKey string, ing IngressState)
- func (im *ControllerMetrics) SetL4ILBDualStackService(svcKey string, state L4DualStackServiceState)
- func (im *ControllerMetrics) SetL4ILBService(svcKey string, state L4ILBServiceState)
- func (im *ControllerMetrics) SetL4NetLBDualStackService(svcKey string, state L4DualStackServiceState)
- func (im *ControllerMetrics) SetL4NetLBService(svcKey string, state L4NetLBServiceState)
- func (im *ControllerMetrics) SetNegService(svcKey string, negState NegServiceState)
- func (im *ControllerMetrics) SetService(serviceKey string)
- func (im *ControllerMetrics) SetServiceAttachment(saKey string, state pscmetrics.PSCState)
- type IngressMetricsCollector
- type IngressState
- type L4DualStackServiceLabels
- type L4DualStackServiceState
- type L4DualStackServiceStatus
- type L4ILBMetricsCollector
- type L4ILBServiceState
- type L4NetLBServiceState
- type NegMetricsCollector
- type NegServiceState
- type VmIpNegType
Constants ¶
const ( // StaticGlobalIPNameKey tells the Ingress controller to use a specific GCE // static ip for its forwarding rules. If specified, the Ingress controller // assigns the static ip by this name to the forwarding rules of the given // Ingress. The controller *does not* manage this ip, it is the users // responsibility to create/delete it. StaticGlobalIPNameKey = "kubernetes.io/ingress.global-static-ip-name" // SSLCertKey is the annotation key used by controller to record GCP ssl cert. SSLCertKey = "ingress.kubernetes.io/ssl-cert" )
const GLBC_NAMESPACE = "glbc"
const StatusError = L4DualStackServiceStatus("Error")
const StatusPersistentError = L4DualStackServiceStatus("PersistentError")
const StatusSuccess = L4DualStackServiceStatus("Success")
const StatusUserError = L4DualStackServiceStatus("UserError")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerMetrics ¶ added in v1.8.2
type ControllerMetrics struct { //TODO(kl52752) remove mutex and change map to sync.map sync.Mutex // contains filtered or unexported fields }
ControllerMetrics contains the state of the all ingresses.
func FakeControllerMetrics ¶ added in v1.17.0
func FakeControllerMetrics() *ControllerMetrics
FakeControllerMetrics creates new ControllerMetrics with fixed 10 minutes metricsInterval, to be used in tests
func NewControllerMetrics ¶ added in v1.8.2
func NewControllerMetrics(exportInterval, l4NetLBProvisionDeadline time.Duration) *ControllerMetrics
NewControllerMetrics initializes ControllerMetrics and starts a go routine to compute and export metrics periodically.
func (*ControllerMetrics) DeleteIngress ¶ added in v1.8.2
func (im *ControllerMetrics) DeleteIngress(ingKey string)
DeleteIngress implements IngressMetricsCollector.
func (*ControllerMetrics) DeleteL4ILBDualStackService ¶ added in v1.21.0
func (im *ControllerMetrics) DeleteL4ILBDualStackService(svcKey string)
DeleteL4ILBDualStackService implements L4ILBMetricsCollector.
func (*ControllerMetrics) DeleteL4ILBService ¶ added in v1.9.0
func (im *ControllerMetrics) DeleteL4ILBService(svcKey string)
DeleteL4ILBService implements L4ILBMetricsCollector.
func (*ControllerMetrics) DeleteL4NetLBDualStackService ¶ added in v1.22.0
func (im *ControllerMetrics) DeleteL4NetLBDualStackService(svcKey string)
DeleteL4NetLBDualStackService implements L4NetLBMetricsCollector.
func (*ControllerMetrics) DeleteL4NetLBService ¶ added in v1.16.0
func (im *ControllerMetrics) DeleteL4NetLBService(svcKey string)
DeleteL4NetLBService deletes service from metrics map.
func (*ControllerMetrics) DeleteNegService ¶ added in v1.8.2
func (im *ControllerMetrics) DeleteNegService(svcKey string)
DeleteNegService implements NegMetricsCollector.
func (*ControllerMetrics) DeleteService ¶ added in v1.13.0
func (im *ControllerMetrics) DeleteService(serviceKey string)
DeleteService removes the service from the map to be counted during metrics computation. DeleteService implements PSCMetricsCollector.
func (*ControllerMetrics) DeleteServiceAttachment ¶ added in v1.11.2
func (im *ControllerMetrics) DeleteServiceAttachment(saKey string)
DeleteServiceAttachment removes sa state to the map to be counted during metrics computation. DeleteServiceAttachment implements PSCMetricsCollector.
func (*ControllerMetrics) Run ¶ added in v1.8.2
func (im *ControllerMetrics) Run(stopCh <-chan struct{})
func (*ControllerMetrics) SetIngress ¶ added in v1.8.2
func (im *ControllerMetrics) SetIngress(ingKey string, ing IngressState)
SetIngress implements IngressMetricsCollector.
func (*ControllerMetrics) SetL4ILBDualStackService ¶ added in v1.21.0
func (im *ControllerMetrics) SetL4ILBDualStackService(svcKey string, state L4DualStackServiceState)
SetL4ILBDualStackService implements L4ILBMetricsCollector.
func (*ControllerMetrics) SetL4ILBService ¶ added in v1.9.0
func (im *ControllerMetrics) SetL4ILBService(svcKey string, state L4ILBServiceState)
SetL4ILBService implements L4ILBMetricsCollector.
func (*ControllerMetrics) SetL4NetLBDualStackService ¶ added in v1.22.0
func (im *ControllerMetrics) SetL4NetLBDualStackService(svcKey string, state L4DualStackServiceState)
SetL4NetLBDualStackService implements L4NetLBMetricsCollector.
func (*ControllerMetrics) SetL4NetLBService ¶ added in v1.16.0
func (im *ControllerMetrics) SetL4NetLBService(svcKey string, state L4NetLBServiceState)
SetL4NetLBService adds metric state for given service to map.
func (*ControllerMetrics) SetNegService ¶ added in v1.8.2
func (im *ControllerMetrics) SetNegService(svcKey string, negState NegServiceState)
SetNegService implements NegMetricsCollector.
func (*ControllerMetrics) SetService ¶ added in v1.13.0
func (im *ControllerMetrics) SetService(serviceKey string)
SetService adds the service to the map to be counted during metrics computation. SetService implements PSCMetricsCollector.
func (*ControllerMetrics) SetServiceAttachment ¶ added in v1.11.2
func (im *ControllerMetrics) SetServiceAttachment(saKey string, state pscmetrics.PSCState)
SetServiceAttachment adds sa state to the map to be counted during metrics computation. SetServiceAttachment implements PSCMetricsCollector.
type IngressMetricsCollector ¶ added in v1.8.2
type IngressMetricsCollector interface { // SetIngress adds/updates ingress state for given ingress key. SetIngress(ingKey string, ing IngressState) // DeleteIngress removes the given ingress key. DeleteIngress(ingKey string) }
IngressMetricsCollector is an interface to update/delete ingress states in the cache that is used for computing ingress usage metrics.
type IngressState ¶ added in v1.8.2
type IngressState struct {
// contains filtered or unexported fields
}
IngressState defines an ingress and its associated service ports.
func NewIngressState ¶ added in v1.8.2
func NewIngressState(ing *v1.Ingress, fc *frontendconfigv1beta1.FrontendConfig, svcPorts []utils.ServicePort) IngressState
NewIngressState returns ingress state for given ingress and service ports.
type L4DualStackServiceLabels ¶ added in v1.22.0
type L4DualStackServiceLabels struct { // IPFamilies stores spec.ipFamilies of Service IPFamilies string // IPFamilyPolicy specifies spec.IPFamilyPolicy of Service IPFamilyPolicy string // Status specifies status of L4 DualStack Service Status L4DualStackServiceStatus }
L4DualStackServiceLabels defines ipFamilies, ipFamilyPolicy and status of L4 DualStack service
type L4DualStackServiceState ¶ added in v1.22.0
type L4DualStackServiceState struct { L4DualStackServiceLabels // FirstSyncErrorTime specifies the time timestamp when the service sync ended up with error for the first time. FirstSyncErrorTime *time.Time }
L4DualStackServiceState defines ipFamilies, ipFamilyPolicy, status and tracks FirstSyncErrorTime of L4 DualStack service
func InitServiceDualStackMetricsState ¶ added in v1.22.0
func InitServiceDualStackMetricsState(svc *corev1.Service, startTime *time.Time) L4DualStackServiceState
type L4DualStackServiceStatus ¶ added in v1.22.0
type L4DualStackServiceStatus string
type L4ILBMetricsCollector ¶ added in v1.9.0
type L4ILBMetricsCollector interface { // SetL4ILBService adds/updates L4 ILB service state for given service key. SetL4ILBService(svcKey string, state L4ILBServiceState) // DeleteL4ILBService removes the given L4 ILB service key. DeleteL4ILBService(svcKey string) }
L4ILBMetricsCollector is an interface to update/delete L4 ILb service states in the cache that is used for computing L4 ILB usage metrics.
type L4ILBServiceState ¶ added in v1.9.0
type L4ILBServiceState struct { // EnabledGlobalAccess specifies if Global Access is enabled. EnabledGlobalAccess bool // EnabledCustomSubNet specifies if Custom Subnet is enabled. EnabledCustomSubnet bool // InSuccess specifies if the ILB service VIP is configured. InSuccess bool // IsUserError specifies if the error was caused by User misconfiguration. IsUserError bool }
L4ILBServiceState defines if global access and subnet features are enabled for an L4 ILB service.
type L4NetLBServiceState ¶ added in v1.16.0
type L4NetLBServiceState struct { // IsManagedIP specifies if Static IP is managed by controller. IsManagedIP bool // IsPremiumTier specifies if network tier for forwarding rule is premium. IsPremiumTier bool // InSuccess specifies if the NetLB service VIP is configured. InSuccess bool // IsUserError specifies if the error was caused by User misconfiguration. IsUserError bool // FirstSyncErrorTime specifies the time timestamp when the service sync ended up with error for the first time. FirstSyncErrorTime *time.Time }
L4NetLBServiceState defines if network tier is premium and if static ip address is managed by controller for an L4 NetLB service.
func InitL4NetLBServiceState ¶ added in v1.17.1
func InitL4NetLBServiceState(syncTime *time.Time) L4NetLBServiceState
InitL4NetLBServiceState sets FirstSyncErrorTime
type NegMetricsCollector ¶ added in v1.8.2
type NegMetricsCollector interface { // SetNegService adds/updates neg state for given service key. SetNegService(svcKey string, negState NegServiceState) // DeleteNegService removes the given service key. DeleteNegService(svcKey string) }
NegMetricsCollector is an interface to update/delete Neg states in the cache that is used for computing neg usage metrics.
type NegServiceState ¶ added in v1.8.2
type NegServiceState struct { // standaloneNeg is the count of standalone NEG StandaloneNeg int // ingressNeg is the count of NEGs created for ingress IngressNeg int // asmNeg is the count of NEGs created for ASM AsmNeg int // VmIpNeg specifies if a service uses GCE_VM_IP NEG. VmIpNeg *VmIpNegType // CustomNamedNeg is the count of standalone negs with custom names CustomNamedNeg int // SuccessfulNeg is the count of successful NEG syncer creations SuccessfulNeg int // SuccessfulNeg is the count of errors in NEG syncer creations ErrorNeg int }
NegServiceState contains all the neg usage associated with one service
type VmIpNegType ¶ added in v1.9.4
type VmIpNegType struct {
// contains filtered or unexported fields
}
VmIpNegType contains whether a GCE_VM_IP NEG is requesting for local traffic (or service external policy set to local).
func NewVmIpNegType ¶ added in v1.9.4
func NewVmIpNegType(trafficPolicyLocal bool) *VmIpNegType
NewVmIpNegType returns a new VmIpNegType.