k8c.io/api/v3@v3.0.0-20230904060738-b0a93889c0b6/pkg/apis/ee.kubermatic/v1/const.go (about) 1 /* 2 Copyright 2023 The Kubermatic Kubernetes Platform contributors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1 18 19 import ( 20 "k8s.io/apimachinery/pkg/util/sets" 21 ) 22 23 // +kubebuilder:validation:Enum=alibaba;anexia;aws;azure;bringyourown;digitalocean;gcp;hetzner;kubevirt;nutanix;openstack;packet;vmwareclouddirector;vsphere 24 25 // CloudProvider defines the cloud provider where the a cluster's nodes are running. 26 // Note that these constants may match the machine-controller's constant, but don't 27 // have to. Use the functions in the helper package to translate between the two. 28 type CloudProvider string 29 30 func (p CloudProvider) String() string { 31 return string(p) 32 } 33 34 const ( 35 CloudProviderFake CloudProvider = "fake" 36 CloudProviderAlibaba CloudProvider = "alibaba" 37 CloudProviderAnexia CloudProvider = "anexia" 38 CloudProviderAWS CloudProvider = "aws" 39 CloudProviderAzure CloudProvider = "azure" 40 CloudProviderBringYourOwn CloudProvider = "bringyourown" 41 CloudProviderDigitalocean CloudProvider = "digitalocean" 42 CloudProviderGCP CloudProvider = "gcp" 43 CloudProviderHetzner CloudProvider = "hetzner" 44 CloudProviderKubeVirt CloudProvider = "kubevirt" 45 CloudProviderNutanix CloudProvider = "nutanix" 46 CloudProviderOpenStack CloudProvider = "openstack" 47 CloudProviderPacket CloudProvider = "packet" 48 CloudProviderVMwareCloudDirector CloudProvider = "vmwareclouddirector" 49 CloudProviderVSphere CloudProvider = "vsphere" 50 ) 51 52 var AllCloudProviders = sets.New( 53 CloudProviderFake, 54 CloudProviderAlibaba, 55 CloudProviderAnexia, 56 CloudProviderAWS, 57 CloudProviderAzure, 58 CloudProviderBringYourOwn, 59 CloudProviderDigitalocean, 60 CloudProviderGCP, 61 CloudProviderHetzner, 62 CloudProviderKubeVirt, 63 CloudProviderNutanix, 64 CloudProviderOpenStack, 65 CloudProviderPacket, 66 CloudProviderVMwareCloudDirector, 67 CloudProviderVSphere, 68 ) 69 70 // +kubebuilder:validation:Enum=ubuntu;centos;amzn2;rhel;flatcar;rockylinux 71 72 // OperatingSystem defines the a node's operating system. Note that these constants may 73 // match the machine-controller's constant, but don't have to. Use the functions in 74 // the helper package to translate between the two. 75 type OperatingSystem string 76 77 func (o OperatingSystem) String() string { 78 return string(o) 79 } 80 81 const ( 82 OperatingSystemUbuntu OperatingSystem = "ubuntu" 83 OperatingSystemCentOS OperatingSystem = "centos" 84 OperatingSystemAmazonLinux2 OperatingSystem = "amzn2" 85 OperatingSystemRHEL OperatingSystem = "rhel" 86 OperatingSystemFlatcar OperatingSystem = "flatcar" 87 OperatingSystemRockyLinux OperatingSystem = "rockylinux" 88 ) 89 90 var AllOperatingSystems = sets.New( 91 OperatingSystemUbuntu, 92 OperatingSystemCentOS, 93 OperatingSystemAmazonLinux2, 94 OperatingSystemRHEL, 95 OperatingSystemFlatcar, 96 OperatingSystemRockyLinux, 97 ) 98 99 // +kubebuilder:validation:Enum=NodePort;LoadBalancer;Tunneling 100 101 // ExposeStrategy is the strategy used to expose a cluster control plane. 102 // Possible values are `NodePort`, `LoadBalancer` or `Tunneling` (requires a feature gate). 103 type ExposeStrategy string 104 105 func (s ExposeStrategy) String() string { 106 return string(s) 107 } 108 109 const ( 110 // ExposeStrategyNodePort creates a NodePort with a "nodeport-proxy.k8s.io/expose": "true" annotation to expose 111 // all clusters on one central Service of type LoadBalancer via the NodePort proxy. 112 ExposeStrategyNodePort ExposeStrategy = "NodePort" 113 // ExposeStrategyLoadBalancer creates a LoadBalancer service per cluster. 114 ExposeStrategyLoadBalancer ExposeStrategy = "LoadBalancer" 115 // ExposeStrategyTunneling allows to reach the control plane components by 116 // tunneling L4 traffic (TCP only is supported at the moment). 117 // The traffic is encapsulated by mean of an agent deployed on the worker 118 // nodes. 119 // The traffic is decapsulated and forwarded to the recipients by 120 // mean of a proxy deployed on the Seed Cluster. 121 // The same proxy is also capable of routing TLS traffic without 122 // termination, this is to allow the Kubelet to reach the control plane 123 // before the agents are running. 124 // 125 // This strategy has the inconvenience of requiring an agent on worker 126 // nodes, but has the notable advantage of requiring one single entry point 127 // (e.g. Service of type LoadBalancer) without consuming one or more ports 128 // for each user cluster. 129 ExposeStrategyTunneling ExposeStrategy = "Tunneling" 130 ) 131 132 // AllExposeStrategies is a set containing all the expose strategies. 133 var AllExposeStrategies = sets.New( 134 ExposeStrategyNodePort, 135 ExposeStrategyLoadBalancer, 136 ExposeStrategyTunneling, 137 ) 138 139 // +kubebuilder:validation:Enum=canal;cilium;none 140 141 // CNIPluginType defines the type of CNI plugin installed. 142 type CNIPluginType string 143 144 func (c CNIPluginType) String() string { 145 return string(c) 146 } 147 148 const ( 149 // CNIPluginTypeCanal corresponds to Canal CNI plugin (i.e. Flannel + 150 // Calico for policy enforcement). 151 CNIPluginTypeCanal CNIPluginType = "canal" 152 153 // CNIPluginTypeCilium corresponds to Cilium CNI plugin. 154 CNIPluginTypeCilium CNIPluginType = "cilium" 155 156 // CNIPluginTypeNone corresponds to no CNI plugin managed by KKP 157 // (cluster users are responsible for managing the CNI in the cluster themselves). 158 CNIPluginTypeNone CNIPluginType = "none" 159 )