github.com/tigera/api@v0.0.0-20240320170621-278e89a8c5fb/pkg/apis/projectcalico/v3/constants.go (about)

     1  // Copyright (c) 2017-2021 Tigera, Inc. All rights reserved.
     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 v3
    16  
    17  const (
    18  	// API group details for the Calico v3 API.
    19  	Group               = "projectcalico.org"
    20  	VersionCurrent      = "v3"
    21  	GroupVersionCurrent = Group + "/" + VersionCurrent
    22  
    23  	// AllNamespaces is used for client instantiation, either for when the namespace
    24  	// will be specified in the resource request, or for List or Watch queries across
    25  	// all namespaces.
    26  	AllNamespaces = ""
    27  
    28  	// AllNames is used for List or Watch queries to wildcard the name.
    29  	AllNames = ""
    30  
    31  	// Label used to denote the Kind. This is added to network sets by Calico and may be used for
    32  	// label matches by Policy selectors.
    33  	LabelKind = "projectcalico.org/kind"
    34  
    35  	// Label used to denote the Name. This is added to network sets by Calico and may be used for
    36  	// label matches by Policy selectors.
    37  	LabelName = "projectcalico.org/name"
    38  
    39  	// Label used to denote the Namespace. This is added to workload endpoints and network sets by
    40  	// Calico and may be used for label matches by Policy selectors.
    41  	LabelNamespace = "projectcalico.org/namespace"
    42  
    43  	// Label used to denote the ServiceAccount.  This is added to the workload endpoints by Calico
    44  	// and may be used for label matches by Policy selectors.
    45  	LabelServiceAccount = "projectcalico.org/serviceaccount"
    46  
    47  	// Label used to denote the Orchestrator.  This is added to the workload endpoints by an
    48  	// orchestrator.
    49  	LabelOrchestrator = "projectcalico.org/orchestrator"
    50  
    51  	// Label used to denote the Network a WorkloadEndpoint belongs too.
    52  	LabelNetwork = "projectcalico.org/network"
    53  
    54  	// Label used to denote the Namespace the NetworkAttachmentDefinition for a WorkloadEndpoint belongs to.
    55  	LabelNetworkNamespace = "projectcalico.org/network-namespace"
    56  
    57  	// Label used to denote the inside pod interface for a WorkloadEndpoint.
    58  	LabelNetworkInterface = "projectcalico.org/network-interface"
    59  
    60  	// Known orchestrators.  Orchestrators are not limited to this list.
    61  	OrchestratorKubernetes = "k8s"
    62  	OrchestratorCNI        = "cni"
    63  	OrchestratorDocker     = "libnetwork"
    64  	OrchestratorOpenStack  = "openstack"
    65  
    66  	// Label used to denote the Tier. This is added to policies by Calico so that label matches
    67  	// can be made for tiers.
    68  	LabelTier = "projectcalico.org/tier"
    69  
    70  	// Some internally defined resource types that map directly onto the kubernetes resources.  These are only
    71  	// available through the backend client.
    72  	KindK8sEndpoints = "K8sEndpoints"
    73  	KindK8sService   = "K8sService"
    74  	KindK8sPod       = "Pod"
    75  	KindFlowPublic   = "Public"
    76  	KindFlowPrivate  = "Private"
    77  
    78  	// Enum options for enable/disable fields
    79  	Enabled  = "Enabled"
    80  	Disabled = "Disabled"
    81  )