k8c.io/api/v3@v3.0.0-20230904060738-b0a93889c0b6/pkg/apis/machine-controller/types.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 machinecontroller
    18  
    19  import (
    20  	"k8s.io/apimachinery/pkg/util/sets"
    21  )
    22  
    23  // CloudProvider defines the cloud provider where the a cluster's nodes are running.
    24  // Note that these constants may match KKP's constant, but don't have to.
    25  // Use the functions in the helper package to translate between the two.
    26  type CloudProvider string
    27  
    28  const (
    29  	CloudProviderFake                CloudProvider = "fake"
    30  	CloudProviderAlibaba             CloudProvider = "alibaba"
    31  	CloudProviderAnexia              CloudProvider = "anexia"
    32  	CloudProviderAWS                 CloudProvider = "aws"
    33  	CloudProviderAzure               CloudProvider = "azure"
    34  	CloudProviderBaremetal           CloudProvider = "baremetal"
    35  	CloudProviderDigitalocean        CloudProvider = "digitalocean"
    36  	CloudProviderEquinixMetal        CloudProvider = "equinixmetal"
    37  	CloudProviderExternal            CloudProvider = "external"
    38  	CloudProviderGoogle              CloudProvider = "gce"
    39  	CloudProviderHetzner             CloudProvider = "hetzner"
    40  	CloudProviderKubeVirt            CloudProvider = "kubevirt"
    41  	CloudProviderLinode              CloudProvider = "linode"
    42  	CloudProviderNutanix             CloudProvider = "nutanix"
    43  	CloudProviderOpenStack           CloudProvider = "openstack"
    44  	CloudProviderPacket              CloudProvider = "packet"
    45  	CloudProviderScaleway            CloudProvider = "scaleway"
    46  	CloudProviderVMwareCloudDirector CloudProvider = "vmware-cloud-director"
    47  	CloudProviderVSphere             CloudProvider = "vsphere"
    48  	CloudProviderVultr               CloudProvider = "vultr"
    49  )
    50  
    51  var AllCloudProviders = sets.New(
    52  	CloudProviderFake,
    53  	CloudProviderAlibaba,
    54  	CloudProviderAnexia,
    55  	CloudProviderAWS,
    56  	CloudProviderAzure,
    57  	CloudProviderBaremetal,
    58  	CloudProviderDigitalocean,
    59  	CloudProviderEquinixMetal,
    60  	CloudProviderExternal,
    61  	CloudProviderGoogle,
    62  	CloudProviderHetzner,
    63  	CloudProviderKubeVirt,
    64  	CloudProviderLinode,
    65  	CloudProviderNutanix,
    66  	CloudProviderOpenStack,
    67  	CloudProviderPacket,
    68  	CloudProviderScaleway,
    69  	CloudProviderVMwareCloudDirector,
    70  	CloudProviderVSphere,
    71  	CloudProviderVultr,
    72  )
    73  
    74  // OperatingSystem defines the a node's operating system. Note that these constants may
    75  // match KKP's constant, but don't have to. Use the functions in the helper package to
    76  // translate between the two.
    77  type OperatingSystem string
    78  
    79  const (
    80  	OperatingSystemUbuntu       OperatingSystem = "ubuntu"
    81  	OperatingSystemCentOS       OperatingSystem = "centos"
    82  	OperatingSystemAmazonLinux2 OperatingSystem = "amzn2"
    83  	OperatingSystemRHEL         OperatingSystem = "rhel"
    84  	OperatingSystemFlatcar      OperatingSystem = "flatcar"
    85  	OperatingSystemRockyLinux   OperatingSystem = "rockylinux"
    86  )
    87  
    88  var AllOperatingSystems = sets.New(
    89  	OperatingSystemUbuntu,
    90  	OperatingSystemCentOS,
    91  	OperatingSystemAmazonLinux2,
    92  	OperatingSystemRHEL,
    93  	OperatingSystemFlatcar,
    94  	OperatingSystemRockyLinux,
    95  )