istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/constants/constants.go (about)

     1  // Copyright Istio Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package constants
    16  
    17  const (
    18  	// UnspecifiedIP constant for empty IP address
    19  	UnspecifiedIP = "0.0.0.0"
    20  	// UnspecifiedIPv6 constant for empty IPv6 address
    21  	UnspecifiedIPv6 = "::"
    22  
    23  	// PilotWellKnownDNSCertPath is the path location for Pilot dns serving cert, often used with custom CA integrations
    24  	PilotWellKnownDNSCertPath   = "./var/run/secrets/istiod/tls/"
    25  	PilotWellKnownDNSCaCertPath = "./var/run/secrets/istiod/ca/"
    26  
    27  	DefaultPilotTLSCert                = PilotWellKnownDNSCertPath + "tls.crt"
    28  	DefaultPilotTLSKey                 = PilotWellKnownDNSCertPath + "tls.key"
    29  	DefaultPilotTLSCaCert              = PilotWellKnownDNSCaCertPath + "root-cert.pem"
    30  	DefaultPilotTLSCaCertAlternatePath = PilotWellKnownDNSCertPath + "ca.crt"
    31  
    32  	// CertChainFilename is mTLS chain file
    33  	CertChainFilename = "cert-chain.pem"
    34  	// KeyFilename is mTLS private key
    35  	KeyFilename = "key.pem"
    36  	// RootCertFilename is mTLS root cert
    37  	RootCertFilename = "root-cert.pem"
    38  
    39  	// ConfigPathDir config directory for storing envoy json config files.
    40  	ConfigPathDir = "./etc/istio/proxy"
    41  
    42  	// IstioDataDir is the directory to store binary data such as envoy core dump, profile, and downloaded Wasm modules.
    43  	IstioDataDir = "/var/lib/istio/data"
    44  
    45  	// BinaryPathFilename envoy binary location
    46  	BinaryPathFilename = "/usr/local/bin/envoy"
    47  
    48  	// ServiceClusterName service cluster name used in xDS calls
    49  	ServiceClusterName = "istio-proxy"
    50  
    51  	// IstioIngressGatewayName is the internal gateway name assigned to ingress
    52  	IstioIngressGatewayName = "istio-autogenerated-k8s-ingress"
    53  
    54  	KubernetesGatewayName = "istio-autogenerated-k8s-gateway"
    55  
    56  	// DefaultClusterLocalDomain the default service domain suffix for Kubernetes, if not overridden in config.
    57  	DefaultClusterLocalDomain = "cluster.local"
    58  
    59  	// DefaultClusterSetLocalDomain is the default domain suffix for Kubernetes Multi-Cluster Services (MCS)
    60  	// used for load balancing requests against endpoints across the ClusterSet (i.e. mesh).
    61  	DefaultClusterSetLocalDomain = "clusterset.local"
    62  
    63  	// DefaultClusterName is the default cluster name
    64  	DefaultClusterName = "Kubernetes"
    65  
    66  	// IstioLabel indicates that a workload is part of a named Istio system component.
    67  	IstioLabel = "istio"
    68  
    69  	// IstioIngressLabelValue is value for IstioLabel that identifies an ingress workload.
    70  	// TODO we should derive this from IngressClass
    71  	IstioIngressLabelValue = "ingressgateway"
    72  
    73  	// IstioSystemNamespace is the namespace where Istio's components are deployed
    74  	IstioSystemNamespace = "istio-system"
    75  
    76  	// DefaultAuthenticationPolicyName is the name of the cluster-scoped authentication policy. Only
    77  	// policy with this name in the cluster-scoped will be considered.
    78  	DefaultAuthenticationPolicyName = "default"
    79  
    80  	// IstioMeshGateway is the built in gateway for all sidecars
    81  	IstioMeshGateway = "mesh"
    82  
    83  	// DefaultNamespaceWaypoint is the default name for a waypoint in a namespace.
    84  	DefaultNamespaceWaypoint = "waypoint"
    85  
    86  	// The data name in the ConfigMap of each namespace storing the root cert of non-Kube CA.
    87  	CACertNamespaceConfigMapDataName = "root-cert.pem"
    88  
    89  	// PodInfoLabelsPath is the filepath that pod labels will be stored
    90  	// This is typically set by the downward API
    91  	PodInfoLabelsPath = "./etc/istio/pod/labels"
    92  
    93  	// PodInfoAnnotationsPath is the filepath that pod annotations will be stored
    94  	// This is typically set by the downward API
    95  	PodInfoAnnotationsPath = "./etc/istio/pod/annotations"
    96  
    97  	// DefaultServiceAccountName is the default service account to use for remote cluster access.
    98  	DefaultServiceAccountName = "istio-reader-service-account"
    99  
   100  	// DefaultConfigServiceAccountName is the default service account to use for external Istiod config cluster access.
   101  	DefaultConfigServiceAccountName = "istiod"
   102  
   103  	// KubeSystemNamespace is the system namespace where we place kubernetes system components.
   104  	KubeSystemNamespace string = "kube-system"
   105  
   106  	// KubePublicNamespace is the namespace where we place kubernetes public info (ConfigMaps).
   107  	KubePublicNamespace string = "kube-public"
   108  
   109  	// KubeNodeLeaseNamespace is the namespace for the lease objects associated with each kubernetes node.
   110  	KubeNodeLeaseNamespace string = "kube-node-lease"
   111  
   112  	// LocalPathStorageNamespace is the namespace for dynamically provisioning persistent local storage with
   113  	// Kubernetes. Typically used with the Kind cluster: https://github.com/rancher/local-path-provisioner
   114  	LocalPathStorageNamespace string = "local-path-storage"
   115  
   116  	TestVMLabel = "istio.io/test-vm"
   117  
   118  	TestVMVersionLabel = "istio.io/test-vm-version"
   119  
   120  	// Label to skip config comparison.
   121  	AlwaysPushLabel = "internal.istio.io/always-push"
   122  
   123  	// InternalParentNames declares the original resources of an internally-generated config.
   124  	// This is used by k8s gateway-api.
   125  	// It is a comma separated list. For example, "HTTPRoute/foo.default,HTTPRoute/bar.default"
   126  	InternalParentNames      = "internal.istio.io/parents"
   127  	InternalRouteSemantics   = "internal.istio.io/route-semantics"
   128  	RouteSemanticsIngress    = "ingress"
   129  	RouteSemanticsGateway    = "gateway"
   130  	InternalGatewaySemantics = "internal.istio.io/gateway-semantics"
   131  	GatewaySemanticsGateway  = "gateway"
   132  
   133  	// ThirdPartyJwtPath is the default 3P token to authenticate with third party services
   134  	ThirdPartyJwtPath = "./var/run/secrets/tokens/istio-token"
   135  
   136  	// CertProviderIstiod uses istiod self signed DNS certificates for the control plane
   137  	CertProviderIstiod = "istiod"
   138  	// CertProviderKubernetes uses the Kubernetes CSR API to generate a DNS certificate for the control plane
   139  	CertProviderKubernetes = "kubernetes"
   140  	// CertProviderKubernetesSignerPrefix uses the Kubernetes CSR API and the specified signer to generate a DNS certificate for the control plane
   141  	CertProviderKubernetesSignerPrefix = "k8s.io/"
   142  	// CertProviderCustom uses the custom root certificate mounted in a well known location for the control plane
   143  	CertProviderCustom = "custom"
   144  	// CertProviderNone does not create any certificates for the control plane. It is assumed that some external
   145  	// load balancer, such as an Istio Gateway, is terminating the TLS.
   146  	CertProviderNone = "none"
   147  
   148  	// AlwaysReject is a special internal annotation that is always rejected in the validation webhook. This is used for
   149  	// testing the validation webhook.
   150  	AlwaysReject = "internal.istio.io/webhook-always-reject"
   151  
   152  	ManagedGatewayLabel               = "gateway.istio.io/managed"
   153  	UnmanagedGatewayController        = "istio.io/unmanaged-gateway"
   154  	ManagedGatewayControllerLabel     = "istio.io-gateway-controller"
   155  	ManagedGatewayMeshControllerLabel = "istio.io-mesh-controller"
   156  	ManagedGatewayMeshController      = "istio.io/mesh-controller"
   157  
   158  	RemoteGatewayClassName   = "istio-remote"
   159  	WaypointGatewayClassName = "istio-waypoint"
   160  
   161  	// DeprecatedGatewayNameLabel indicates the gateway managing a particular proxy instances. Only populated for Gateway API gateways
   162  	DeprecatedGatewayNameLabel = "istio.io/gateway-name"
   163  	// GatewayNameLabel indicates the gateway managing a particular proxy instances. Only populated for Gateway API gateways
   164  	GatewayNameLabel = "gateway.networking.k8s.io/gateway-name"
   165  
   166  	// TODO formalize this API
   167  	// TODO additional values to represent passthrough and hbone or both
   168  	ListenerModeOption          = "gateway.istio.io/listener-protocol"
   169  	ListenerModeAutoPassthrough = "auto-passthrough"
   170  
   171  	// DataplaneMode namespace label for determining ambient mesh behavior
   172  	DataplaneModeLabel = "istio.io/dataplane-mode"
   173  	// Set by users to indicate that the (namespace|pod) should be captured for ambient
   174  	DataplaneModeAmbient = "ambient"
   175  	// Set by users to indicate that the (namespace|pod) should NOT be captured for ambient
   176  	DataplaneModeNone    = "none"
   177  	DataplaneModeInherit = "inherit" // TODO do we need this atm
   178  
   179  	// AmbientRedirection specifies whether a pod has ambient redirection (to ztunnel) configured.
   180  	AmbientRedirection = "ambient.istio.io/redirection"
   181  	// AmbientRedirectionEnabled indicates redirection is configured. This is set by the CNI on pods
   182  	// when it actually has successfully set up pod redirection, rather than by the user.
   183  	//
   184  	// The presence of this annotation with this specific value indicates the pod is captured.
   185  	// Anything else indicates it is not.
   186  	AmbientRedirectionEnabled = "enabled"
   187  
   188  	// AmbientUseWaypointLabelLabel is the label used to specify which waypoint should be used for a given pod, service, etc...
   189  	AmbientUseWaypointLabel = "istio.io/use-waypoint"
   190  	// AmbientWaypointForTrafficTypeLabel is the label used to specify which traffic is allowed through the Waypoint.
   191  	// This label is applied to the Waypoint. Valid traffic types are "service", "workload", "all", and "none".
   192  	AmbientWaypointForTrafficTypeLabel = "istio.io/waypoint-for"
   193  
   194  	// AmbientWaypointInboundBinding has the format `<protocol>` or `<protocol>/<port>`. If the waypoint is
   195  	// captured by a zTunnel, the zTunnel  will send traffic to the specified port with tunnel information
   196  	// such as source/destination addresses, identity and HBONE target host using the specified protocol.
   197  	AmbientWaypointInboundBinding = "ambient.istio.io/waypoint-inbound-binding"
   198  
   199  	// ServiceTraffic indicates that service traffic should go through the intended waypoint.
   200  	ServiceTraffic = "service"
   201  	// WorkloadTraffic indicates that workload traffic should go through the intended waypoint.
   202  	WorkloadTraffic = "workload"
   203  	// AllTraffic indicates that all traffic should go through the intended waypoint.
   204  	AllTraffic = "all"
   205  	// NoTraffic indicates that no traffic should go through the intended waypoint.
   206  	NoTraffic = "none"
   207  )