istio.io/istio@v0.0.0-20240520182934-d79c90f27776/cni/pkg/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 // Command line arguments 18 const ( 19 // Install 20 MountedCNINetDir = "mounted-cni-net-dir" 21 CNINetDir = "cni-net-dir" 22 CNIConfName = "cni-conf-name" 23 ChainedCNIPlugin = "chained-cni-plugin" 24 CNINetworkConfigFile = "cni-network-config-file" 25 CNINetworkConfig = "cni-network-config" 26 LogLevel = "log-level" 27 KubeconfigFilename = "kubecfg-file-name" 28 KubeconfigMode = "kubeconfig-mode" 29 KubeCAFile = "kube-ca-file" 30 SkipTLSVerify = "skip-tls-verify" 31 MonitoringPort = "monitoring-port" 32 LogUDSAddress = "log-uds-address" 33 ZtunnelUDSAddress = "ztunnel-uds-address" 34 CNIEventAddress = "cni-event-address" 35 ExcludeNamespaces = "exclude-namespaces" 36 AmbientEnabled = "ambient-enabled" 37 AmbientDNSCapture = "ambient-dns-capture" 38 AmbientIPv6 = "ambient-ipv6" 39 40 // Repair 41 RepairEnabled = "repair-enabled" 42 RepairDeletePods = "repair-delete-pods" 43 RepairRepairPods = "repair-repair-pods" 44 RepairLabelPods = "repair-label-pods" 45 RepairLabelKey = "repair-broken-pod-label-key" 46 RepairLabelValue = "repair-broken-pod-label-value" 47 RepairNodeName = "repair-node-name" 48 RepairSidecarAnnotation = "repair-sidecar-annotation" 49 RepairInitContainerName = "repair-init-container-name" 50 RepairInitTerminationMsg = "repair-init-container-termination-message" 51 RepairInitExitCode = "repair-init-container-exit-code" 52 RepairLabelSelectors = "repair-label-selectors" 53 RepairFieldSelectors = "repair-field-selectors" 54 ) 55 56 // Internal constants 57 const ( 58 DefaultKubeconfigMode = 0o600 59 60 CNIAddEventPath = "/cmdadd" 61 UDSLogPath = "/log" 62 63 // K8s liveness and readiness endpoints 64 LivenessEndpoint = "/healthz" 65 ReadinessEndpoint = "/readyz" 66 ReadinessPort = "8000" 67 ServiceAccountPath = "/var/run/secrets/kubernetes.io/serviceaccount" 68 ) 69 70 // Exposed for testing "constants" 71 var ( 72 CNIBinDir = "/opt/cni/bin" 73 HostCNIBinDir = "/host/opt/cni/bin" 74 // Well-known subpath we will mount any needed host-mounts under, 75 // to preclude shadowing or breaking any pod-internal mounts 76 HostMountsPath = "/host" 77 )