github.com/cilium/cilium@v1.16.2/pkg/k8s/apis/cilium.io/const.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package ciliumio 5 6 const ( 7 // LabelPrefix is the prefix for all Cilium owned labels. 8 LabelPrefix = "io.cilium.k8s" 9 10 // PolicyLabelName is the name of the policy label which refers to the 11 // k8s policy name. 12 PolicyLabelName = LabelPrefix + ".policy.name" 13 14 // PolicyLabelUID is the uid of the policy label which refers to the 15 // k8s policy UID. 16 PolicyLabelUID = LabelPrefix + ".policy.uid" 17 18 // PolicyLabelNamespace is the policy's namespace set in k8s. 19 PolicyLabelNamespace = LabelPrefix + ".policy.namespace" 20 21 // PolicyLabelDerivedFrom is the resource type which was used to 22 // derived the policy rule 23 PolicyLabelDerivedFrom = LabelPrefix + ".policy.derived-from" 24 25 // PolicyLabelServiceAccount is the name of the label associated with 26 // an endpoint to represent the Kubernetes ServiceAccount name 27 PolicyLabelServiceAccount = LabelPrefix + ".policy.serviceaccount" 28 29 // PolicyLabelCluster is the name of the cluster the endpoint is 30 // running in 31 PolicyLabelCluster = LabelPrefix + ".policy.cluster" 32 33 // PodNamespaceMetaLabels is the label used to store the labels of the 34 // kubernetes namespace's labels. 35 PodNamespaceMetaLabels = LabelPrefix + ".namespace.labels" 36 37 // PodNamespaceMetaLabelsPrefix is the prefix used for kubernetes namespace's labels 38 PodNamespaceMetaLabelsPrefix = PodNamespaceMetaLabels + "." 39 40 // PodNamespaceMetaNameLabel is the label that Kubernetes automatically adds 41 // to namespaces. 42 PodNamespaceMetaNameLabel = PodNamespaceMetaLabelsPrefix + LabelMetadataName 43 44 // LabelMetadataName is the label name which, in-tree, is used to 45 // automatically label namespaces, so they can be selected easily by tools 46 // which require definitive labels. 47 LabelMetadataName = "kubernetes.io/metadata.name" 48 49 // PodNamespaceLabel is the label used in kubernetes containers to 50 // specify which namespace they belong to. 51 PodNamespaceLabel = "io.kubernetes.pod.namespace" 52 53 // PodNameLabel is the label used in kubernetes containers to 54 // specify the POD name. 55 PodNameLabel = "io.kubernetes.pod.name" 56 57 // AppKubernetes is the label which is recommended by the official k8s 58 // documentation add the label for every resource object. 59 AppKubernetes = "app.kubernetes.io" 60 61 // StatefulSetPodNameLabel is the label name which, in-tree, is used to 62 // automatically label Pods that are owned by StatefulSets with their name, 63 // so that one can attach a Service to a specific Pod in the StatefulSet. 64 StatefulSetPodNameLabel = "statefulset.kubernetes.io/pod-name" 65 66 // StatefulSetPodIndexLabel is the label name which, in-tree, is used to 67 // automatically label Pods that are owned by StatefulSets with their 68 // ordinal index. 69 StatefulSetPodIndexLabel = "apps.kubernetes.io/pod-index" 70 71 // IndexedJobCompletionIndexLabel is the label name which, in-tree, is used 72 // to automatically label Pods that are owned by Indexed Jobs with their 73 // completion index. 74 IndexedJobCompletionIndexLabel = "batch.kubernetes.io/job-completion-index" 75 76 // BatchJobControllerUID is one of the labels that is available on a Job 77 // https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-labels 78 BatchJobControllerUID = "batch.kubernetes.io/controller-uid" 79 80 // CiliumIdentityAnnotationDeprecated is the previous annotation key used to map to an endpoint's security identity. 81 CiliumIdentityAnnotationDeprecated = "cilium-identity" 82 ) 83 84 const ( 85 // V1 represents version 1 of cilium API 86 // Deprecated 87 V1 = iota 88 // V2 represents version 2 of cilium API 89 V2 90 )