features

package
v1.18.0-pre.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"enabled-features",
	"Exports prometheus metrics describing which features are enabled in cilium-agent",

	cell.Invoke(updateAgentConfigMetricOnStart),
	cell.Provide(
		func(m Metrics) featureMetrics {
			return m
		},
		func(m Metrics) api.PolicyMetrics {
			return m
		},
		func(m Metrics) redirectpolicy.LRPMetrics {
			return m
		},
		func(m Metrics) k8s.SVCMetrics {
			return m
		},
		func(m Metrics) ciliumenvoyconfig.CECMetrics {
			return m
		},
		func(m Metrics) k8s2.CNPMetrics {
			return m
		},
		func(m Metrics) clustermesh.ClusterMeshMetrics {
			return m
		},
	),
	metrics.Metric(func() Metrics {
		if withDefaults != "" {
			return NewMetrics(true)
		}
		return NewMetrics(false)
	}),
)

Cell will retrieve information from all other cells / configuration to describe, in form of prometheus metrics, which features are enabled on the agent.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	CPIPAM                        metric.Vec[metric.Gauge]
	CPIdentityAllocation          metric.Vec[metric.Gauge]
	CPCiliumEndpointSlicesEnabled metric.Gauge

	DPMode         metric.Vec[metric.Gauge]
	DPChaining     metric.Vec[metric.Gauge]
	DPIP           metric.Vec[metric.Gauge]
	DPDeviceConfig metric.Vec[metric.Gauge]

	NPHostFirewallEnabled        metric.Gauge
	NPLocalRedirectPolicyEnabled metric.Gauge
	NPMutualAuthEnabled          metric.Gauge
	NPNonDefaultDenyEnabled      metric.Gauge
	NPCIDRPoliciesToNodes        metric.Vec[metric.Gauge]

	ACLBTransparentEncryption        metric.Vec[metric.Gauge]
	ACLBKubeProxyReplacementEnabled  metric.Gauge
	ACLBNodePortConfig               metric.Vec[metric.Gauge]
	ACLBBGPEnabled                   metric.Gauge
	ACLBEgressGatewayEnabled         metric.Gauge
	ACLBBandwidthManagerEnabled      metric.Gauge
	ACLBSCTPEnabled                  metric.Gauge
	ACLBInternalTrafficPolicyEnabled metric.Gauge
	ACLBVTEPEnabled                  metric.Gauge
	ACLBCiliumEnvoyConfigEnabled     metric.Gauge
	ACLBBigTCPEnabled                metric.Vec[metric.Gauge]
	ACLBL2LBEnabled                  metric.Gauge
	ACLBL2PodAnnouncementEnabled     metric.Gauge
	ACLBExternalEnvoyProxyEnabled    metric.Vec[metric.Gauge]
	ACLBCiliumNodeConfigEnabled      metric.Gauge

	NPL3Ingested                metric.Vec[metric.Counter]
	NPHostNPIngested            metric.Vec[metric.Counter]
	NPDNSIngested               metric.Vec[metric.Counter]
	NPToFQDNsIngested           metric.Vec[metric.Counter]
	NPHTTPIngested              metric.Vec[metric.Counter]
	NPHTTPHeaderMatchesIngested metric.Vec[metric.Counter]
	NPOtherL7Ingested           metric.Vec[metric.Counter]
	NPDenyPoliciesIngested      metric.Vec[metric.Counter]
	NPIngressCIDRGroupIngested  metric.Vec[metric.Counter]
	NPMutualAuthIngested        metric.Vec[metric.Counter]
	NPTLSInspectionIngested     metric.Vec[metric.Counter]
	NPSNIAllowListIngested      metric.Vec[metric.Counter]
	NPNonDefaultDenyIngested    metric.Vec[metric.Counter]
	NPLRPIngested               metric.Vec[metric.Counter]
	NPCNPIngested               metric.Vec[metric.Counter]
	NPCCNPIngested              metric.Vec[metric.Counter]

	ACLBInternalTrafficPolicyIngested        metric.Vec[metric.Counter]
	ACLBCiliumEnvoyConfigIngested            metric.Vec[metric.Counter]
	ACLBCiliumClusterwideEnvoyConfigIngested metric.Vec[metric.Counter]

	ACLBClusterMeshEnabled metric.Vec[metric.Gauge]
}

Metrics represents a collection of metrics related to a specific feature. Each field is named according to the specific feature that it tracks.

func NewMetrics

func NewMetrics(withDefaults bool) Metrics

NewMetrics returns all feature metrics. If 'withDefaults' is set, then all metrics will have defined all of their possible values.

func (Metrics) AddCCEC

func (m Metrics) AddCCEC(_ *v2.CiliumEnvoyConfigSpec)

func (Metrics) AddCCNP

func (m Metrics) AddCCNP(_ *v2.CiliumNetworkPolicy)

func (Metrics) AddCEC

func (m Metrics) AddCEC(_ *v2.CiliumEnvoyConfigSpec)

func (Metrics) AddCNP

func (m Metrics) AddCNP(_ *v2.CiliumNetworkPolicy)

func (Metrics) AddClusterMeshConfig

func (m Metrics) AddClusterMeshConfig(clusterMeshMode string, maxConnectedClusters string)

func (Metrics) AddLRPConfig

func (m Metrics) AddLRPConfig(_ *redirectpolicy.LRPConfig)

func (Metrics) AddRule

func (m Metrics) AddRule(r api.Rule)

func (Metrics) AddService

func (m Metrics) AddService(svc *k8s.Service)

func (Metrics) DelCCEC

func (m Metrics) DelCCEC(_ *v2.CiliumEnvoyConfigSpec)

func (Metrics) DelCCNP

func (m Metrics) DelCCNP(_ *v2.CiliumNetworkPolicy)

func (Metrics) DelCEC

func (m Metrics) DelCEC(_ *v2.CiliumEnvoyConfigSpec)

func (Metrics) DelCNP

func (m Metrics) DelCNP(_ *v2.CiliumNetworkPolicy)

func (Metrics) DelClusterMeshConfig

func (m Metrics) DelClusterMeshConfig(clusterMeshMode string, maxConnectedClusters string)

func (Metrics) DelLRPConfig

func (m Metrics) DelLRPConfig(_ *redirectpolicy.LRPConfig)

func (Metrics) DelRule

func (m Metrics) DelRule(r api.Rule)

func (Metrics) DelService

func (m Metrics) DelService(svc *k8s.Service)

type RuleFeatures

type RuleFeatures struct {
	L3                bool
	Host              bool
	DNS               bool
	HTTP              bool
	HTTPHeaderMatches bool
	OtherL7           bool
	Deny              bool
	IngressCIDRGroup  bool
	MutualAuth        bool
	TLSInspection     bool
	SNIAllowList      bool
	NonDefaultDeny    bool
	ToFQDNs           bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL