metadata

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KumaMeshAnnotation defines a Pod annotation that
	// associates a given Pod with a particular Mesh.
	// Annotation value must be the name of a Mesh resource.
	KumaMeshAnnotation = "kuma.io/mesh"

	// KumaSidecarInjectionAnnotation defines a Pod/Namespace annotation that
	// gives users an ability to enable or disable sidecar-injection
	KumaSidecarInjectionAnnotation = "kuma.io/sidecar-injection"

	// KumaGatewayAnnotation allows to mark Gateway pod,
	// inbound listeners won't be generated in that case.
	// It can be used to mark a pod as providing a builtin gateway.
	KumaGatewayAnnotation = "kuma.io/gateway"

	// KumaIngressAnnotation allows to mark pod with Kuma Ingress
	// which is crucial for Multizone communication
	KumaIngressAnnotation = "kuma.io/ingress"

	// KumaEgressAnnotation allows marking pod with Kuma Egress
	// which is crucial for Multizone communication
	KumaEgressAnnotation = "kuma.io/egress"

	// KumaTagsAnnotation holds a JSON representation of desired tags
	KumaTagsAnnotation = "kuma.io/tags"

	// KumaIngressPublicAddressAnnotation allows to pick public address for Ingress
	// If not defined, Kuma will try to pick this address from the Ingress Service
	KumaIngressPublicAddressAnnotation = "kuma.io/ingress-public-address"

	// KumaIngressPublicPortAnnotation allows to pick public port for Ingress
	// If not defined, Kuma will try to pick this address from the Ingress Service
	KumaIngressPublicPortAnnotation = "kuma.io/ingress-public-port"

	// KumaDirectAccess defines a comma-separated list of Services that will be accessed directly
	KumaDirectAccess = "kuma.io/direct-access-services"

	// KumaVirtualProbesAnnotation enables automatic converting HttpGet probes to virtual. Virtual probe
	// serves on sub-path of insecure port defined in 'KumaVirtualProbesPortAnnotation',
	// i.e :8080/health/readiness -> :9000/8080/health/readiness where 9000 is a value of'KumaVirtualProbesPortAnnotation'
	KumaVirtualProbesAnnotation = "kuma.io/virtual-probes"

	// KumaVirtualProbesPortAnnotation is an insecure port for listening virtual probes
	KumaVirtualProbesPortAnnotation = "kuma.io/virtual-probes-port"

	// KumaSidecarEnvVarsAnnotation is a ; separated list of env vars that will be applied on Kuma Sidecar
	// Example value: TEST1=1;TEST2=2
	KumaSidecarEnvVarsAnnotation = "kuma.io/sidecar-env-vars"

	// KumaSidecarConcurrencyAnnotation is an integer value that explicitly sets the Envoy proxy concurrency
	// in the Kuma sidecar. Setting this annotation overrides the default injection behavior of deriving the
	// concurrency from the sidecar container resource limits. A value of 0 tells Envoy to try to use all the
	// visible CPUs.
	KumaSidecarConcurrencyAnnotation = "kuma.io/sidecar-proxy-concurrency"

	// KumaMetricsPrometheusPort allows to override `Mesh`-wide default port
	KumaMetricsPrometheusPort = "prometheus.metrics.kuma.io/port"

	// KumaMetricsPrometheusPath to override `Mesh`-wide default path
	KumaMetricsPrometheusPath = "prometheus.metrics.kuma.io/path"

	// Remove with: https://github.com/kumahq/kuma/issues/4675
	KumaBuiltinDNSDeprecated     = "kuma.io/builtindns"
	KumaBuiltinDNSPortDeprecated = "kuma.io/builtindnsport"
	// KumaBuiltinDNS the sidecar will use its builtin DNS
	KumaBuiltinDNS     = "kuma.io/builtin-dns"
	KumaBuiltinDNSPort = "kuma.io/builtin-dns-port"

	KumaTrafficExcludeInboundPorts  = "traffic.kuma.io/exclude-inbound-ports"
	KumaTrafficExcludeOutboundPorts = "traffic.kuma.io/exclude-outbound-ports"

	// KumaSidecarTokenVolumeAnnotation allows to specify which volume contains the service account token
	KumaSidecarTokenVolumeAnnotation = "kuma.io/service-account-token-volume"

	// KumaTransparentProxyingExperimentalEngine enables experimental transparent proxy engine.
	KumaTransparentProxyingExperimentalEngine = "kuma.io/transparent-proxying-experimental-engine"

	// KumaSidecarDrainTime allows to specify drain time of Kuma DP sidecar.
	KumaSidecarDrainTime = "kuma.io/sidecar-drain-time"

	// KumaContainerPatches is a comma-separated list of ContainerPatch names to be applied to injected containers on a given workload
	KumaContainerPatches = "kuma.io/container-patches"

	// KumaEnvoyLogLevel allows to control Envoy log level.
	// Available values are: [trace][debug][info][warning|warn][error][critical][off]
	KumaEnvoyLogLevel = "kuma.io/envoy-log-level"

	// KumaMetricsPrometheusAggregatePath allows to specify which path for specific app should request for metrics
	KumaMetricsPrometheusAggregatePath = "prometheus.metrics.kuma.io/aggregate-%s-path"
	// KumaMetricsPrometheusAggregatePort allows to specify which port for specific app should request for metrics
	KumaMetricsPrometheusAggregatePort = "prometheus.metrics.kuma.io/aggregate-%s-port"
	// KumaMetricsPrometheusAggregateEnabled allows to specify if we want to enable specific scraping, default: true
	KumaMetricsPrometheusAggregateEnabled = "prometheus.metrics.kuma.io/aggregate-%s-enabled"
	// KumaMetricsPrometheusAggregatePattern allows to retrieve all the apps for which need to get port/path configuration
	KumaMetricsPrometheusAggregatePattern = "^prometheus.metrics.kuma.io/aggregate-([a-zA-Z0-9-]+)-(port|path|enabled)$"
)

Annotations that can be used by the end users.

View Source
const (
	KumaSidecarInjectedAnnotation                      = "kuma.io/sidecar-injected"
	KumaIgnoreAnnotation                               = "kuma.io/ignore"
	KumaSidecarUID                                     = "kuma.io/sidecar-uid"
	KumaEnvoyAdminPort                                 = "kuma.io/envoy-admin-port"
	KumaTransparentProxyingAnnotation                  = "kuma.io/transparent-proxying"
	KumaTransparentProxyingInboundPortAnnotation       = "kuma.io/transparent-proxying-inbound-port"
	KumaTransparentProxyingInboundPortAnnotationV6     = "kuma.io/transparent-proxying-inbound-v6-port"
	KumaTransparentProxyingOutboundPortAnnotation      = "kuma.io/transparent-proxying-outbound-port"
	KumaTransparentProxyingReachableServicesAnnotation = "kuma.io/transparent-proxying-reachable-services"
	CNCFNetworkAnnotation                              = "k8s.v1.cni.cncf.io/networks"
	KumaCNI                                            = "kuma-cni"
)

Annotations that are being automatically set by the Kuma Sidecar Injector.

View Source
const (
	AnnotationEnabled  = "enabled"
	AnnotationDisabled = "disabled"
	AnnotationTrue     = "true"
	AnnotationFalse    = "false"
)
View Source
const (
	// Used with the KumaGatewayAnnotation to mark a pod as providing a builtin
	// gateway.
	AnnotationBuiltin = "builtin"
)
View Source
const (
	IngressServiceUpstream = "ingress.kubernetes.io/service-upstream"
)

Annotations related to the gateway

View Source
const (
	// KumaMeshLabel defines a Pod label to associate objects
	// with a particular Mesh.
	// Label value must be the name of a Mesh resource.
	KumaMeshLabel = "kuma.io/mesh"
)

Variables

View Source
var PodAnnotationDeprecations = []Deprecation{
	NewReplaceByDeprecation(KumaBuiltinDNSDeprecated, KumaBuiltinDNS),
	NewReplaceByDeprecation(KumaBuiltinDNSPortDeprecated, KumaBuiltinDNSPort),
	{
		Key:     KumaSidecarInjectionAnnotation,
		Message: "WARNING: you are using kuma.io/sidecar-injection as annotation. Please migrate it to label to have strong guarantee that application can only start with sidecar",
	},
}

Functions

This section is empty.

Types

type Annotations

type Annotations map[string]string

func (Annotations) GetDurationWithDefault added in v1.8.1

func (a Annotations) GetDurationWithDefault(def time.Duration, keys ...string) (time.Duration, bool, error)

func (Annotations) GetEnabled

func (a Annotations) GetEnabled(keys ...string) (bool, bool, error)

func (Annotations) GetEnabledWithDefault added in v1.8.1

func (a Annotations) GetEnabledWithDefault(def bool, keys ...string) (bool, bool, error)

func (Annotations) GetList added in v1.8.1

func (a Annotations) GetList(keys ...string) ([]string, bool)

func (Annotations) GetListWithDefault added in v1.8.1

func (a Annotations) GetListWithDefault(def []string, keys ...string) ([]string, bool)

func (Annotations) GetMap

func (a Annotations) GetMap(keys ...string) (map[string]string, bool, error)

GetMap returns map from annotation. Example: "kuma.io/sidecar-env-vars: TEST1=1;TEST2=2"

func (Annotations) GetMapWithDefault added in v1.8.1

func (a Annotations) GetMapWithDefault(def map[string]string, keys ...string) (map[string]string, bool, error)

func (Annotations) GetString

func (a Annotations) GetString(keys ...string) (string, bool)

func (Annotations) GetStringWithDefault added in v1.8.1

func (a Annotations) GetStringWithDefault(def string, keys ...string) (string, bool)

func (Annotations) GetUint32

func (a Annotations) GetUint32(keys ...string) (uint32, bool, error)

func (Annotations) GetUint32WithDefault added in v1.8.1

func (a Annotations) GetUint32WithDefault(def uint32, keys ...string) (uint32, bool, error)

type Deprecation added in v1.8.1

type Deprecation struct {
	Key     string
	Message string
}

func NewReplaceByDeprecation added in v1.8.1

func NewReplaceByDeprecation(old, new string) Deprecation

Jump to

Keyboard shortcuts

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