From b04714a1756150b1a833d748e9e02fd639b7025d Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Wed, 4 Oct 2023 11:29:32 +0100 Subject: [PATCH] Remove v1alpha3 and v1alpha4 Signed-off-by: killianmuldoon --- .gitignore | 3 + .golangci.yml | 28 +- Makefile | 23 +- apis/v1alpha3/cloudprovider_encoding.go | 268 --- apis/v1alpha3/cloudprovider_encoding_test.go | 723 ------- apis/v1alpha3/cloudprovider_types.go | 255 --- apis/v1alpha3/conversion.go | 49 - apis/v1alpha3/conversion_test.go | 135 -- apis/v1alpha3/doc.go | 23 - apis/v1alpha3/groupversion_info.go | 54 - .../haproxyloadbalancer_conversion.go | 23 - apis/v1alpha3/haproxyloadbalancer_types.go | 92 - apis/v1alpha3/networkdevicespec_conversion.go | 49 - apis/v1alpha3/types.go | 355 ---- apis/v1alpha3/vspherecluster_conversion.go | 73 - apis/v1alpha3/vspherecluster_types.go | 128 -- .../vsphereclusteridentity_conversion.go | 53 - apis/v1alpha3/vsphereclusteridentity_types.go | 110 - .../vspheredeploymentzone_conversion.go | 47 - apis/v1alpha3/vspheredeploymentzone_types.go | 109 - .../vspherefailuredomain_conversion.go | 47 - apis/v1alpha3/vspherefailuredomain_types.go | 118 -- apis/v1alpha3/vspheremachine_conversion.go | 77 - apis/v1alpha3/vspheremachine_types.go | 146 -- .../vspheremachinetemplate_conversion.go | 88 - apis/v1alpha3/vspheremachinetemplate_types.go | 56 - apis/v1alpha3/vspherevm_conversion.go | 77 - apis/v1alpha3/vspherevm_types.go | 165 -- apis/v1alpha3/zz_generated.conversion.go | 1691 --------------- apis/v1alpha3/zz_generated.deepcopy.go | 1375 ------------ apis/v1alpha4/conversion.go | 48 - apis/v1alpha4/doc.go | 23 - apis/v1alpha4/groupversion_info.go | 54 - apis/v1alpha4/networkdevicespec_conversion.go | 49 - apis/v1alpha4/types.go | 355 ---- apis/v1alpha4/vspherecluster_conversion.go | 47 - apis/v1alpha4/vspherecluster_types.go | 107 - .../vsphereclusteridentity_conversion.go | 47 - apis/v1alpha4/vsphereclusteridentity_types.go | 110 - .../vsphereclustertemplate_conversion.go | 47 - apis/v1alpha4/vsphereclustertemplate_types.go | 60 - .../vspheredeploymentzone_conversion.go | 47 - apis/v1alpha4/vspheredeploymentzone_types.go | 117 -- .../vspherefailuredomain_conversion.go | 47 - apis/v1alpha4/vspherefailuredomain_types.go | 119 -- apis/v1alpha4/vspheremachine_conversion.go | 68 - apis/v1alpha4/vspheremachine_types.go | 146 -- .../vspheremachinetemplate_conversion.go | 89 - apis/v1alpha4/vspheremachinetemplate_types.go | 56 - apis/v1alpha4/vspherevm_conversion.go | 77 - apis/v1alpha4/vspherevm_types.go | 165 -- apis/v1alpha4/zz_generated.conversion.go | 1849 ----------------- apis/v1alpha4/zz_generated.deepcopy.go | 1174 ----------- ...cluster.x-k8s.io_haproxyloadbalancers.yaml | 296 --- ...ter.x-k8s.io_vsphereclusteridentities.yaml | 266 --- ...ture.cluster.x-k8s.io_vsphereclusters.yaml | 550 ----- ...ster.x-k8s.io_vsphereclustertemplates.yaml | 79 - ...uster.x-k8s.io_vspheredeploymentzones.yaml | 210 -- ...luster.x-k8s.io_vspherefailuredomains.yaml | 244 --- ...ture.cluster.x-k8s.io_vspheremachines.yaml | 796 ------- ...ster.x-k8s.io_vspheremachinetemplates.yaml | 671 ------ ...structure.cluster.x-k8s.io_vspherevms.yaml | 826 -------- go.mod | 4 +- go.sum | 4 - metadata.yaml | 18 - pkg/context/fake/constants.go | 8 +- pkg/identity/identity_suite_test.go | 2 - pkg/manager/manager.go | 4 - .../data/shared/main/v1beta1/metadata.yaml | 11 +- .../main/v1beta1_provider/metadata.yaml | 9 - test/helpers/envtest.go | 4 - test/integration/data/shared/metadata.yaml | 11 +- 72 files changed, 15 insertions(+), 15339 deletions(-) delete mode 100644 apis/v1alpha3/cloudprovider_encoding.go delete mode 100644 apis/v1alpha3/cloudprovider_encoding_test.go delete mode 100644 apis/v1alpha3/cloudprovider_types.go delete mode 100644 apis/v1alpha3/conversion.go delete mode 100644 apis/v1alpha3/conversion_test.go delete mode 100644 apis/v1alpha3/doc.go delete mode 100644 apis/v1alpha3/groupversion_info.go delete mode 100644 apis/v1alpha3/haproxyloadbalancer_conversion.go delete mode 100644 apis/v1alpha3/haproxyloadbalancer_types.go delete mode 100644 apis/v1alpha3/networkdevicespec_conversion.go delete mode 100644 apis/v1alpha3/types.go delete mode 100644 apis/v1alpha3/vspherecluster_conversion.go delete mode 100644 apis/v1alpha3/vspherecluster_types.go delete mode 100644 apis/v1alpha3/vsphereclusteridentity_conversion.go delete mode 100644 apis/v1alpha3/vsphereclusteridentity_types.go delete mode 100644 apis/v1alpha3/vspheredeploymentzone_conversion.go delete mode 100644 apis/v1alpha3/vspheredeploymentzone_types.go delete mode 100644 apis/v1alpha3/vspherefailuredomain_conversion.go delete mode 100644 apis/v1alpha3/vspherefailuredomain_types.go delete mode 100644 apis/v1alpha3/vspheremachine_conversion.go delete mode 100644 apis/v1alpha3/vspheremachine_types.go delete mode 100644 apis/v1alpha3/vspheremachinetemplate_conversion.go delete mode 100644 apis/v1alpha3/vspheremachinetemplate_types.go delete mode 100644 apis/v1alpha3/vspherevm_conversion.go delete mode 100644 apis/v1alpha3/vspherevm_types.go delete mode 100644 apis/v1alpha3/zz_generated.conversion.go delete mode 100644 apis/v1alpha3/zz_generated.deepcopy.go delete mode 100644 apis/v1alpha4/conversion.go delete mode 100644 apis/v1alpha4/doc.go delete mode 100644 apis/v1alpha4/groupversion_info.go delete mode 100644 apis/v1alpha4/networkdevicespec_conversion.go delete mode 100644 apis/v1alpha4/types.go delete mode 100644 apis/v1alpha4/vspherecluster_conversion.go delete mode 100644 apis/v1alpha4/vspherecluster_types.go delete mode 100644 apis/v1alpha4/vsphereclusteridentity_conversion.go delete mode 100644 apis/v1alpha4/vsphereclusteridentity_types.go delete mode 100644 apis/v1alpha4/vsphereclustertemplate_conversion.go delete mode 100644 apis/v1alpha4/vsphereclustertemplate_types.go delete mode 100644 apis/v1alpha4/vspheredeploymentzone_conversion.go delete mode 100644 apis/v1alpha4/vspheredeploymentzone_types.go delete mode 100644 apis/v1alpha4/vspherefailuredomain_conversion.go delete mode 100644 apis/v1alpha4/vspherefailuredomain_types.go delete mode 100644 apis/v1alpha4/vspheremachine_conversion.go delete mode 100644 apis/v1alpha4/vspheremachine_types.go delete mode 100644 apis/v1alpha4/vspheremachinetemplate_conversion.go delete mode 100644 apis/v1alpha4/vspheremachinetemplate_types.go delete mode 100644 apis/v1alpha4/vspherevm_conversion.go delete mode 100644 apis/v1alpha4/vspherevm_types.go delete mode 100644 apis/v1alpha4/zz_generated.conversion.go delete mode 100644 apis/v1alpha4/zz_generated.deepcopy.go delete mode 100644 config/default/crd/bases/infrastructure.cluster.x-k8s.io_haproxyloadbalancers.yaml diff --git a/.gitignore b/.gitignore index 84e222a1bd..6b9dab90af 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,6 @@ _releasenotes *~ *.tmp .DS_Store + +# Ginkgo logs from test runs +*ginkgo-log.txt \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index f15005c204..4301dc466a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -111,10 +111,6 @@ linters-settings: # CAPV - pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1 alias: infrav1 - - pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3 - alias: infrav1alpha3 - - pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4 - alias: infrav1alpha4 - pkg: sigs.k8s.io/cluster-api-provider-vsphere/apis/vmware/v1beta1 alias: vmwarev1 # VMware Operator @@ -263,26 +259,4 @@ issues: - linters: - stylecheck text: "ST1016: methods on the same type should have the same receiver name" - path: ^apis\/.*\/.*conversion.*\.go$ - # missing comments on v1alpha3 and v1alpha4 packages. These rules should be removed when those packages are removed. - - linters: - - revive - text: "package-comments" - path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$ - - linters: - - stylecheck - text: "ST1000" - path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$ - - linters: - - revive - text: exported (.*) should have comment (.*)or be unexported - path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$ - # wrong comment - - linters: - - revive - text: comment on exported (.*) should be of the form (.*) - path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$ - - linters: - - stylecheck - text: ST1021|ST1020 - path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$ + path: ^apis\/.*\/.*conversion.*\.go$ \ No newline at end of file diff --git a/Makefile b/Makefile index 5cc86ad847..649801ca36 100644 --- a/Makefile +++ b/Makefile @@ -242,14 +242,12 @@ help: # Display this help .PHONY: generate generate: ## Run all generate targets - $(MAKE) generate-modules generate-manifests generate-go-deepcopy generate-go-conversions generate-flavors + $(MAKE) generate-modules generate-manifests generate-go-deepcopy generate-flavors .PHONY: generate-manifests generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc. $(MAKE) clean-generated-yaml SRC_DIRS="$(CRD_ROOT),$(SUPERVISOR_CRD_ROOT),$(VMOP_CRD_ROOT)" $(CONTROLLER_GEN) \ - paths=./apis/v1alpha3 \ - paths=./apis/v1alpha4 \ paths=./apis/v1beta1 \ paths=./internal/webhooks \ crd:crdVersions=v1 \ @@ -277,16 +275,6 @@ generate-go-deepcopy: $(CONTROLLER_GEN) ## Generate deepcopy go code for core object:headerFile=./hack/boilerplate/boilerplate.generatego.txt \ paths=./apis/... -.PHONY: generate-go-conversions -generate-go-conversions: $(CONTROLLER_GEN) $(CONVERSION_GEN) ## Runs Go related generate targets - $(MAKE) clean-generated-conversions SRC_DIRS="./apis/v1alpha3,./apis/v1alpha4" - $(CONVERSION_GEN) \ - --input-dirs=./apis/v1alpha3 \ - --input-dirs=./apis/v1alpha4 \ - --build-tag=ignore_autogenerated \ - --output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt - .PHONY: generate-modules generate-modules: ## Run go mod tidy to ensure modules are up to date go mod tidy @@ -343,7 +331,8 @@ APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main) apidiff: $(GO_APIDIFF) ## Check for API differences $(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible -ALL_VERIFY_CHECKS = licenses boilerplate shellcheck modules gen conversions doctoc flavors import-restrictions +ALL_VERIFY_CHECKS = licenses boilerplate shellcheck modules gen doctoc flavors import-restrictions +ALL_VERIFY_CHECKS = licenses boilerplate shellcheck modules gen doctoc flavors import-restrictions .PHONY: verify verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) ## Run all verify-* targets @@ -716,15 +705,15 @@ clean-release-git: ## Restores the git files usually modified during a release git restore ./*manager_image_patch.yaml ./*manager_pull_policy.yaml .PHONY: clean-generated-yaml -clean-generated-yaml: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4" +clean-generated-yaml: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1beta1" (IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name '*.yaml' -exec rm -f {} \;; done) .PHONY: clean-generated-deepcopy -clean-generated-deepcopy: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4" +clean-generated-deepcopy: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1beta1" (IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name 'zz_generated.deepcopy*' -exec rm -f {} \;; done) .PHONY: clean-generated-conversions -clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1alpha4" +clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs. Example SRC_DIRS="./api/v1beta1" (IFS=','; for i in $(SRC_DIRS); do find $$i -type f -name 'zz_generated.conversion*' -exec rm -f {} \;; done) ## -------------------------------------- diff --git a/apis/v1alpha3/cloudprovider_encoding.go b/apis/v1alpha3/cloudprovider_encoding.go deleted file mode 100644 index 50f513d0c1..0000000000 --- a/apis/v1alpha3/cloudprovider_encoding.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "bytes" - "fmt" - "io" - "reflect" - "regexp" - "sort" - "strings" - - "github.com/pkg/errors" - gcfg "gopkg.in/gcfg.v1" -) - -const gcfgTag = "gcfg" - -var iniEscapeChars = regexp.MustCompile(`([\\"])`) - -// MarshalINI marshals the cloud provider configuration to INI-style -// configuration data. -func (c *CPIConfig) MarshalINI() ([]byte, error) { - if c == nil { - return nil, errors.New("config is nil") - } - - buf := &bytes.Buffer{} - - // Get the reflected type and value of the CPIConfig object. - configValue := reflect.ValueOf(*c) - configType := reflect.TypeOf(*c) - - for sectionIndex := 0; sectionIndex < configValue.NumField(); sectionIndex++ { - sectionType := configType.Field(sectionIndex) - sectionValue := configValue.Field(sectionIndex) - - // Get the value of the gcfg tag to help determine the section - // name and whether to omit an empty value. Also ignore fields without the gcfg tag - sectionName, omitEmpty, hasTag := parseGcfgTag(sectionType) - if !hasTag { - continue - } - - // Do not marshal a section if it is empty. - if omitEmpty && isEmpty(sectionValue) { - continue - } - - switch sectionValue.Kind() { - case reflect.Map: - keys := sectionValue.MapKeys() - sort.Slice(keys, func(i, j int) bool { - return keys[i].String() < keys[j].String() - }) - - for _, key := range keys { - sectionNameKey, sectionValue := key, sectionValue.MapIndex(key) - sectionName := fmt.Sprintf(`%s "%v"`, sectionName, sectionNameKey.String()) - if err := c.marshalINISectionProperties(buf, sectionValue, sectionName); err != nil { - return nil, err - } - } - default: - if err := c.marshalINISectionProperties(buf, sectionValue, sectionName); err != nil { - return nil, err - } - } - } - - return buf.Bytes(), nil -} - -func (c *CPIConfig) marshalINISectionProperties(out io.Writer, sectionValue reflect.Value, sectionName string) error { - switch sectionValue.Kind() { - case reflect.Interface, reflect.Ptr: - return c.marshalINISectionProperties(out, sectionValue.Elem(), sectionName) - } - - fmt.Fprintf(out, "[%s]\n", sectionName) - - sectionType := sectionValue.Type() - for propertyIndex := 0; propertyIndex < sectionType.NumField(); propertyIndex++ { - propertyType := sectionType.Field(propertyIndex) - propertyValue := sectionValue.Field(propertyIndex) - - // Get the value of the gcfg tag to help determine the property - // name and whether to omit an empty value. - propertyName, omitEmpty, hasTag := parseGcfgTag(propertyType) - if !hasTag { - continue - } - - // Do not marshal a property if it is empty. - if omitEmpty && isEmpty(propertyValue) { - continue - } - - switch propertyValue.Kind() { - case reflect.Interface, reflect.Ptr: - propertyValue = propertyValue.Elem() - } - - fmt.Fprintf(out, "%s", propertyName) - if propertyValue.IsValid() { - rawVal := fmt.Sprintf("%v", propertyValue.Interface()) - val := iniEscapeChars.ReplaceAllString(rawVal, "\\$1") - val = strings.ReplaceAll(val, "\t", "\\t") - if propertyValue.Kind() == reflect.String { - val = "\"" + val + "\"" - } - fmt.Fprintf(out, " = %s\n", val) - } - } - - fmt.Fprintf(out, "\n") - - return nil -} - -func parseGcfgTag(field reflect.StructField) (string, bool, bool) { - name := field.Name - omitEmpty := false - hasTag := false - - if tagVal, ok := field.Tag.Lookup(gcfgTag); ok { - hasTag = true - tagParts := strings.Split(tagVal, ",") - lenTagParts := len(tagParts) - if lenTagParts > 0 { - tagName := tagParts[0] - if len(tagName) > 0 && tagName != "-" { - name = tagName - } - } - if lenTagParts > 1 { - omitEmpty = tagParts[1] == "omitempty" - } - } - - return name, omitEmpty, hasTag -} - -// UnmarshalINIOptions defines the options used to influence how INI data is -// unmarshalled. -// -// +kubebuilder:object:generate=false -type UnmarshalINIOptions struct { - // WarnAsFatal indicates that warnings that occur when unmarshalling INI - // data should be treated as fatal errors. - WarnAsFatal bool -} - -// UnmarshalINIOptionFunc is used to set unmarshal options. -// -// +kubebuilder:object:generate=false -type UnmarshalINIOptionFunc func(*UnmarshalINIOptions) - -// WarnAsFatal sets the option to treat warnings as fatal errors when -// unmarshalling INI data. -func WarnAsFatal(opts *UnmarshalINIOptions) { - opts.WarnAsFatal = true -} - -// UnmarshalINI unmarshals the cloud provider configuration from INI-style -// configuration data. -func (c *CPIConfig) UnmarshalINI(data []byte, optFuncs ...UnmarshalINIOptionFunc) error { - opts := &UnmarshalINIOptions{} - for _, setOpts := range optFuncs { - setOpts(opts) - } - var config unmarshallableConfig - if err := gcfg.ReadStringInto(&config, string(data)); err != nil { - if opts.WarnAsFatal { - return err - } - if err := gcfg.FatalOnly(err); err != nil { - return err - } - } - c.Global = config.Global - c.Network = config.Network - c.Disk = config.Disk - c.Workspace = config.Workspace - c.Labels = config.Labels - c.VCenter = map[string]CPIVCenterConfig{} - for k, v := range config.VCenter { - c.VCenter[k] = *v - } - return nil -} - -// IsEmpty returns true if an object is its empty value or if a struct, all of -// its fields are their empty values. -func IsEmpty(obj interface{}) bool { - return isEmpty(reflect.ValueOf(obj)) -} - -// IsNotEmpty returns true when IsEmpty returns false. -func IsNotEmpty(obj interface{}) bool { - return !IsEmpty(obj) -} - -// isEmpty returns true if an object's fields are all set to their empty values. -func isEmpty(val reflect.Value) bool { - switch val.Kind() { - case reflect.Interface, reflect.Ptr: - return val.IsNil() || isEmpty(val.Elem()) - - case reflect.Struct: - structIsEmpty := true - for fieldIndex := 0; fieldIndex < val.NumField(); fieldIndex++ { - if structIsEmpty = isEmpty(val.Field(fieldIndex)); !structIsEmpty { - break - } - } - return structIsEmpty - - case reflect.Array, reflect.String: - return val.Len() == 0 - - case reflect.Bool: - return !val.Bool() - - case reflect.Map, reflect.Slice: - return val.IsNil() || val.Len() == 0 - - case reflect.Float32, reflect.Float64: - return val.Float() == 0 - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return val.Int() == 0 - - default: - panic(errors.Errorf("invalid kind: %s", val.Kind())) - } -} - -// MarshalCloudProviderArgs marshals the cloud provider arguments for passing -// into a pod spec. -func (cpic *CPICloudConfig) MarshalCloudProviderArgs() []string { - args := []string{ - "--v=2", - "--cloud-provider=vsphere", - "--cloud-config=/etc/cloud/vsphere.conf", - } - if cpic.ExtraArgs != nil { - for k, v := range cpic.ExtraArgs { - args = append(args, fmt.Sprintf("--%s=%s", k, v)) - } - } - return args -} diff --git a/apis/v1alpha3/cloudprovider_encoding_test.go b/apis/v1alpha3/cloudprovider_encoding_test.go deleted file mode 100644 index 86f8e50f54..0000000000 --- a/apis/v1alpha3/cloudprovider_encoding_test.go +++ /dev/null @@ -1,723 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3_test - -import ( - "fmt" - "testing" - - "github.com/onsi/gomega" - "github.com/pkg/errors" - - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3" -) - -var unmarshalWarnAsFatal = []infrav1alpha3.UnmarshalINIOptionFunc{infrav1alpha3.WarnAsFatal} - -func errDeprecated(section, key string) error { - return errors.Errorf("warning:\ncan't store data at section \"%s\", variable \"%s\"\n", section, key) //nolint:revive -} - -type codecTestCase struct { - testName string - iniString string - configObj infrav1alpha3.CPIConfig - expectedError error - unmarshalOptions []infrav1alpha3.UnmarshalINIOptionFunc -} - -func TestMarshalINI(t *testing.T) { - g := gomega.NewGomegaWithT(t) - - testcases := []codecTestCase{ - { - testName: "Username and password in global section", - iniString: `[Global] -user = "user" -password = "password" -datacenters = "us-west" -cluster-id = "cluster-namespace/cluster-name" - -[VirtualCenter "0.0.0.0"] - -[Workspace] -server = "0.0.0.0" -datacenter = "us-west" -folder = "kubernetes" -default-datastore = "default" - -`, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Username: "user", - Password: "password", - Datacenters: "us-west", - ClusterID: "cluster-namespace/cluster-name", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": {}, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - Datastore: "default", - }, - }, - }, - { - testName: "Username and password in vCenter section", - iniString: `[Global] -insecure-flag = true -port = "443" -datacenters = "us-west" - -[VirtualCenter "0.0.0.0"] -user = "user" -password = "password" - -[Workspace] -server = "0.0.0.0" -datacenter = "us-west" -folder = "kubernetes" - -`, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Port: "443", - Insecure: true, - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Username: "user", - Password: "password", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "SecretName and SecretNamespace", - iniString: `[Global] -secret-name = "vccreds" -secret-namespace = "kube-system" -datacenters = "us-west" - -[VirtualCenter "0.0.0.0"] - -[Workspace] -server = "0.0.0.0" -datacenter = "us-west" -folder = "kubernetes" - -`, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - SecretName: "vccreds", - SecretNamespace: "kube-system", - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": {}, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "SecretName and SecretNamespace with Username missing", - iniString: `[Global] -insecure-flag = true -secret-name = "vccreds" -secret-namespace = "kube-system" -port = "443" -datacenters = "us-west" - -[VirtualCenter "0.0.0.0"] -password = "password" - -[Workspace] -server = "0.0.0.0" -datacenter = "us-west" -folder = "kubernetes" - -`, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Port: "443", - Insecure: true, - SecretName: "vccreds", - SecretNamespace: "kube-system", - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Password: "password", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "Multiple virtual centers with different thumbprints", - iniString: `[Global] -user = "user" -password = "password" -datacenters = "us-west" - -[VirtualCenter "0.0.0.0"] -thumbprint = "thumbprint:0" - -[VirtualCenter "1.1.1.1"] -thumbprint = "thumbprint:1" - -[VirtualCenter "no_thumbprint"] - -[Workspace] -server = "0.0.0.0" -datacenter = "us-west" -folder = "kubernetes" - -`, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Username: "user", - Password: "password", - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Thumbprint: "thumbprint:0", - }, - "no_thumbprint": {}, - "1.1.1.1": { - Thumbprint: "thumbprint:1", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "Multiple vCenters using global CA cert", - iniString: `[Global] -secret-name = "vccreds" -secret-namespace = "kube-system" -ca-file = "/some/path/to/my/trusted/ca.pem" -datacenters = "us-west" - -[VirtualCenter "0.0.0.0"] - -[VirtualCenter "1.1.1.1"] - -[Workspace] -server = "0.0.0.0" -datacenter = "us-west" -folder = "kubernetes" - -`, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Datacenters: "us-west", - SecretName: "vccreds", - SecretNamespace: "kube-system", - CAFile: "/some/path/to/my/trusted/ca.pem", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": {}, - "1.1.1.1": {}, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - ProviderConfig: infrav1alpha3.CPIProviderConfig{ - Cloud: &infrav1alpha3.CPICloudConfig{ - ControllerImage: "test", - }, - }, - }, - }, - } - - for _, tc := range testcases { - tc := tc - t.Run(tc.testName, func(t *testing.T) { - buf, err := tc.configObj.MarshalINI() - if err != nil { - if tc.expectedError == nil { - g.Expect(err).ShouldNot( - gomega.HaveOccurred(), - "unexpected error when marshalling data") - } else { - g.Expect(err.Error()).Should( - gomega.Equal(tc.expectedError.Error()), - "unexpected error when marshalling data") - } - } - - g.Expect(string(buf)).To(gomega.Equal(tc.iniString), - "marshalled config does not match") - }) - } -} - -func TestUnmarshalINI(t *testing.T) { - g := gomega.NewGomegaWithT(t) - - deprecatedTestCases := []codecTestCase{ - { - testName: "Global server is deprecated", - iniString: ` - [Global] - server = "deprecated" - `, - expectedError: errDeprecated("Global", "server"), - unmarshalOptions: unmarshalWarnAsFatal, - }, - { - testName: "Global datacenter is deprecated", - iniString: ` - [Global] - datacenter = "deprecated" - `, - expectedError: errDeprecated("Global", "datacenter"), - unmarshalOptions: unmarshalWarnAsFatal, - }, - { - - testName: "Global datastore is deprecated", - iniString: ` - [Global] - datastore = "deprecated" - `, - expectedError: errDeprecated("Global", "datastore"), - unmarshalOptions: unmarshalWarnAsFatal, - }, - { - testName: "Global working-dir is deprecated", - iniString: ` - [Global] - working-dir = "deprecated" - `, - expectedError: errDeprecated("Global", "working-dir"), - unmarshalOptions: unmarshalWarnAsFatal, - }, - { - testName: "Global vm-name is deprecated", - iniString: ` - [Global] - vm-name = "deprecated" - `, - expectedError: errDeprecated("Global", "vm-name"), - unmarshalOptions: unmarshalWarnAsFatal, - }, - { - testName: "Global vm-uuid is deprecated", - iniString: ` - [Global] - vm-uuid = "deprecated" - `, - expectedError: errDeprecated("Global", "vm-uuid"), - unmarshalOptions: unmarshalWarnAsFatal, - }, - } - - testcases := []codecTestCase{ - { - testName: "Username and password in global section", - iniString: ` - [Global] - user = "user" - password = "password" - datacenters = "us-west" - cluster-id = "cluster-namespace/cluster-name" - - [VirtualCenter "0.0.0.0"] - - [Workspace] - server = "0.0.0.0" - datacenter = "us-west" - folder = "kubernetes" - default-datastore = "default" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Username: "user", - Password: "password", - Datacenters: "us-west", - ClusterID: "cluster-namespace/cluster-name", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": {}, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - Datastore: "default", - }, - }, - }, - { - testName: "Username and password in vCenter section", - iniString: ` - [Global] - port = "443" - insecure-flag = true - datacenters = "us-west" - - [VirtualCenter "0.0.0.0"] - user = "user" - password = "password" - - [Workspace] - server = 0.0.0.0 - datacenter = "us-west" - folder = "kubernetes" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Port: "443", - Insecure: true, - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Username: "user", - Password: "password", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "NetBIOS style AD username and password in vCenter section", - iniString: ` - [Global] - port = "443" - insecure-flag = true - datacenters = "us-west" - - [VirtualCenter "0.0.0.0"] - user = "domain\\user" - password = "password" - - [Workspace] - server = 0.0.0.0 - datacenter = "us-west" - folder = "kubernetes" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Port: "443", - Insecure: true, - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Username: "domain\\user", - Password: "password", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "SecretName and SecretNamespace", - iniString: ` - [Global] - secret-name = "vccreds" - secret-namespace = "kube-system" - datacenters = "us-west" - - [VirtualCenter "0.0.0.0"] - - [Workspace] - server = "0.0.0.0" - datacenter = "us-west" - folder = "kubernetes" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - SecretName: "vccreds", - SecretNamespace: "kube-system", - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": {}, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "SecretName and SecretNamespace with Username missing", - iniString: ` - [Global] - port = "443" - insecure-flag = true - datacenters = "us-west" - secret-name = "vccreds" - secret-namespace = "kube-system" - - [VirtualCenter "0.0.0.0"] - password = "password" - - [Workspace] - server = "0.0.0.0" - datacenter = "us-west" - folder = "kubernetes" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Port: "443", - Insecure: true, - SecretName: "vccreds", - SecretNamespace: "kube-system", - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Password: "password", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "Multiple virtual centers with different thumbprints", - iniString: ` - [Global] - user = "user" - password = "password" - datacenters = "us-west" - - [VirtualCenter "0.0.0.0"] - thumbprint = "thumbprint:0" - - [VirtualCenter "no_thumbprint"] - - [VirtualCenter "1.1.1.1"] - thumbprint = "thumbprint:1" - - [Workspace] - server = "0.0.0.0" - datacenter = "us-west" - folder = "kubernetes" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Username: "user", - Password: "password", - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Thumbprint: "thumbprint:0", - }, - "no_thumbprint": {}, - "1.1.1.1": { - Thumbprint: "thumbprint:1", - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - { - testName: "Multiple vCenters using global CA cert", - iniString: ` - [Global] - datacenters = "us-west" - secret-name = "vccreds" - secret-namespace = "kube-system" - ca-file = "/some/path/to/my/trusted/ca.pem" - - [VirtualCenter "0.0.0.0"] - [VirtualCenter "1.1.1.1"] - - [Workspace] - server = "0.0.0.0" - datacenter = "us-west" - folder = "kubernetes" - `, - configObj: infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Datacenters: "us-west", - SecretName: "vccreds", - SecretNamespace: "kube-system", - CAFile: "/some/path/to/my/trusted/ca.pem", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": {}, - "1.1.1.1": {}, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - }, - }, - } - - testCases := append( - testcases, - deprecatedTestCases..., - ) - - for _, tc := range testCases { - tc := tc - t.Run(tc.testName, func(t *testing.T) { - var actualConfig infrav1alpha3.CPIConfig - - if err := actualConfig.UnmarshalINI( - []byte(tc.iniString), - tc.unmarshalOptions...); err != nil { - if tc.expectedError == nil { - g.Expect(err).ShouldNot( - gomega.HaveOccurred(), - "unexpected error when unmarshalling data") - } else { - g.Expect(err.Error()).Should( - gomega.Equal(tc.expectedError.Error()), - "unexpected error when unmarshalling data") - } - } - - g.Expect(actualConfig).Should( - gomega.Equal(tc.configObj), - "actual config does not match expected config") - }) - } -} - -type passwordTestCase struct { - testName string - iniEncodedString string - expectedString string -} - -func TestPasswords(t *testing.T) { - g := gomega.NewGomegaWithT(t) - - testCases := []passwordTestCase{ - { - testName: "password contains backslash", - iniEncodedString: "pass\\\\word", - expectedString: "pass\\word", - }, - { - testName: "password contains quotation mark", - iniEncodedString: "pass\\\"word", - expectedString: "pass\"word", - }, - { - testName: "password contains tab", - iniEncodedString: "pass\\tword", - expectedString: "pass\tword", - }, - { - testName: "password contains allowed characters for Microsoft Active Directory including Unicode", - iniEncodedString: "0123456789abczABCZ~!@#$%^&*_-+=`|\\\\(){}[]:;\\\"'<>,.?/€Пассворд密码🌟", - expectedString: "0123456789abczABCZ~!@#$%^&*_-+=`|\\(){}[]:;\"'<>,.?/€Пассворд密码🌟", - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.testName, func(t *testing.T) { - var actualConfig infrav1alpha3.CPIConfig - - iniString := ` - [Global] - port = "443" - insecure-flag = true - datacenters = "us-west" - - [VirtualCenter "0.0.0.0"] - user = "user" - password = "%s" - - [Workspace] - server = 0.0.0.0 - datacenter = "us-west" - folder = "kubernetes" -` - expectedConfig := infrav1alpha3.CPIConfig{ - Global: infrav1alpha3.CPIGlobalConfig{ - Port: "443", - Insecure: true, - Datacenters: "us-west", - }, - VCenter: map[string]infrav1alpha3.CPIVCenterConfig{ - "0.0.0.0": { - Username: "user", - Password: tc.expectedString, - }, - }, - Workspace: infrav1alpha3.CPIWorkspaceConfig{ - Server: "0.0.0.0", - Datacenter: "us-west", - Folder: "kubernetes", - }, - } - - err := actualConfig.UnmarshalINI([]byte(fmt.Sprintf(iniString, tc.iniEncodedString))) - g.Expect(err).ToNot(gomega.HaveOccurred()) - - g.Expect(actualConfig).Should( - gomega.Equal(expectedConfig), - "actual config does not match expected config") - }) - } -} diff --git a/apis/v1alpha3/cloudprovider_types.go b/apis/v1alpha3/cloudprovider_types.go deleted file mode 100644 index 66b6b1ea00..0000000000 --- a/apis/v1alpha3/cloudprovider_types.go +++ /dev/null @@ -1,255 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// cloudprovider_types contains API types for the vSphere cloud provider. -// The configuration may be unmarshalled from an INI-style configuration using -// the "gopkg.in/gcfg.v1" package. -// -// The configuration may be marshalled to an INI-style configuration using a Go -// template. -// -// The "gopkg.in/go-ini/ini.v1" package was investigated, but it does not -// support reflecting a struct with a field of type "map[string]TYPE" to INI. - -package v1alpha3 - -// CPIConfig is the vSphere cloud provider's configuration. -// -// Deprecated: will be removed in v1alpha4. -type CPIConfig struct { - // Global is the vSphere cloud provider's global configuration. - // +optional - Global CPIGlobalConfig `gcfg:"Global,omitempty" json:"global,omitempty"` - - // VCenter is a list of vCenter configurations. - // +optional - VCenter map[string]CPIVCenterConfig `gcfg:"VirtualCenter,omitempty" json:"virtualCenter,omitempty"` - - // Network is the vSphere cloud provider's network configuration. - // +optional - Network CPINetworkConfig `gcfg:"Network,omitempty" json:"network,omitempty"` - - // Disk is the vSphere cloud provider's disk configuration. - // +optional - Disk CPIDiskConfig `gcfg:"Disk,omitempty" json:"disk,omitempty"` - - // Workspace is the vSphere cloud provider's workspace configuration. - // +optional - Workspace CPIWorkspaceConfig `gcfg:"Workspace,omitempty" json:"workspace,omitempty"` - - // Labels is the vSphere cloud provider's zone and region configuration. - // +optional - Labels CPILabelConfig `gcfg:"Labels,omitempty" json:"labels,omitempty"` - - // CPIProviderConfig contains extra information used to configure the - // vSphere cloud provider. - ProviderConfig CPIProviderConfig `json:"providerConfig,omitempty"` -} - -// CPIProviderConfig defines any extra information used to configure -// the vSphere external cloud provider. -type CPIProviderConfig struct { - Cloud *CPICloudConfig `json:"cloud,omitempty"` - Storage *CPIStorageConfig `json:"storage,omitempty"` -} - -type CPICloudConfig struct { - ControllerImage string `json:"controllerImage,omitempty"` - // ExtraArgs passes through extra arguments to the cloud provider. - // The arguments here are passed to the cloud provider daemonset specification - // +optional - ExtraArgs map[string]string `json:"extraArgs,omitempty"` -} - -type CPIStorageConfig struct { - ControllerImage string `json:"controllerImage,omitempty"` - NodeDriverImage string `json:"nodeDriverImage,omitempty"` - AttacherImage string `json:"attacherImage,omitempty"` - ProvisionerImage string `json:"provisionerImage,omitempty"` - MetadataSyncerImage string `json:"metadataSyncerImage,omitempty"` - LivenessProbeImage string `json:"livenessProbeImage,omitempty"` - RegistrarImage string `json:"registrarImage,omitempty"` -} - -// unmarshallableConfig is used to unmarshal the INI data using the gcfg -// package. The package requires fields with map types use *Values. However, -// kubebuilder v2 won't generate CRDs for map types with *Values. -type unmarshallableConfig struct { - Global CPIGlobalConfig `gcfg:"Global,omitempty"` - VCenter map[string]*CPIVCenterConfig `gcfg:"VirtualCenter,omitempty"` - Network CPINetworkConfig `gcfg:"Network,omitempty"` - Disk CPIDiskConfig `gcfg:"Disk,omitempty"` - Workspace CPIWorkspaceConfig `gcfg:"Workspace,omitempty"` - Labels CPILabelConfig `gcfg:"Labels,omitempty"` -} - -// CPIGlobalConfig is the vSphere cloud provider's global configuration. -type CPIGlobalConfig struct { - // Insecure is a flag that disables TLS peer verification. - // +optional - Insecure bool `gcfg:"insecure-flag,omitempty" json:"insecure,omitempty"` - - // RoundTripperCount specifies the SOAP round tripper count - // (retries = RoundTripper - 1) - // +optional - RoundTripperCount int32 `gcfg:"soap-roundtrip-count,omitempty" json:"roundTripperCount,omitempty"` - - // Username is the username used to access a vSphere endpoint. - // +optional - Username string `gcfg:"user,omitempty" json:"username,omitempty"` - - // Password is the password used to access a vSphere endpoint. - // +optional - Password string `gcfg:"password,omitempty" json:"password,omitempty"` - - // SecretName is the name of the Kubernetes secret in which the vSphere - // credentials are located. - // +optional - SecretName string `gcfg:"secret-name,omitempty" json:"secretName,omitempty"` - - // SecretNamespace is the namespace for SecretName. - // +optional - SecretNamespace string `gcfg:"secret-namespace,omitempty" json:"secretNamespace,omitempty"` - - // Port is the port on which the vSphere endpoint is listening. - // Defaults to 443. - // +optional - Port string `gcfg:"port,omitempty" json:"port,omitempty"` - - // CAFile Specifies the path to a CA certificate in PEM format. - // If not configured, the system's CA certificates will be used. - // +optional - CAFile string `gcfg:"ca-file,omitempty" json:"caFile,omitempty"` - - // Thumbprint is the cryptographic thumbprint of the vSphere endpoint's - // certificate. - // +optional - Thumbprint string `gcfg:"thumbprint,omitempty" json:"thumbprint,omitempty"` - - // Datacenters is a CSV string of the datacenters in which VMs are located. - // +optional - Datacenters string `gcfg:"datacenters,omitempty" json:"datacenters,omitempty"` - - // ServiceAccount is the Kubernetes service account used to launch the cloud - // controller manager. - // Defaults to cloud-controller-manager. - // +optional - ServiceAccount string `gcfg:"service-account,omitempty" json:"serviceAccount,omitempty"` - - // SecretsDirectory is a directory in which secrets may be found. This - // may used in the event that: - // 1. It is not desirable to use the K8s API to watch changes to secrets - // 2. The cloud controller manager is not running in a K8s environment, - // such as DC/OS. For example, the container storage interface (CSI) is - // container orcehstrator (CO) agnostic, and should support non-K8s COs. - // Defaults to /etc/cloud/credentials. - // +optional - SecretsDirectory string `gcfg:"secrets-directory,omitempty" json:"secretsDirectory,omitempty"` - - // APIDisable disables the vSphere cloud controller manager API. - // Defaults to true. - // +optional - APIDisable *bool `gcfg:"api-disable,omitempty" json:"apiDisable,omitempty"` - - // APIBindPort configures the vSphere cloud controller manager API port. - // Defaults to 43001. - // +optional - APIBindPort string `gcfg:"api-binding,omitempty" json:"apiBindPort,omitempty"` - - // ClusterID is a unique identifier for a cluster used by the vSphere CSI driver (CNS) - // NOTE: This field is set internally by CAPV and should not be set by any other consumer of this API - ClusterID string `gcfg:"cluster-id,omitempty" json:"-"` -} - -// CPIVCenterConfig is a vSphere cloud provider's vCenter configuration. -type CPIVCenterConfig struct { - // Username is the username used to access a vSphere endpoint. - // +optional - Username string `gcfg:"user,omitempty" json:"username,omitempty"` - - // Password is the password used to access a vSphere endpoint. - // +optional - Password string `gcfg:"password,omitempty" json:"password,omitempty"` - - // Port is the port on which the vSphere endpoint is listening. - // Defaults to 443. - // +optional - Port string `gcfg:"port,omitempty" json:"port,omitempty"` - - // Datacenters is a CSV string of the datacenters in which VMs are located. - // +optional - Datacenters string `gcfg:"datacenters,omitempty" json:"datacenters,omitempty"` - - // RoundTripperCount specifies the SOAP round tripper count - // (retries = RoundTripper - 1) - // +optional - RoundTripperCount int32 `gcfg:"soap-roundtrip-count,omitempty" json:"roundTripperCount,omitempty"` - - // Thumbprint is the cryptographic thumbprint of the vSphere endpoint's - // certificate. - // +optional - Thumbprint string `gcfg:"thumbprint,omitempty" json:"thumbprint,omitempty"` -} - -// CPINetworkConfig is the network configuration for the vSphere cloud provider. -type CPINetworkConfig struct { - // Name is the name of the network to which VMs are connected. - // +optional - Name string `gcfg:"public-network,omitempty" json:"name,omitempty"` -} - -// CPIDiskConfig defines the disk configuration for the vSphere cloud provider. -type CPIDiskConfig struct { - // SCSIControllerType defines SCSI controller to be used. - // +optional - SCSIControllerType string `gcfg:"scsicontrollertype,omitempty" json:"scsiControllerType,omitempty"` -} - -// CPIWorkspaceConfig defines a workspace configuration for the vSphere cloud -// provider. -type CPIWorkspaceConfig struct { - // Server is the IP address or FQDN of the vSphere endpoint. - // +optional - Server string `gcfg:"server,omitempty" json:"server,omitempty"` - - // Datacenter is the datacenter in which VMs are created/located. - // +optional - Datacenter string `gcfg:"datacenter,omitempty" json:"datacenter,omitempty"` - - // Folder is the folder in which VMs are created/located. - // +optional - Folder string `gcfg:"folder,omitempty" json:"folder,omitempty"` - - // Datastore is the datastore in which VMs are created/located. - // +optional - Datastore string `gcfg:"default-datastore,omitempty" json:"datastore,omitempty"` - - // ResourcePool is the resource pool in which VMs are created/located. - // +optional - ResourcePool string `gcfg:"resourcepool-path,omitempty" json:"resourcePool,omitempty"` -} - -// CPILabelConfig defines the categories and tags which correspond to built-in -// node labels, zone and region. -type CPILabelConfig struct { - // Zone is the zone in which VMs are created/located. - // +optional - Zone string `gcfg:"zone,omitempty" json:"zone,omitempty"` - - // Region is the region in which VMs are created/located. - // +optional - Region string `gcfg:"region,omitempty" json:"region,omitempty"` -} diff --git a/apis/v1alpha3/conversion.go b/apis/v1alpha3/conversion.go deleted file mode 100644 index 8cbe0dc91d..0000000000 --- a/apis/v1alpha3/conversion.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec(in *infrav1.VirtualMachineCloneSpec, out *VirtualMachineCloneSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec(in, out, s) -} - -// Convert_v1beta1_VSphereVMStatus_To_v1alpha3_VSphereVMStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereVMStatus_To_v1alpha3_VSphereVMStatus(in *infrav1.VSphereVMStatus, out *VSphereVMStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVMStatus_To_v1alpha3_VSphereVMStatus(in, out, s) -} - -func Convert_v1beta1_VSphereClusterStatus_To_v1alpha3_VSphereClusterStatus(in *infrav1.VSphereClusterStatus, out *VSphereClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterStatus_To_v1alpha3_VSphereClusterStatus(in, out, s) -} - -func Convert_v1beta1_VSphereClusterSpec_To_v1alpha3_VSphereClusterSpec(in *infrav1.VSphereClusterSpec, out *VSphereClusterSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterSpec_To_v1alpha3_VSphereClusterSpec(in, out, s) -} - -func Convert_v1beta1_VSphereMachineSpec_To_v1alpha3_VSphereMachineSpec(in *infrav1.VSphereMachineSpec, out *VSphereMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineSpec_To_v1alpha3_VSphereMachineSpec(in, out, s) -} - -func Convert_v1beta1_VSphereVMSpec_To_v1alpha3_VSphereVMSpec(in *infrav1.VSphereVMSpec, out *VSphereVMSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVMSpec_To_v1alpha3_VSphereVMSpec(in, out, s) -} diff --git a/apis/v1alpha3/conversion_test.go b/apis/v1alpha3/conversion_test.go deleted file mode 100644 index 59ecff2e6b..0000000000 --- a/apis/v1alpha3/conversion_test.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "testing" - - fuzz "github.com/google/gofuzz" - . "github.com/onsi/gomega" - "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" - "k8s.io/apimachinery/pkg/runtime" - runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -func TestFuzzyConversion(t *testing.T) { - g := NewWithT(t) - scheme := runtime.NewScheme() - g.Expect(AddToScheme(scheme)).To(Succeed()) - g.Expect(infrav1.AddToScheme(scheme)).To(Succeed()) - - t.Run("for VSphereCluster", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.VSphereCluster{}, - Spoke: &VSphereCluster{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{ - overrideVSphereClusterDeprecatedFieldsFuncs, - overrideVSphereClusterSpecFieldsFuncs, - overrideVSphereClusterStatusFieldsFuncs, - }, - })) - t.Run("for VSphereMachine", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.VSphereMachine{}, - Spoke: &VSphereMachine{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{CustomNewFieldFuzzFunc}, - })) - t.Run("for VSphereMachineTemplate", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.VSphereMachineTemplate{}, - Spoke: &VSphereMachineTemplate{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{CustomObjectMetaFuzzFunc, CustomNewFieldFuzzFunc}, - })) - t.Run("for VSphereVM", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.VSphereVM{}, - Spoke: &VSphereVM{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{CustomNewFieldFuzzFunc}, - })) -} - -func overrideVSphereClusterDeprecatedFieldsFuncs(runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - func(vsphereClusterSpec *VSphereClusterSpec, c fuzz.Continue) { - vsphereClusterSpec.CloudProviderConfiguration = CPIConfig{} - }, - } -} - -func overrideVSphereClusterSpecFieldsFuncs(runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - func(in *infrav1.VSphereClusterSpec, c fuzz.Continue) { - c.FuzzNoCustom(in) - in.ClusterModules = nil - in.FailureDomainSelector = nil - }, - } -} - -func overrideVSphereClusterStatusFieldsFuncs(runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - func(in *infrav1.VSphereClusterStatus, c fuzz.Continue) { - c.FuzzNoCustom(in) - in.VCenterVersion = "" - }, - } -} - -func CustomObjectMetaFuzzFunc(runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - CustomObjectMetaFuzzer, - } -} - -func CustomObjectMetaFuzzer(in *clusterv1alpha3.ObjectMeta, c fuzz.Continue) { - c.FuzzNoCustom(in) - - // These fields have been removed in v1alpha4 - // data is going to be lost, so we're forcing zero values here. - in.Name = "" - in.GenerateName = "" - in.Namespace = "" - in.OwnerReferences = nil -} - -func CustomNewFieldFuzzFunc(runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - CustomSpecNewFieldFuzzer, - CustomStatusNewFieldFuzzer, - } -} - -func CustomSpecNewFieldFuzzer(in *infrav1.VirtualMachineCloneSpec, c fuzz.Continue) { - c.FuzzNoCustom(in) - - in.PciDevices = nil - in.AdditionalDisksGiB = nil - in.OS = "" - in.HardwareVersion = "" -} - -func CustomStatusNewFieldFuzzer(in *infrav1.VSphereVMStatus, c fuzz.Continue) { - c.FuzzNoCustom(in) - - in.Host = "" - in.ModuleUUID = nil - in.VMRef = "" -} diff --git a/apis/v1alpha3/doc.go b/apis/v1alpha3/doc.go deleted file mode 100644 index 02cd2dc1bc..0000000000 --- a/apis/v1alpha3/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha3 contains API Schema definitions for the infrastructure v1alpha3 API group -// +kubebuilder:object:generate=true -// +groupName=infrastructure.cluster.x-k8s.io -// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1 -// -// Deprecated: This package will be removed in one of the next releases. -package v1alpha3 diff --git a/apis/v1alpha3/groupversion_info.go b/apis/v1alpha3/groupversion_info.go deleted file mode 100644 index ddf8a54019..0000000000 --- a/apis/v1alpha3/groupversion_info.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - // Version is the API version. - Version = "v1alpha3" - - // GroupName is the name of the API group. - GroupName = "infrastructure.cluster.x-k8s.io" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} - - // schemeBuilder is used to add go types to the GroupVersionKind scheme. - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = schemeBuilder.AddToScheme - - // objectTypes contains all types to be registered to the GroupVersion. - objectTypes = []runtime.Object{} - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = schemeBuilder -) - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, objectTypes...) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/apis/v1alpha3/haproxyloadbalancer_conversion.go b/apis/v1alpha3/haproxyloadbalancer_conversion.go deleted file mode 100644 index 8c556d3b7e..0000000000 --- a/apis/v1alpha3/haproxyloadbalancer_conversion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -// Hub marks HAProxyLoadBalancer as a conversion hub. -func (*HAProxyLoadBalancer) Hub() {} - -// Hub marks HAProxyLoadBalancerList as a conversion hub. -func (*HAProxyLoadBalancerList) Hub() {} diff --git a/apis/v1alpha3/haproxyloadbalancer_types.go b/apis/v1alpha3/haproxyloadbalancer_types.go deleted file mode 100644 index c821ef018f..0000000000 --- a/apis/v1alpha3/haproxyloadbalancer_types.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - // HAProxyLoadBalancerFinalizer allows a reconciler to clean up - // resources associated with an HAProxyLoadBalancer before removing - // it from the API server. - HAProxyLoadBalancerFinalizer = "haproxyloadbalancer.infrastructure.cluster.x-k8s.io" -) - -// HAProxyLoadBalancerSpec defines the desired state of HAProxyLoadBalancer. -type HAProxyLoadBalancerSpec struct { - // VirtualMachineConfiguration is information used to deploy a load balancer - // VM. - VirtualMachineConfiguration VirtualMachineCloneSpec `json:"virtualMachineConfiguration"` - - // SSHUser specifies the name of a user that is granted remote access to the - // deployed VM. - // +optional - User *SSHUser `json:"user,omitempty"` -} - -// HAProxyLoadBalancerStatus defines the observed state of HAProxyLoadBalancer. -type HAProxyLoadBalancerStatus struct { - // Ready indicates whether or not the load balancer is ready. - // - // This field is required as part of the Portable Load Balancer model and is - // inspected via an unstructured reader by other controllers to determine - // the status of the load balancer. - // - // +optional - Ready bool `json:"ready,omitempty"` - - // Address is the IP address or DNS name of the load balancer. - // - // This field is required as part of the Portable Load Balancer model and is - // inspected via an unstructured reader by other controllers to determine - // the status of the load balancer. - // - // +optional - Address string `json:"address,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=haproxyloadbalancers,scope=Namespaced -// +kubebuilder:subresource:status - -// HAProxyLoadBalancer is the Schema for the haproxyloadbalancers API -// -// Deprecated: This type will be removed in v1alpha4. -type HAProxyLoadBalancer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec HAProxyLoadBalancerSpec `json:"spec,omitempty"` - Status HAProxyLoadBalancerStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// HAProxyLoadBalancerList contains a list of HAProxyLoadBalancer -// -// Deprecated: This type will be removed in one of the next releases. -type HAProxyLoadBalancerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []HAProxyLoadBalancer `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &HAProxyLoadBalancer{}, &HAProxyLoadBalancerList{}) -} diff --git a/apis/v1alpha3/networkdevicespec_conversion.go b/apis/v1alpha3/networkdevicespec_conversion.go deleted file mode 100644 index 15c37283e1..0000000000 --- a/apis/v1alpha3/networkdevicespec_conversion.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -func Convert_v1beta1_NetworkDeviceSpec_To_v1alpha3_NetworkDeviceSpec(in *infrav1.NetworkDeviceSpec, out *NetworkDeviceSpec, s conversion.Scope) error { - out.NetworkName = in.NetworkName - out.DeviceName = in.DeviceName - out.DHCP4 = in.DHCP4 - out.DHCP6 = in.DHCP6 - out.Gateway4 = in.Gateway4 - out.Gateway6 = in.Gateway6 - out.IPAddrs = in.IPAddrs - out.MTU = in.MTU - out.MACAddr = in.MACAddr - out.Nameservers = in.Nameservers - out.SearchDomains = in.SearchDomains - if in.Routes != nil { - inRoutes, outRoutes := &in.Routes, &out.Routes - *outRoutes = make([]NetworkRouteSpec, len(*inRoutes)) - for i := range *inRoutes { - if err := Convert_v1beta1_NetworkRouteSpec_To_v1alpha3_NetworkRouteSpec(&(*inRoutes)[i], &(*outRoutes)[i], s); err != nil { - return err - } - } - } else { - out.Routes = nil - } - return nil -} diff --git a/apis/v1alpha3/types.go b/apis/v1alpha3/types.go deleted file mode 100644 index c1ba06f1c0..0000000000 --- a/apis/v1alpha3/types.go +++ /dev/null @@ -1,355 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha3 - -import ( - "fmt" - - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -const ( - // AnnotationClusterInfrastructureReady indicates the cluster's - // infrastructure sources are ready and machines may be created. - AnnotationClusterInfrastructureReady = "vsphere.infrastructure.cluster.x-k8s.io/infrastructure-ready" - - // AnnotationControlPlaneReady indicates the cluster's control plane is - // ready. - AnnotationControlPlaneReady = "vsphere.infrastructure.cluster.x-k8s.io/control-plane-ready" - - // ValueReady is the ready value for *Ready annotations. - ValueReady = "true" -) - -// CloneMode is the type of clone operation used to clone a VM from a template. -type CloneMode string - -const ( - // FullClone indicates a VM will have no relationship to the source of the - // clone operation once the operation is complete. This is the safest clone - // mode, but it is not the fastest. - FullClone CloneMode = "fullClone" - - // LinkedClone means resulting VMs will be dependent upon the snapshot of - // the source VM/template from which the VM was cloned. This is the fastest - // clone mode, but it also prevents expanding a VMs disk beyond the size of - // the source VM/template. - LinkedClone CloneMode = "linkedClone" -) - -// VirtualMachineCloneSpec is information used to clone a virtual machine. -type VirtualMachineCloneSpec struct { - // Template is the name or inventory path of the template used to clone - // the virtual machine. - // +kubebuilder:validation:MinLength=1 - Template string `json:"template"` - - // CloneMode specifies the type of clone operation. - // The LinkedClone mode is only support for templates that have at least - // one snapshot. If the template has no snapshots, then CloneMode defaults - // to FullClone. - // When LinkedClone mode is enabled the DiskGiB field is ignored as it is - // not possible to expand disks of linked clones. - // Defaults to LinkedClone, but fails gracefully to FullClone if the source - // of the clone operation has no snapshots. - // +optional - CloneMode CloneMode `json:"cloneMode,omitempty"` - - // Snapshot is the name of the snapshot from which to create a linked clone. - // This field is ignored if LinkedClone is not enabled. - // Defaults to the source's current snapshot. - // +optional - Snapshot string `json:"snapshot,omitempty"` - - // Server is the IP address or FQDN of the vSphere server on which - // the virtual machine is created/located. - // +optional - Server string `json:"server,omitempty"` - - // Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - // When this is set to empty, this VirtualMachine would be created - // without TLS certificate validation of the communication between Cluster API Provider vSphere - // and the VMware vCenter server. - // +optional - Thumbprint string `json:"thumbprint,omitempty"` - - // Datacenter is the name or inventory path of the datacenter in which the - // virtual machine is created/located. - // +optional - Datacenter string `json:"datacenter,omitempty"` - - // Folder is the name or inventory path of the folder in which the - // virtual machine is created/located. - // +optional - Folder string `json:"folder,omitempty"` - - // Datastore is the name or inventory path of the datastore in which the - // virtual machine is created/located. - // +optional - Datastore string `json:"datastore,omitempty"` - - // StoragePolicyName of the storage policy to use with this - // Virtual Machine - // +optional - StoragePolicyName string `json:"storagePolicyName,omitempty"` - - // ResourcePool is the name or inventory path of the resource pool in which - // the virtual machine is created/located. - // +optional - ResourcePool string `json:"resourcePool,omitempty"` - - // Network is the network configuration for this machine's VM. - Network NetworkSpec `json:"network"` - - // NumCPUs is the number of virtual processors in a virtual machine. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - NumCPUs int32 `json:"numCPUs,omitempty"` - // NumCPUs is the number of cores among which to distribute CPUs in this - // virtual machine. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - NumCoresPerSocket int32 `json:"numCoresPerSocket,omitempty"` - // MemoryMiB is the size of a virtual machine's memory, in MiB. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - MemoryMiB int64 `json:"memoryMiB,omitempty"` - // DiskGiB is the size of a virtual machine's disk, in GiB. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - DiskGiB int32 `json:"diskGiB,omitempty"` - // CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - // Defaults to empty map - // +optional - CustomVMXKeys map[string]string `json:"customVMXKeys,omitempty"` -} - -// VSphereMachineTemplateResource describes the data needed to create a VSphereMachine from a template -type VSphereMachineTemplateResource struct { - - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - ObjectMeta clusterv1alpha3.ObjectMeta `json:"metadata,omitempty"` - - // Spec is the specification of the desired behavior of the machine. - Spec VSphereMachineSpec `json:"spec"` -} - -// VSphereMachineProviderConditionType is a valid value for VSphereMachineProviderCondition.Type -type VSphereMachineProviderConditionType string - -// Valid conditions for an VSphere machine instance -const ( - // MachineCreated indicates whether the machine has been created or not. If not, - // it should include a reason and message for the failure. - MachineCreated VSphereMachineProviderConditionType = "MachineCreated" -) - -// APIEndpoint represents a reachable Kubernetes API endpoint. -type APIEndpoint struct { - // The hostname on which the API server is serving. - Host string `json:"host"` - - // The port on which the API server is serving. - Port int32 `json:"port"` -} - -// IsZero returns true if either the host or the port are zero values. -func (v APIEndpoint) IsZero() bool { - return v.Host == "" || v.Port == 0 -} - -// String returns a formatted version HOST:PORT of this APIEndpoint. -func (v APIEndpoint) String() string { - return fmt.Sprintf("%s:%d", v.Host, v.Port) -} - -// NetworkSpec defines the virtual machine's network configuration. -type NetworkSpec struct { - // Devices is the list of network devices used by the virtual machine. - // TODO(akutz) Make sure at least one network matches the - // ClusterSpec.CloudProviderConfiguration.Network.Name - Devices []NetworkDeviceSpec `json:"devices"` - - // Routes is a list of optional, static routes applied to the virtual - // machine. - // +optional - Routes []NetworkRouteSpec `json:"routes,omitempty"` - - // PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - // server endpoint on this machine - // +optional - PreferredAPIServerCIDR string `json:"preferredAPIServerCidr,omitempty"` -} - -// NetworkDeviceSpec defines the network configuration for a virtual machine's -// network device. -type NetworkDeviceSpec struct { - // NetworkName is the name of the vSphere network to which the device - // will be connected. - NetworkName string `json:"networkName"` - - // DeviceName may be used to explicitly assign a name to the network device - // as it exists in the guest operating system. - // +optional - DeviceName string `json:"deviceName,omitempty"` - - // DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - // on this device. - // If true then IPAddrs should not contain any IPv4 addresses. - // +optional - DHCP4 bool `json:"dhcp4,omitempty"` - - // DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - // on this device. - // If true then IPAddrs should not contain any IPv6 addresses. - // +optional - DHCP6 bool `json:"dhcp6,omitempty"` - - // Gateway4 is the IPv4 gateway used by this device. - // Required when DHCP4 is false. - // +optional - Gateway4 string `json:"gateway4,omitempty"` - - // Gateway4 is the IPv4 gateway used by this device. - // Required when DHCP6 is false. - // +optional - Gateway6 string `json:"gateway6,omitempty"` - - // IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - // to this device. IP addresses must also specify the segment length in - // CIDR notation. - // Required when DHCP4 and DHCP6 are both false. - // +optional - IPAddrs []string `json:"ipAddrs,omitempty"` - - // MTU is the device’s Maximum Transmission Unit size in bytes. - // +optional - MTU *int64 `json:"mtu,omitempty"` - - // MACAddr is the MAC address used by this device. - // It is generally a good idea to omit this field and allow a MAC address - // to be generated. - // Please note that this value must use the VMware OUI to work with the - // in-tree vSphere cloud provider. - // +optional - MACAddr string `json:"macAddr,omitempty"` - - // Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - // nameservers. - // Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - // +optional - Nameservers []string `json:"nameservers,omitempty"` - - // Routes is a list of optional, static routes applied to the device. - // +optional - Routes []NetworkRouteSpec `json:"routes,omitempty"` - - // SearchDomains is a list of search domains used when resolving IP - // addresses with DNS. - // +optional - SearchDomains []string `json:"searchDomains,omitempty"` -} - -// NetworkRouteSpec defines a static network route. -type NetworkRouteSpec struct { - // To is an IPv4 or IPv6 address. - To string `json:"to"` - // Via is an IPv4 or IPv6 address. - Via string `json:"via"` - // Metric is the weight/priority of the route. - Metric int32 `json:"metric"` -} - -// NetworkStatus provides information about one of a VM's networks. -type NetworkStatus struct { - // Connected is a flag that indicates whether this network is currently - // connected to the VM. - Connected bool `json:"connected,omitempty"` - - // IPAddrs is one or more IP addresses reported by vm-tools. - // +optional - IPAddrs []string `json:"ipAddrs,omitempty"` - - // MACAddr is the MAC address of the network device. - MACAddr string `json:"macAddr"` - - // NetworkName is the name of the network. - // +optional - NetworkName string `json:"networkName,omitempty"` -} - -// VirtualMachineState describes the state of a VM. -type VirtualMachineState string - -const ( - // VirtualMachineStateNotFound is the string representing a VM that - // cannot be located. - VirtualMachineStateNotFound VirtualMachineState = "notfound" - - // VirtualMachineStatePending is the string representing a VM with an in-flight task. - VirtualMachineStatePending = "pending" - - // VirtualMachineStateReady is the string representing a powered-on VM with reported IP addresses. - VirtualMachineStateReady = "ready" -) - -// VirtualMachinePowerState describe the power state of a VM -type VirtualMachinePowerState string - -const ( - // VirtualMachinePowerStatePoweredOn is the string representing a VM in powered on state - VirtualMachinePowerStatePoweredOn VirtualMachinePowerState = "poweredOn" - - // VirtualMachinePowerStatePoweredOff is the string representing a VM in powered off state - VirtualMachinePowerStatePoweredOff = "poweredOff" - - // VirtualMachinePowerStateSuspended is the string representing a VM in suspended state - VirtualMachinePowerStateSuspended = "suspended" -) - -// VirtualMachine represents data about a vSphere virtual machine object. -type VirtualMachine struct { - // Name is the VM's name. - Name string `json:"name"` - - // BiosUUID is the VM's BIOS UUID. - BiosUUID string `json:"biosUUID"` - - // State is the VM's state. - State VirtualMachineState `json:"state"` - - // Network is the status of the VM's network devices. - Network []NetworkStatus `json:"network"` - - // VMRef is the VM's Managed Object Reference on vSphere. - VMRef string `json:"vmRef"` -} - -// SSHUser is granted remote access to a system. -type SSHUser struct { - // Name is the name of the SSH user. - Name string `json:"name"` - // AuthorizedKeys is one or more public SSH keys that grant remote access. - AuthorizedKeys []string `json:"authorizedKeys"` -} diff --git a/apis/v1alpha3/vspherecluster_conversion.go b/apis/v1alpha3/vspherecluster_conversion.go deleted file mode 100644 index a3875f0c6f..0000000000 --- a/apis/v1alpha3/vspherecluster_conversion.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereCluster to the Hub version (v1beta1). -func (src *VSphereCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereCluster) - if err := Convert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereCluster{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - if restored.Spec.IdentityRef != nil { - dst.Spec.IdentityRef = restored.Spec.IdentityRef - } - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereCluster. -func (dst *VSphereCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereCluster) - if err := Convert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - return nil -} - -// ConvertTo converts this VSphereClusterList to the Hub version (v1beta1). -func (src *VSphereClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterList) - return Convert_v1alpha3_VSphereClusterList_To_v1beta1_VSphereClusterList(src, dst, nil) -} - -// ConvertFrom converts this VSphereVM to the Hub version (v1beta1). -func (dst *VSphereClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterList) - return Convert_v1beta1_VSphereClusterList_To_v1alpha3_VSphereClusterList(src, dst, nil) -} - -func Convert_v1alpha3_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(in *VSphereClusterSpec, out *infrav1.VSphereClusterSpec, s apiconversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(in, out, s) -} diff --git a/apis/v1alpha3/vspherecluster_types.go b/apis/v1alpha3/vspherecluster_types.go deleted file mode 100644 index 4e0b1773a5..0000000000 --- a/apis/v1alpha3/vspherecluster_types.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -const ( - // ClusterFinalizer allows ReconcileVSphereCluster to clean up vSphere - // resources associated with VSphereCluster before removing it from the - // API server. - ClusterFinalizer = "vspherecluster.infrastructure.cluster.x-k8s.io" -) - -// VSphereClusterSpec defines the desired state of VSphereCluster. -type VSphereClusterSpec struct { - // Server is the address of the vSphere endpoint. - Server string `json:"server,omitempty"` - - // Insecure is a flag that controls whether to validate the - // vSphere server's certificate. - // - // Deprecated: will be removed in v1alpha4. - // +optional - Insecure *bool `json:"insecure,omitempty"` - - // Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - // When provided, Insecure should not be set to true - // +optional - Thumbprint string `json:"thumbprint,omitempty"` - - // CloudProviderConfiguration holds the cluster-wide configuration for the vSphere cloud provider. - // - // Deprecated: will be removed in v1alpha4. - CloudProviderConfiguration CPIConfig `json:"cloudProviderConfiguration,omitempty"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` - - // LoadBalancerRef may be used to enable a control plane load balancer - // for this cluster. - // When a LoadBalancerRef is provided, the VSphereCluster.Status.Ready field - // will not be true until the referenced resource is Status.Ready and has a - // non-empty Status.Address value. - // - // Deprecated: will be removed in v1alpha4. - // +optional - LoadBalancerRef *corev1.ObjectReference `json:"loadBalancerRef,omitempty"` - - // IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - // the identity to use when reconciling the cluster. - // +optional - IdentityRef *VSphereIdentityReference `json:"identityRef,omitempty"` -} - -// VSphereClusterStatus defines the observed state of VSphereClusterSpec. -type VSphereClusterStatus struct { - // +optional - Ready bool `json:"ready,omitempty"` - - // Conditions defines current service state of the VSphereCluster. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` - - // FailureDomains is a list of failure domain objects synced from the infrastructure provider. - FailureDomains clusterv1alpha3.FailureDomains `json:"failureDomains,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vsphereclusters,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for VSphereMachine" -// +kubebuilder:printcolumn:name="Server",type="string",JSONPath=".spec.server",description="Server is the address of the vSphere endpoint" -// +kubebuilder:printcolumn:name="ControlPlaneEndpoint",type="string",JSONPath=".spec.controlPlaneEndpoint[0]",description="API Endpoint",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine" - -// VSphereCluster is the Schema for the vsphereclusters API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereCluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereClusterSpec `json:"spec,omitempty"` - Status VSphereClusterStatus `json:"status,omitempty"` -} - -func (m *VSphereCluster) GetConditions() clusterv1alpha3.Conditions { - return m.Status.Conditions -} - -func (m *VSphereCluster) SetConditions(conditions clusterv1alpha3.Conditions) { - m.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereClusterList contains a list of VSphereCluster -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereCluster `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereCluster{}, &VSphereClusterList{}) -} diff --git a/apis/v1alpha3/vsphereclusteridentity_conversion.go b/apis/v1alpha3/vsphereclusteridentity_conversion.go deleted file mode 100644 index 82492a8033..0000000000 --- a/apis/v1alpha3/vsphereclusteridentity_conversion.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereClusterIdentity to the Hub version (v1beta1). -func (src *VSphereClusterIdentity) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterIdentity) - if err := Convert_v1alpha3_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(src, dst, nil); err != nil { - return err - } - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereClusterIdentity. -func (dst *VSphereClusterIdentity) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterIdentity) - if err := Convert_v1beta1_VSphereClusterIdentity_To_v1alpha3_VSphereClusterIdentity(src, dst, nil); err != nil { - return err - } - return nil -} - -// ConvertTo converts this VSphereClusterIdentityList to the Hub version (v1beta1). -func (src *VSphereClusterIdentityList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterIdentityList) - return Convert_v1alpha3_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereClusterIdentityList. -func (dst *VSphereClusterIdentityList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterIdentityList) - return Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha3_VSphereClusterIdentityList(src, dst, nil) -} diff --git a/apis/v1alpha3/vsphereclusteridentity_types.go b/apis/v1alpha3/vsphereclusteridentity_types.go deleted file mode 100644 index 0e01e926d8..0000000000 --- a/apis/v1alpha3/vsphereclusteridentity_types.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -const ( - // SecretIdentitySetFinalizer is the finalizer for VSphereCluster credentials secrets . - SecretIdentitySetFinalizer = "vspherecluster/infrastructure.cluster.x-k8s.io" -) - -type VSphereClusterIdentitySpec struct { - // SecretName references a Secret inside the controller namespace with the credentials to use - // +kubebuilder:validation:MinLength=1 - SecretName string `json:"secretName,omitempty"` - - // AllowedNamespaces is used to identify which namespaces are allowed to use this account. - // Namespaces can be selected with a label selector. - // If this object is nil, no namespaces will be allowed - // +optional - AllowedNamespaces *AllowedNamespaces `json:"allowedNamespaces,omitempty"` -} - -type VSphereClusterIdentityStatus struct { - // +optional - Ready bool `json:"ready,omitempty"` - - // Conditions defines current service state of the VSphereCluster. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -type AllowedNamespaces struct { - // Selector is a standard Kubernetes LabelSelector. A label query over a set of resources. - // +optional - Selector metav1.LabelSelector `json:"selector"` -} - -type VSphereIdentityKind string - -var ( - VSphereClusterIdentityKind = VSphereIdentityKind("VSphereClusterIdentity") - SecretKind = VSphereIdentityKind("Secret") -) - -type VSphereIdentityReference struct { - // Kind of the identity. Can either be VSphereClusterIdentity or Secret - // +kubebuilder:validation:Enum=VSphereClusterIdentity;Secret - Kind VSphereIdentityKind `json:"kind"` - - // Name of the identity. - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` -} - -func (c *VSphereClusterIdentity) GetConditions() clusterv1alpha3.Conditions { - return c.Status.Conditions -} - -func (c *VSphereClusterIdentity) SetConditions(conditions clusterv1alpha3.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vsphereclusteridentities,scope=Cluster,categories=cluster-api -// +kubebuilder:subresource:status - -// VSphereClusterIdentity defines the account to be used for reconciling clusters -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterIdentity struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereClusterIdentitySpec `json:"spec,omitempty"` - Status VSphereClusterIdentityStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereClusterIdentityList contains a list of VSphereClusterIdentity -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterIdentityList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereClusterIdentity `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereClusterIdentity{}, &VSphereClusterIdentityList{}) -} diff --git a/apis/v1alpha3/vspheredeploymentzone_conversion.go b/apis/v1alpha3/vspheredeploymentzone_conversion.go deleted file mode 100644 index 6e1ea2b225..0000000000 --- a/apis/v1alpha3/vspheredeploymentzone_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereDeploymentZone to the Hub version (v1beta1). -func (src *VSphereDeploymentZone) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereDeploymentZone) - return Convert_v1alpha3_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereDeploymentZone. -func (dst *VSphereDeploymentZone) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereDeploymentZone) - return Convert_v1beta1_VSphereDeploymentZone_To_v1alpha3_VSphereDeploymentZone(src, dst, nil) -} - -// ConvertTo converts this VSphereDeploymentZoneList to the Hub version (v1beta1). -func (src *VSphereDeploymentZoneList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereDeploymentZoneList) - return Convert_v1alpha3_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(src, dst, nil) -} - -// ConvertFrom converts this VSphereDeploymentZoneList to the Hub version (v1beta1). -func (dst *VSphereDeploymentZoneList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereDeploymentZoneList) - return Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha3_VSphereDeploymentZoneList(src, dst, nil) -} diff --git a/apis/v1alpha3/vspheredeploymentzone_types.go b/apis/v1alpha3/vspheredeploymentzone_types.go deleted file mode 100644 index cbb403469d..0000000000 --- a/apis/v1alpha3/vspheredeploymentzone_types.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -// VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone -type VSphereDeploymentZoneSpec struct { - - // Server is the address of the vSphere endpoint. - Server string `json:"server,omitempty"` - - // failureDomain is the name of the VSphereFailureDomain used for this VSphereDeploymentZone - FailureDomain string `json:"failureDomain,omitempty"` - - // ControlPlane determines if this failure domain is suitable for use by control plane machines. - // +optional - ControlPlane *bool `json:"controlPlane,omitempty"` - - // PlacementConstraint encapsulates the placement constraints - // used within this deployment zone. - PlacementConstraint PlacementConstraint `json:"placementConstraint"` -} - -// PlacementConstraint is the context information for VM placements within a failure domain -type PlacementConstraint struct { - // ResourcePool is the name or inventory path of the resource pool in which - // the virtual machine is created/located. - // +optional - ResourcePool string `json:"resourcePool,omitempty"` - - // Folder is the name or inventory path of the folder in which the - // virtual machine is created/located. - // +optional - Folder string `json:"folder,omitempty"` -} - -type Network struct { - // Name is the network name for this machine's VM. - Name string `json:"name,omitempty"` - - // DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - // +optional - DHCP4 *bool `json:"dhcp4,omitempty"` - - // DHCP6 indicates whether or not to use DHCP for IPv6 - // +optional - DHCP6 *bool `json:"dhcp6,omitempty"` -} - -type VSphereDeploymentZoneStatus struct { - // Ready is true when the VSphereDeploymentZone resource is ready. - // If set to false, it will be ignored by VSphereClusters - // +optional - Ready *bool `json:"ready,omitempty"` - - // Conditions defines current service state of the VSphereMachine. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspheredeploymentzones,scope=Cluster,categories=cluster-api -// +kubebuilder:subresource:status - -// VSphereDeploymentZone is the Schema for the vspheredeploymentzones API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereDeploymentZone struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereDeploymentZoneSpec `json:"spec,omitempty"` - Status VSphereDeploymentZoneStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereDeploymentZoneList contains a list of VSphereDeploymentZone -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereDeploymentZoneList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereDeploymentZone `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereDeploymentZone{}, &VSphereDeploymentZoneList{}) -} diff --git a/apis/v1alpha3/vspherefailuredomain_conversion.go b/apis/v1alpha3/vspherefailuredomain_conversion.go deleted file mode 100644 index 357490d221..0000000000 --- a/apis/v1alpha3/vspherefailuredomain_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereFailureDomain to the Hub version (v1beta1). -func (src *VSphereFailureDomain) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereFailureDomain) - return Convert_v1alpha3_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereFailureDomain. -func (dst *VSphereFailureDomain) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereFailureDomain) - return Convert_v1beta1_VSphereFailureDomain_To_v1alpha3_VSphereFailureDomain(src, dst, nil) -} - -// ConvertTo converts this VSphereFailureDomainList to the Hub version (v1beta1). -func (src *VSphereFailureDomainList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereFailureDomainList) - return Convert_v1alpha3_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(src, dst, nil) -} - -// ConvertFrom converts this VSphereFailureDomainList to the Hub version (v1beta1). -func (dst *VSphereFailureDomainList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereFailureDomainList) - return Convert_v1beta1_VSphereFailureDomainList_To_v1alpha3_VSphereFailureDomainList(src, dst, nil) -} diff --git a/apis/v1alpha3/vspherefailuredomain_types.go b/apis/v1alpha3/vspherefailuredomain_types.go deleted file mode 100644 index 004e94ca03..0000000000 --- a/apis/v1alpha3/vspherefailuredomain_types.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type FailureDomainType string - -const ( - HostGroupFailureDomain FailureDomainType = "HostGroup" - ComputeClusterFailureDomain FailureDomainType = "ComputeCluster" - DatacenterFailureDomain FailureDomainType = "Datacenter" -) - -// VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain -type VSphereFailureDomainSpec struct { - - // Region defines the name and type of a region - Region FailureDomain `json:"region"` - - // Zone defines the name and type of a zone - Zone FailureDomain `json:"zone"` - - // Topology is the what describes a given failure domain using vSphere constructs - Topology Topology `json:"topology"` -} - -type FailureDomain struct { - // Name is the name of the tag that represents this failure domain - Name string `json:"name"` - - // Type is the type of failure domain, the current values are "Datacenter", "ComputeCluster" and "HostGroup" - // +kubebuilder:validation:Enum=Datacenter;ComputeCluster;HostGroup - Type FailureDomainType `json:"type"` - - // TagCategory is the category used for the tag - TagCategory string `json:"tagCategory"` - - // AutoConfigure tags the Type which is specified in the Topology - AutoConfigure *bool `json:"autoConfigure,omitempty"` -} - -type Topology struct { - // The underlying infrastructure for this failure domain - // Datacenter as the failure domain - Datacenter string `json:"datacenter"` - - // ComputeCluster as the failure domain - // +optional - ComputeCluster *string `json:"computeCluster,omitempty"` - - // Hosts has information required for placement of machines on VSphere hosts. - // +optional - Hosts *FailureDomainHosts `json:"hosts,omitempty"` - - // Networks is the list of networks within this failure domain - // +optional - Networks []string `json:"networks,omitempty"` - - // Datastore is the name or inventory path of the datastore in which the - // virtual machine is created/located. - // +optional - Datastore string `json:"datastore,omitempty"` -} - -type FailureDomainHosts struct { - // VMGroupName is the name of the VM group - VMGroupName string `json:"vmGroupName"` - - // HostGroupName is the name of the Host group - HostGroupName string `json:"hostGroupName"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspherefailuredomains,scope=Cluster,categories=cluster-api - -// VSphereFailureDomain is the Schema for the vspherefailuredomains API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereFailureDomain struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereFailureDomainSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereFailureDomainList contains a list of VSphereFailureDomain -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereFailureDomainList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereFailureDomain `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereFailureDomain{}, &VSphereFailureDomainList{}) -} diff --git a/apis/v1alpha3/vspheremachine_conversion.go b/apis/v1alpha3/vspheremachine_conversion.go deleted file mode 100644 index c19bf2a35f..0000000000 --- a/apis/v1alpha3/vspheremachine_conversion.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereMachine to the Hub version (v1beta1). -func (src *VSphereMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachine) - if err := Convert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereMachine{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.AdditionalDisksGiB = restored.Spec.AdditionalDisksGiB - dst.Spec.TagIDs = restored.Spec.TagIDs - dst.Spec.PowerOffMode = restored.Spec.PowerOffMode - dst.Spec.GuestSoftPowerOffTimeout = restored.Spec.GuestSoftPowerOffTimeout - for i := range dst.Spec.Network.Devices { - dst.Spec.Network.Devices[i].AddressesFromPools = restored.Spec.Network.Devices[i].AddressesFromPools - dst.Spec.Network.Devices[i].DHCP4Overrides = restored.Spec.Network.Devices[i].DHCP4Overrides - dst.Spec.Network.Devices[i].DHCP6Overrides = restored.Spec.Network.Devices[i].DHCP6Overrides - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereMachine. -func (dst *VSphereMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachine) - if err := Convert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - return nil -} - -// ConvertTo converts this VSphereMachineList to the Hub version (v1beta1). -func (src *VSphereMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachineList) - return Convert_v1alpha3_VSphereMachineList_To_v1beta1_VSphereMachineList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereMachineList. -func (dst *VSphereMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachineList) - return Convert_v1beta1_VSphereMachineList_To_v1alpha3_VSphereMachineList(src, dst, nil) -} diff --git a/apis/v1alpha3/vspheremachine_types.go b/apis/v1alpha3/vspheremachine_types.go deleted file mode 100644 index 9f1d5eb675..0000000000 --- a/apis/v1alpha3/vspheremachine_types.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // MachineFinalizer allows ReconcileVSphereMachine to clean up VSphere - // resources associated with VSphereMachine before removing it from the - // API Server. - MachineFinalizer = "vspheremachine.infrastructure.cluster.x-k8s.io" -) - -// VSphereMachineSpec defines the desired state of VSphereMachine -type VSphereMachineSpec struct { - VirtualMachineCloneSpec `json:",inline"` - - // ProviderID is the virtual machine's BIOS UUID formated as - // vsphere://12345678-1234-1234-1234-123456789abc - // +optional - ProviderID *string `json:"providerID,omitempty"` - - // FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - // For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - FailureDomain *string `json:"failureDomain,omitempty"` -} - -// VSphereMachineStatus defines the observed state of VSphereMachine -type VSphereMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the VSphere instance associated addresses. - Addresses []clusterv1alpha3.MachineAddress `json:"addresses,omitempty"` - - // Network returns the network status for each of the machine's configured - // network interfaces. - // +optional - Network []NetworkStatus `json:"network,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a succinct value suitable - // for machine interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // FailureMessage will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the VSphereMachine. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspheremachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this VSphereMachine belongs" -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status" -// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="VSphereMachine instance ID" -// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns this VSphereMachine",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine" - -// VSphereMachine is the Schema for the vspheremachines API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereMachineSpec `json:"spec,omitempty"` - Status VSphereMachineStatus `json:"status,omitempty"` -} - -func (m *VSphereMachine) GetConditions() clusterv1alpha3.Conditions { - return m.Status.Conditions -} - -func (m *VSphereMachine) SetConditions(conditions clusterv1alpha3.Conditions) { - m.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereMachineList contains a list of VSphereMachine -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereMachine `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereMachine{}, &VSphereMachineList{}) -} diff --git a/apis/v1alpha3/vspheremachinetemplate_conversion.go b/apis/v1alpha3/vspheremachinetemplate_conversion.go deleted file mode 100644 index f7e8ecba2c..0000000000 --- a/apis/v1alpha3/vspheremachinetemplate_conversion.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereMachineTemplate to the Hub version (v1beta1). -func (src *VSphereMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachineTemplate) - if err := Convert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereMachineTemplate{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - dst.Spec.Template.Spec.TagIDs = restored.Spec.Template.Spec.TagIDs - dst.Spec.Template.Spec.AdditionalDisksGiB = restored.Spec.Template.Spec.AdditionalDisksGiB - dst.Spec.Template.Spec.PowerOffMode = restored.Spec.Template.Spec.PowerOffMode - dst.Spec.Template.Spec.GuestSoftPowerOffTimeout = restored.Spec.Template.Spec.GuestSoftPowerOffTimeout - for i := range dst.Spec.Template.Spec.Network.Devices { - dst.Spec.Template.Spec.Network.Devices[i].AddressesFromPools = restored.Spec.Template.Spec.Network.Devices[i].AddressesFromPools - dst.Spec.Template.Spec.Network.Devices[i].DHCP4Overrides = restored.Spec.Template.Spec.Network.Devices[i].DHCP4Overrides - dst.Spec.Template.Spec.Network.Devices[i].DHCP6Overrides = restored.Spec.Template.Spec.Network.Devices[i].DHCP6Overrides - } - - return nil -} - -func (dst *VSphereMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachineTemplate) - if err := Convert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - return nil -} - -func (src *VSphereMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachineTemplateList) - return Convert_v1alpha3_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(src, dst, nil) -} - -func (dst *VSphereMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachineTemplateList) - return Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha3_VSphereMachineTemplateList(src, dst, nil) -} - -func Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(in *clusterv1alpha3.ObjectMeta, out *clusterv1.ObjectMeta, s apiconversion.Scope) error { - // wrapping the conversion func to avoid having compile errors due to compileErrorOnMissingConversion() - // more details at https://github.com/kubernetes/kubernetes/issues/98380 - return clusterv1alpha3.Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(in, out, s) -} - -func Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(in *clusterv1.ObjectMeta, out *clusterv1alpha3.ObjectMeta, s apiconversion.Scope) error { - // wrapping the conversion func to avoid having compile errors due to compileErrorOnMissingConversion() - // more details at https://github.com/kubernetes/kubernetes/issues/98380 - return clusterv1alpha3.Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(in, out, s) -} diff --git a/apis/v1alpha3/vspheremachinetemplate_types.go b/apis/v1alpha3/vspheremachinetemplate_types.go deleted file mode 100644 index 8c143cef56..0000000000 --- a/apis/v1alpha3/vspheremachinetemplate_types.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate -type VSphereMachineTemplateSpec struct { - Template VSphereMachineTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspheremachinetemplates,scope=Namespaced,categories=cluster-api - -// VSphereMachineTemplate is the Schema for the vspheremachinetemplates API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachineTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereMachineTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereMachineTemplateList contains a list of VSphereMachineTemplate -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachineTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereMachineTemplate `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereMachineTemplate{}, &VSphereMachineTemplateList{}) -} diff --git a/apis/v1alpha3/vspherevm_conversion.go b/apis/v1alpha3/vspherevm_conversion.go deleted file mode 100644 index d84b8af6a9..0000000000 --- a/apis/v1alpha3/vspherevm_conversion.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereVM to the Hub version (v1beta1). -func (src *VSphereVM) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereVM) - if err := Convert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereVM{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - dst.Spec.TagIDs = restored.Spec.TagIDs - dst.Spec.AdditionalDisksGiB = restored.Spec.AdditionalDisksGiB - dst.Spec.PowerOffMode = restored.Spec.PowerOffMode - dst.Spec.GuestSoftPowerOffTimeout = restored.Spec.GuestSoftPowerOffTimeout - dst.Status.Host = restored.Status.Host - for i := range dst.Spec.Network.Devices { - dst.Spec.Network.Devices[i].AddressesFromPools = restored.Spec.Network.Devices[i].AddressesFromPools - dst.Spec.Network.Devices[i].DHCP4Overrides = restored.Spec.Network.Devices[i].DHCP4Overrides - dst.Spec.Network.Devices[i].DHCP6Overrides = restored.Spec.Network.Devices[i].DHCP6Overrides - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereVM. -func (dst *VSphereVM) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereVM) - if err := Convert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - return nil -} - -// ConvertTo converts this VSphereVMList to the Hub version (v1beta1). -func (src *VSphereVMList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereVMList) - return Convert_v1alpha3_VSphereVMList_To_v1beta1_VSphereVMList(src, dst, nil) -} - -// ConvertFrom converts this VSphereVM to the Hub version (v1beta1). -func (dst *VSphereVMList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereVMList) - return Convert_v1beta1_VSphereVMList_To_v1alpha3_VSphereVMList(src, dst, nil) -} diff --git a/apis/v1alpha3/vspherevm_types.go b/apis/v1alpha3/vspherevm_types.go deleted file mode 100644 index 5b97bedd60..0000000000 --- a/apis/v1alpha3/vspherevm_types.go +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha3 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // VMFinalizer allows the reconciler to clean up resources associated - // with a VSphereVM before removing it from the API Server. - VMFinalizer = "vspherevm.infrastructure.cluster.x-k8s.io" -) - -// VSphereVMSpec defines the desired state of VSphereVM. -type VSphereVMSpec struct { - VirtualMachineCloneSpec `json:",inline"` - - // BootstrapRef is a reference to a bootstrap provider-specific resource - // that holds configuration details. - // This field is optional in case no bootstrap data is required to create - // a VM. - // +optional - BootstrapRef *corev1.ObjectReference `json:"bootstrapRef,omitempty"` - - // BiosUUID is the VM's BIOS UUID that is assigned at runtime after - // the VM has been created. - // This field is required at runtime for other controllers that read - // this CRD as unstructured data. - // +optional - BiosUUID string `json:"biosUUID,omitempty"` -} - -// VSphereVMStatus defines the observed state of VSphereVM -type VSphereVMStatus struct { - // Ready is true when the provider resource is ready. - // This field is required at runtime for other controllers that read - // this CRD as unstructured data. - // +optional - Ready bool `json:"ready,omitempty"` - - // Addresses is a list of the VM's IP addresses. - // This field is required at runtime for other controllers that read - // this CRD as unstructured data. - // +optional - Addresses []string `json:"addresses,omitempty"` - - // CloneMode is the type of clone operation used to clone this VM. Since - // LinkedMode is the default but fails gracefully if the source of the - // clone has no snapshots, this field may be used to determine the actual - // type of clone operation used to create this VM. - // +optional - CloneMode CloneMode `json:"cloneMode,omitempty"` - - // Snapshot is the name of the snapshot from which the VM was cloned if - // LinkedMode is enabled. - // +optional - Snapshot string `json:"snapshot,omitempty"` - - // RetryAfter tracks the time we can retry queueing a task - // +optional - RetryAfter metav1.Time `json:"retryAfter,omitempty"` - - // TaskRef is a managed object reference to a Task related to the machine. - // This value is set automatically at runtime and should not be set or - // modified by users. - // +optional - TaskRef string `json:"taskRef,omitempty"` - - // Network returns the network status for each of the machine's configured - // network interfaces. - // +optional - Network []NetworkStatus `json:"network,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the vspherevm and will contain a succinct value suitable - // for vm interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the vm. - // - // Any transient errors that occur during the reconciliation of vspherevms - // can be added as events to the vspherevm object and/or logged in the - // controller's output. - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // FailureMessage will be set in the event that there is a terminal problem - // reconciling the vspherevm and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the vm. - // - // Any transient errors that occur during the reconciliation of vspherevms - // can be added as events to the vspherevm object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the VSphereVM. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspherevms,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// VSphereVM is the Schema for the vspherevms API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereVM struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereVMSpec `json:"spec,omitempty"` - Status VSphereVMStatus `json:"status,omitempty"` -} - -func (m *VSphereVM) GetConditions() clusterv1alpha3.Conditions { - return m.Status.Conditions -} - -func (m *VSphereVM) SetConditions(conditions clusterv1alpha3.Conditions) { - m.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereVMList contains a list of VSphereVM -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereVMList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereVM `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereVM{}, &VSphereVMList{}) -} diff --git a/apis/v1alpha3/zz_generated.conversion.go b/apis/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index af7737b324..0000000000 --- a/apis/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,1691 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - unsafe "unsafe" - - v1 "k8s.io/api/core/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1beta1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" - apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - errors "sigs.k8s.io/cluster-api/errors" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AllowedNamespaces)(nil), (*v1beta1.AllowedNamespaces)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AllowedNamespaces_To_v1beta1_AllowedNamespaces(a.(*AllowedNamespaces), b.(*v1beta1.AllowedNamespaces), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AllowedNamespaces)(nil), (*AllowedNamespaces)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AllowedNamespaces_To_v1alpha3_AllowedNamespaces(a.(*v1beta1.AllowedNamespaces), b.(*AllowedNamespaces), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FailureDomain)(nil), (*v1beta1.FailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain(a.(*FailureDomain), b.(*v1beta1.FailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FailureDomain)(nil), (*FailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain(a.(*v1beta1.FailureDomain), b.(*FailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FailureDomainHosts)(nil), (*v1beta1.FailureDomainHosts)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_FailureDomainHosts_To_v1beta1_FailureDomainHosts(a.(*FailureDomainHosts), b.(*v1beta1.FailureDomainHosts), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FailureDomainHosts)(nil), (*FailureDomainHosts)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FailureDomainHosts_To_v1alpha3_FailureDomainHosts(a.(*v1beta1.FailureDomainHosts), b.(*FailureDomainHosts), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Network)(nil), (*v1beta1.Network)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Network_To_v1beta1_Network(a.(*Network), b.(*v1beta1.Network), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.Network)(nil), (*Network)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Network_To_v1alpha3_Network(a.(*v1beta1.Network), b.(*Network), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkDeviceSpec)(nil), (*v1beta1.NetworkDeviceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(a.(*NetworkDeviceSpec), b.(*v1beta1.NetworkDeviceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkRouteSpec)(nil), (*v1beta1.NetworkRouteSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(a.(*NetworkRouteSpec), b.(*v1beta1.NetworkRouteSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkRouteSpec)(nil), (*NetworkRouteSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkRouteSpec_To_v1alpha3_NetworkRouteSpec(a.(*v1beta1.NetworkRouteSpec), b.(*NetworkRouteSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkSpec)(nil), (*v1beta1.NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(a.(*NetworkSpec), b.(*v1beta1.NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkSpec)(nil), (*NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(a.(*v1beta1.NetworkSpec), b.(*NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkStatus)(nil), (*v1beta1.NetworkStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NetworkStatus_To_v1beta1_NetworkStatus(a.(*NetworkStatus), b.(*v1beta1.NetworkStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkStatus)(nil), (*NetworkStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkStatus_To_v1alpha3_NetworkStatus(a.(*v1beta1.NetworkStatus), b.(*NetworkStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PlacementConstraint)(nil), (*v1beta1.PlacementConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_PlacementConstraint_To_v1beta1_PlacementConstraint(a.(*PlacementConstraint), b.(*v1beta1.PlacementConstraint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.PlacementConstraint)(nil), (*PlacementConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PlacementConstraint_To_v1alpha3_PlacementConstraint(a.(*v1beta1.PlacementConstraint), b.(*PlacementConstraint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SSHUser)(nil), (*v1beta1.SSHUser)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SSHUser_To_v1beta1_SSHUser(a.(*SSHUser), b.(*v1beta1.SSHUser), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.SSHUser)(nil), (*SSHUser)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SSHUser_To_v1alpha3_SSHUser(a.(*v1beta1.SSHUser), b.(*SSHUser), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Topology)(nil), (*v1beta1.Topology)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Topology_To_v1beta1_Topology(a.(*Topology), b.(*v1beta1.Topology), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.Topology)(nil), (*Topology)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Topology_To_v1alpha3_Topology(a.(*v1beta1.Topology), b.(*Topology), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereCluster)(nil), (*v1beta1.VSphereCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster(a.(*VSphereCluster), b.(*v1beta1.VSphereCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereCluster)(nil), (*VSphereCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster(a.(*v1beta1.VSphereCluster), b.(*VSphereCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentity)(nil), (*v1beta1.VSphereClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(a.(*VSphereClusterIdentity), b.(*v1beta1.VSphereClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentity)(nil), (*VSphereClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentity_To_v1alpha3_VSphereClusterIdentity(a.(*v1beta1.VSphereClusterIdentity), b.(*VSphereClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentityList)(nil), (*v1beta1.VSphereClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(a.(*VSphereClusterIdentityList), b.(*v1beta1.VSphereClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentityList)(nil), (*VSphereClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha3_VSphereClusterIdentityList(a.(*v1beta1.VSphereClusterIdentityList), b.(*VSphereClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentitySpec)(nil), (*v1beta1.VSphereClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(a.(*VSphereClusterIdentitySpec), b.(*v1beta1.VSphereClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentitySpec)(nil), (*VSphereClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha3_VSphereClusterIdentitySpec(a.(*v1beta1.VSphereClusterIdentitySpec), b.(*VSphereClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentityStatus)(nil), (*v1beta1.VSphereClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(a.(*VSphereClusterIdentityStatus), b.(*v1beta1.VSphereClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentityStatus)(nil), (*VSphereClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha3_VSphereClusterIdentityStatus(a.(*v1beta1.VSphereClusterIdentityStatus), b.(*VSphereClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterList)(nil), (*v1beta1.VSphereClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterList_To_v1beta1_VSphereClusterList(a.(*VSphereClusterList), b.(*v1beta1.VSphereClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterList)(nil), (*VSphereClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterList_To_v1alpha3_VSphereClusterList(a.(*v1beta1.VSphereClusterList), b.(*VSphereClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterStatus)(nil), (*v1beta1.VSphereClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(a.(*VSphereClusterStatus), b.(*v1beta1.VSphereClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZone)(nil), (*v1beta1.VSphereDeploymentZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(a.(*VSphereDeploymentZone), b.(*v1beta1.VSphereDeploymentZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZone)(nil), (*VSphereDeploymentZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZone_To_v1alpha3_VSphereDeploymentZone(a.(*v1beta1.VSphereDeploymentZone), b.(*VSphereDeploymentZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZoneList)(nil), (*v1beta1.VSphereDeploymentZoneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(a.(*VSphereDeploymentZoneList), b.(*v1beta1.VSphereDeploymentZoneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZoneList)(nil), (*VSphereDeploymentZoneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha3_VSphereDeploymentZoneList(a.(*v1beta1.VSphereDeploymentZoneList), b.(*VSphereDeploymentZoneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZoneSpec)(nil), (*v1beta1.VSphereDeploymentZoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(a.(*VSphereDeploymentZoneSpec), b.(*v1beta1.VSphereDeploymentZoneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZoneSpec)(nil), (*VSphereDeploymentZoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha3_VSphereDeploymentZoneSpec(a.(*v1beta1.VSphereDeploymentZoneSpec), b.(*VSphereDeploymentZoneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZoneStatus)(nil), (*v1beta1.VSphereDeploymentZoneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(a.(*VSphereDeploymentZoneStatus), b.(*v1beta1.VSphereDeploymentZoneStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZoneStatus)(nil), (*VSphereDeploymentZoneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha3_VSphereDeploymentZoneStatus(a.(*v1beta1.VSphereDeploymentZoneStatus), b.(*VSphereDeploymentZoneStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereFailureDomain)(nil), (*v1beta1.VSphereFailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(a.(*VSphereFailureDomain), b.(*v1beta1.VSphereFailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereFailureDomain)(nil), (*VSphereFailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereFailureDomain_To_v1alpha3_VSphereFailureDomain(a.(*v1beta1.VSphereFailureDomain), b.(*VSphereFailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereFailureDomainList)(nil), (*v1beta1.VSphereFailureDomainList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(a.(*VSphereFailureDomainList), b.(*v1beta1.VSphereFailureDomainList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereFailureDomainList)(nil), (*VSphereFailureDomainList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereFailureDomainList_To_v1alpha3_VSphereFailureDomainList(a.(*v1beta1.VSphereFailureDomainList), b.(*VSphereFailureDomainList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereFailureDomainSpec)(nil), (*v1beta1.VSphereFailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(a.(*VSphereFailureDomainSpec), b.(*v1beta1.VSphereFailureDomainSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereFailureDomainSpec)(nil), (*VSphereFailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha3_VSphereFailureDomainSpec(a.(*v1beta1.VSphereFailureDomainSpec), b.(*VSphereFailureDomainSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereIdentityReference)(nil), (*v1beta1.VSphereIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(a.(*VSphereIdentityReference), b.(*v1beta1.VSphereIdentityReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereIdentityReference)(nil), (*VSphereIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereIdentityReference_To_v1alpha3_VSphereIdentityReference(a.(*v1beta1.VSphereIdentityReference), b.(*VSphereIdentityReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachine)(nil), (*v1beta1.VSphereMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine(a.(*VSphereMachine), b.(*v1beta1.VSphereMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachine)(nil), (*VSphereMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine(a.(*v1beta1.VSphereMachine), b.(*VSphereMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineList)(nil), (*v1beta1.VSphereMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineList_To_v1beta1_VSphereMachineList(a.(*VSphereMachineList), b.(*v1beta1.VSphereMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineList)(nil), (*VSphereMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineList_To_v1alpha3_VSphereMachineList(a.(*v1beta1.VSphereMachineList), b.(*VSphereMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineSpec)(nil), (*v1beta1.VSphereMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(a.(*VSphereMachineSpec), b.(*v1beta1.VSphereMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineStatus)(nil), (*v1beta1.VSphereMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(a.(*VSphereMachineStatus), b.(*v1beta1.VSphereMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineStatus)(nil), (*VSphereMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineStatus_To_v1alpha3_VSphereMachineStatus(a.(*v1beta1.VSphereMachineStatus), b.(*VSphereMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplate)(nil), (*v1beta1.VSphereMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(a.(*VSphereMachineTemplate), b.(*v1beta1.VSphereMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplate)(nil), (*VSphereMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate(a.(*v1beta1.VSphereMachineTemplate), b.(*VSphereMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplateList)(nil), (*v1beta1.VSphereMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(a.(*VSphereMachineTemplateList), b.(*v1beta1.VSphereMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplateList)(nil), (*VSphereMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha3_VSphereMachineTemplateList(a.(*v1beta1.VSphereMachineTemplateList), b.(*VSphereMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplateResource)(nil), (*v1beta1.VSphereMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(a.(*VSphereMachineTemplateResource), b.(*v1beta1.VSphereMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplateResource)(nil), (*VSphereMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha3_VSphereMachineTemplateResource(a.(*v1beta1.VSphereMachineTemplateResource), b.(*VSphereMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplateSpec)(nil), (*v1beta1.VSphereMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(a.(*VSphereMachineTemplateSpec), b.(*v1beta1.VSphereMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplateSpec)(nil), (*VSphereMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha3_VSphereMachineTemplateSpec(a.(*v1beta1.VSphereMachineTemplateSpec), b.(*VSphereMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVM)(nil), (*v1beta1.VSphereVM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM(a.(*VSphereVM), b.(*v1beta1.VSphereVM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereVM)(nil), (*VSphereVM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM(a.(*v1beta1.VSphereVM), b.(*VSphereVM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVMList)(nil), (*v1beta1.VSphereVMList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereVMList_To_v1beta1_VSphereVMList(a.(*VSphereVMList), b.(*v1beta1.VSphereVMList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereVMList)(nil), (*VSphereVMList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVMList_To_v1alpha3_VSphereVMList(a.(*v1beta1.VSphereVMList), b.(*VSphereVMList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVMSpec)(nil), (*v1beta1.VSphereVMSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereVMSpec_To_v1beta1_VSphereVMSpec(a.(*VSphereVMSpec), b.(*v1beta1.VSphereVMSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVMStatus)(nil), (*v1beta1.VSphereVMStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereVMStatus_To_v1beta1_VSphereVMStatus(a.(*VSphereVMStatus), b.(*v1beta1.VSphereVMStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachine)(nil), (*v1beta1.VirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VirtualMachine_To_v1beta1_VirtualMachine(a.(*VirtualMachine), b.(*v1beta1.VirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachine)(nil), (*VirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachine_To_v1alpha3_VirtualMachine(a.(*v1beta1.VirtualMachine), b.(*VirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineCloneSpec)(nil), (*v1beta1.VirtualMachineCloneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(a.(*VirtualMachineCloneSpec), b.(*v1beta1.VirtualMachineCloneSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1alpha3.ObjectMeta)(nil), (*apiv1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(a.(*apiv1alpha3.ObjectMeta), b.(*apiv1beta1.ObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*VSphereClusterSpec)(nil), (*v1beta1.VSphereClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(a.(*VSphereClusterSpec), b.(*v1beta1.VSphereClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.NetworkDeviceSpec)(nil), (*NetworkDeviceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkDeviceSpec_To_v1alpha3_NetworkDeviceSpec(a.(*v1beta1.NetworkDeviceSpec), b.(*NetworkDeviceSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta1.ObjectMeta)(nil), (*apiv1alpha3.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(a.(*apiv1beta1.ObjectMeta), b.(*apiv1alpha3.ObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereClusterSpec)(nil), (*VSphereClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterSpec_To_v1alpha3_VSphereClusterSpec(a.(*v1beta1.VSphereClusterSpec), b.(*VSphereClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereClusterStatus)(nil), (*VSphereClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterStatus_To_v1alpha3_VSphereClusterStatus(a.(*v1beta1.VSphereClusterStatus), b.(*VSphereClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereMachineSpec)(nil), (*VSphereMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineSpec_To_v1alpha3_VSphereMachineSpec(a.(*v1beta1.VSphereMachineSpec), b.(*VSphereMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereVMSpec)(nil), (*VSphereVMSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVMSpec_To_v1alpha3_VSphereVMSpec(a.(*v1beta1.VSphereVMSpec), b.(*VSphereVMSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereVMStatus)(nil), (*VSphereVMStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVMStatus_To_v1alpha3_VSphereVMStatus(a.(*v1beta1.VSphereVMStatus), b.(*VSphereVMStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VirtualMachineCloneSpec)(nil), (*VirtualMachineCloneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec(a.(*v1beta1.VirtualMachineCloneSpec), b.(*VirtualMachineCloneSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { - out.Host = in.Host - out.Port = in.Port - return nil -} - -// Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -func autoConvert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - out.Host = in.Host - out.Port = in.Port - return nil -} - -// Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) -} - -func autoConvert_v1alpha3_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in *AllowedNamespaces, out *v1beta1.AllowedNamespaces, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_v1alpha3_AllowedNamespaces_To_v1beta1_AllowedNamespaces is an autogenerated conversion function. -func Convert_v1alpha3_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in *AllowedNamespaces, out *v1beta1.AllowedNamespaces, s conversion.Scope) error { - return autoConvert_v1alpha3_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in, out, s) -} - -func autoConvert_v1beta1_AllowedNamespaces_To_v1alpha3_AllowedNamespaces(in *v1beta1.AllowedNamespaces, out *AllowedNamespaces, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_v1beta1_AllowedNamespaces_To_v1alpha3_AllowedNamespaces is an autogenerated conversion function. -func Convert_v1beta1_AllowedNamespaces_To_v1alpha3_AllowedNamespaces(in *v1beta1.AllowedNamespaces, out *AllowedNamespaces, s conversion.Scope) error { - return autoConvert_v1beta1_AllowedNamespaces_To_v1alpha3_AllowedNamespaces(in, out, s) -} - -func autoConvert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain(in *FailureDomain, out *v1beta1.FailureDomain, s conversion.Scope) error { - out.Name = in.Name - out.Type = v1beta1.FailureDomainType(in.Type) - out.TagCategory = in.TagCategory - out.AutoConfigure = (*bool)(unsafe.Pointer(in.AutoConfigure)) - return nil -} - -// Convert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain is an autogenerated conversion function. -func Convert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain(in *FailureDomain, out *v1beta1.FailureDomain, s conversion.Scope) error { - return autoConvert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain(in, out, s) -} - -func autoConvert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain(in *v1beta1.FailureDomain, out *FailureDomain, s conversion.Scope) error { - out.Name = in.Name - out.Type = FailureDomainType(in.Type) - out.TagCategory = in.TagCategory - out.AutoConfigure = (*bool)(unsafe.Pointer(in.AutoConfigure)) - return nil -} - -// Convert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain is an autogenerated conversion function. -func Convert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain(in *v1beta1.FailureDomain, out *FailureDomain, s conversion.Scope) error { - return autoConvert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain(in, out, s) -} - -func autoConvert_v1alpha3_FailureDomainHosts_To_v1beta1_FailureDomainHosts(in *FailureDomainHosts, out *v1beta1.FailureDomainHosts, s conversion.Scope) error { - out.VMGroupName = in.VMGroupName - out.HostGroupName = in.HostGroupName - return nil -} - -// Convert_v1alpha3_FailureDomainHosts_To_v1beta1_FailureDomainHosts is an autogenerated conversion function. -func Convert_v1alpha3_FailureDomainHosts_To_v1beta1_FailureDomainHosts(in *FailureDomainHosts, out *v1beta1.FailureDomainHosts, s conversion.Scope) error { - return autoConvert_v1alpha3_FailureDomainHosts_To_v1beta1_FailureDomainHosts(in, out, s) -} - -func autoConvert_v1beta1_FailureDomainHosts_To_v1alpha3_FailureDomainHosts(in *v1beta1.FailureDomainHosts, out *FailureDomainHosts, s conversion.Scope) error { - out.VMGroupName = in.VMGroupName - out.HostGroupName = in.HostGroupName - return nil -} - -// Convert_v1beta1_FailureDomainHosts_To_v1alpha3_FailureDomainHosts is an autogenerated conversion function. -func Convert_v1beta1_FailureDomainHosts_To_v1alpha3_FailureDomainHosts(in *v1beta1.FailureDomainHosts, out *FailureDomainHosts, s conversion.Scope) error { - return autoConvert_v1beta1_FailureDomainHosts_To_v1alpha3_FailureDomainHosts(in, out, s) -} - -func autoConvert_v1alpha3_Network_To_v1beta1_Network(in *Network, out *v1beta1.Network, s conversion.Scope) error { - out.Name = in.Name - out.DHCP4 = (*bool)(unsafe.Pointer(in.DHCP4)) - out.DHCP6 = (*bool)(unsafe.Pointer(in.DHCP6)) - return nil -} - -// Convert_v1alpha3_Network_To_v1beta1_Network is an autogenerated conversion function. -func Convert_v1alpha3_Network_To_v1beta1_Network(in *Network, out *v1beta1.Network, s conversion.Scope) error { - return autoConvert_v1alpha3_Network_To_v1beta1_Network(in, out, s) -} - -func autoConvert_v1beta1_Network_To_v1alpha3_Network(in *v1beta1.Network, out *Network, s conversion.Scope) error { - out.Name = in.Name - out.DHCP4 = (*bool)(unsafe.Pointer(in.DHCP4)) - out.DHCP6 = (*bool)(unsafe.Pointer(in.DHCP6)) - return nil -} - -// Convert_v1beta1_Network_To_v1alpha3_Network is an autogenerated conversion function. -func Convert_v1beta1_Network_To_v1alpha3_Network(in *v1beta1.Network, out *Network, s conversion.Scope) error { - return autoConvert_v1beta1_Network_To_v1alpha3_Network(in, out, s) -} - -func autoConvert_v1alpha3_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(in *NetworkDeviceSpec, out *v1beta1.NetworkDeviceSpec, s conversion.Scope) error { - out.NetworkName = in.NetworkName - out.DeviceName = in.DeviceName - out.DHCP4 = in.DHCP4 - out.DHCP6 = in.DHCP6 - out.Gateway4 = in.Gateway4 - out.Gateway6 = in.Gateway6 - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MTU = (*int64)(unsafe.Pointer(in.MTU)) - out.MACAddr = in.MACAddr - out.Nameservers = *(*[]string)(unsafe.Pointer(&in.Nameservers)) - out.Routes = *(*[]v1beta1.NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.SearchDomains = *(*[]string)(unsafe.Pointer(&in.SearchDomains)) - return nil -} - -// Convert_v1alpha3_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec is an autogenerated conversion function. -func Convert_v1alpha3_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(in *NetworkDeviceSpec, out *v1beta1.NetworkDeviceSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkDeviceSpec_To_v1alpha3_NetworkDeviceSpec(in *v1beta1.NetworkDeviceSpec, out *NetworkDeviceSpec, s conversion.Scope) error { - out.NetworkName = in.NetworkName - out.DeviceName = in.DeviceName - out.DHCP4 = in.DHCP4 - out.DHCP6 = in.DHCP6 - out.Gateway4 = in.Gateway4 - out.Gateway6 = in.Gateway6 - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MTU = (*int64)(unsafe.Pointer(in.MTU)) - out.MACAddr = in.MACAddr - out.Nameservers = *(*[]string)(unsafe.Pointer(&in.Nameservers)) - out.Routes = *(*[]NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.SearchDomains = *(*[]string)(unsafe.Pointer(&in.SearchDomains)) - // WARNING: in.AddressesFromPools requires manual conversion: does not exist in peer-type - // WARNING: in.DHCP4Overrides requires manual conversion: does not exist in peer-type - // WARNING: in.DHCP6Overrides requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(in *NetworkRouteSpec, out *v1beta1.NetworkRouteSpec, s conversion.Scope) error { - out.To = in.To - out.Via = in.Via - out.Metric = in.Metric - return nil -} - -// Convert_v1alpha3_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec is an autogenerated conversion function. -func Convert_v1alpha3_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(in *NetworkRouteSpec, out *v1beta1.NetworkRouteSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkRouteSpec_To_v1alpha3_NetworkRouteSpec(in *v1beta1.NetworkRouteSpec, out *NetworkRouteSpec, s conversion.Scope) error { - out.To = in.To - out.Via = in.Via - out.Metric = in.Metric - return nil -} - -// Convert_v1beta1_NetworkRouteSpec_To_v1alpha3_NetworkRouteSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkRouteSpec_To_v1alpha3_NetworkRouteSpec(in *v1beta1.NetworkRouteSpec, out *NetworkRouteSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkRouteSpec_To_v1alpha3_NetworkRouteSpec(in, out, s) -} - -func autoConvert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]v1beta1.NetworkDeviceSpec, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Devices = nil - } - out.Routes = *(*[]v1beta1.NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.PreferredAPIServerCIDR = in.PreferredAPIServerCIDR - return nil -} - -// Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec is an autogenerated conversion function. -func Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]NetworkDeviceSpec, len(*in)) - for i := range *in { - if err := Convert_v1beta1_NetworkDeviceSpec_To_v1alpha3_NetworkDeviceSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Devices = nil - } - out.Routes = *(*[]NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.PreferredAPIServerCIDR = in.PreferredAPIServerCIDR - return nil -} - -// Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in, out, s) -} - -func autoConvert_v1alpha3_NetworkStatus_To_v1beta1_NetworkStatus(in *NetworkStatus, out *v1beta1.NetworkStatus, s conversion.Scope) error { - out.Connected = in.Connected - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MACAddr = in.MACAddr - out.NetworkName = in.NetworkName - return nil -} - -// Convert_v1alpha3_NetworkStatus_To_v1beta1_NetworkStatus is an autogenerated conversion function. -func Convert_v1alpha3_NetworkStatus_To_v1beta1_NetworkStatus(in *NetworkStatus, out *v1beta1.NetworkStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NetworkStatus_To_v1beta1_NetworkStatus(in, out, s) -} - -func autoConvert_v1beta1_NetworkStatus_To_v1alpha3_NetworkStatus(in *v1beta1.NetworkStatus, out *NetworkStatus, s conversion.Scope) error { - out.Connected = in.Connected - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MACAddr = in.MACAddr - out.NetworkName = in.NetworkName - return nil -} - -// Convert_v1beta1_NetworkStatus_To_v1alpha3_NetworkStatus is an autogenerated conversion function. -func Convert_v1beta1_NetworkStatus_To_v1alpha3_NetworkStatus(in *v1beta1.NetworkStatus, out *NetworkStatus, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkStatus_To_v1alpha3_NetworkStatus(in, out, s) -} - -func autoConvert_v1alpha3_PlacementConstraint_To_v1beta1_PlacementConstraint(in *PlacementConstraint, out *v1beta1.PlacementConstraint, s conversion.Scope) error { - out.ResourcePool = in.ResourcePool - out.Folder = in.Folder - return nil -} - -// Convert_v1alpha3_PlacementConstraint_To_v1beta1_PlacementConstraint is an autogenerated conversion function. -func Convert_v1alpha3_PlacementConstraint_To_v1beta1_PlacementConstraint(in *PlacementConstraint, out *v1beta1.PlacementConstraint, s conversion.Scope) error { - return autoConvert_v1alpha3_PlacementConstraint_To_v1beta1_PlacementConstraint(in, out, s) -} - -func autoConvert_v1beta1_PlacementConstraint_To_v1alpha3_PlacementConstraint(in *v1beta1.PlacementConstraint, out *PlacementConstraint, s conversion.Scope) error { - out.ResourcePool = in.ResourcePool - out.Folder = in.Folder - return nil -} - -// Convert_v1beta1_PlacementConstraint_To_v1alpha3_PlacementConstraint is an autogenerated conversion function. -func Convert_v1beta1_PlacementConstraint_To_v1alpha3_PlacementConstraint(in *v1beta1.PlacementConstraint, out *PlacementConstraint, s conversion.Scope) error { - return autoConvert_v1beta1_PlacementConstraint_To_v1alpha3_PlacementConstraint(in, out, s) -} - -func autoConvert_v1alpha3_SSHUser_To_v1beta1_SSHUser(in *SSHUser, out *v1beta1.SSHUser, s conversion.Scope) error { - out.Name = in.Name - out.AuthorizedKeys = *(*[]string)(unsafe.Pointer(&in.AuthorizedKeys)) - return nil -} - -// Convert_v1alpha3_SSHUser_To_v1beta1_SSHUser is an autogenerated conversion function. -func Convert_v1alpha3_SSHUser_To_v1beta1_SSHUser(in *SSHUser, out *v1beta1.SSHUser, s conversion.Scope) error { - return autoConvert_v1alpha3_SSHUser_To_v1beta1_SSHUser(in, out, s) -} - -func autoConvert_v1beta1_SSHUser_To_v1alpha3_SSHUser(in *v1beta1.SSHUser, out *SSHUser, s conversion.Scope) error { - out.Name = in.Name - out.AuthorizedKeys = *(*[]string)(unsafe.Pointer(&in.AuthorizedKeys)) - return nil -} - -// Convert_v1beta1_SSHUser_To_v1alpha3_SSHUser is an autogenerated conversion function. -func Convert_v1beta1_SSHUser_To_v1alpha3_SSHUser(in *v1beta1.SSHUser, out *SSHUser, s conversion.Scope) error { - return autoConvert_v1beta1_SSHUser_To_v1alpha3_SSHUser(in, out, s) -} - -func autoConvert_v1alpha3_Topology_To_v1beta1_Topology(in *Topology, out *v1beta1.Topology, s conversion.Scope) error { - out.Datacenter = in.Datacenter - out.ComputeCluster = (*string)(unsafe.Pointer(in.ComputeCluster)) - out.Hosts = (*v1beta1.FailureDomainHosts)(unsafe.Pointer(in.Hosts)) - out.Networks = *(*[]string)(unsafe.Pointer(&in.Networks)) - out.Datastore = in.Datastore - return nil -} - -// Convert_v1alpha3_Topology_To_v1beta1_Topology is an autogenerated conversion function. -func Convert_v1alpha3_Topology_To_v1beta1_Topology(in *Topology, out *v1beta1.Topology, s conversion.Scope) error { - return autoConvert_v1alpha3_Topology_To_v1beta1_Topology(in, out, s) -} - -func autoConvert_v1beta1_Topology_To_v1alpha3_Topology(in *v1beta1.Topology, out *Topology, s conversion.Scope) error { - out.Datacenter = in.Datacenter - out.ComputeCluster = (*string)(unsafe.Pointer(in.ComputeCluster)) - out.Hosts = (*FailureDomainHosts)(unsafe.Pointer(in.Hosts)) - out.Networks = *(*[]string)(unsafe.Pointer(&in.Networks)) - out.Datastore = in.Datastore - return nil -} - -// Convert_v1beta1_Topology_To_v1alpha3_Topology is an autogenerated conversion function. -func Convert_v1beta1_Topology_To_v1alpha3_Topology(in *v1beta1.Topology, out *Topology, s conversion.Scope) error { - return autoConvert_v1beta1_Topology_To_v1alpha3_Topology(in, out, s) -} - -func autoConvert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster(in *VSphereCluster, out *v1beta1.VSphereCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster is an autogenerated conversion function. -func Convert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster(in *VSphereCluster, out *v1beta1.VSphereCluster, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster(in, out, s) -} - -func autoConvert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster(in *v1beta1.VSphereCluster, out *VSphereCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereClusterSpec_To_v1alpha3_VSphereClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereClusterStatus_To_v1alpha3_VSphereClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster is an autogenerated conversion function. -func Convert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster(in *v1beta1.VSphereCluster, out *VSphereCluster, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster(in, out, s) -} - -func autoConvert_v1alpha3_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(in *VSphereClusterIdentity, out *v1beta1.VSphereClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity is an autogenerated conversion function. -func Convert_v1alpha3_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(in *VSphereClusterIdentity, out *v1beta1.VSphereClusterIdentity, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentity_To_v1alpha3_VSphereClusterIdentity(in *v1beta1.VSphereClusterIdentity, out *VSphereClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha3_VSphereClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha3_VSphereClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereClusterIdentity_To_v1alpha3_VSphereClusterIdentity is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentity_To_v1alpha3_VSphereClusterIdentity(in *v1beta1.VSphereClusterIdentity, out *VSphereClusterIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentity_To_v1alpha3_VSphereClusterIdentity(in, out, s) -} - -func autoConvert_v1alpha3_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(in *VSphereClusterIdentityList, out *v1beta1.VSphereClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.VSphereClusterIdentity)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(in *VSphereClusterIdentityList, out *v1beta1.VSphereClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentityList_To_v1alpha3_VSphereClusterIdentityList(in *v1beta1.VSphereClusterIdentityList, out *VSphereClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]VSphereClusterIdentity)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha3_VSphereClusterIdentityList is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha3_VSphereClusterIdentityList(in *v1beta1.VSphereClusterIdentityList, out *VSphereClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentityList_To_v1alpha3_VSphereClusterIdentityList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(in *VSphereClusterIdentitySpec, out *v1beta1.VSphereClusterIdentitySpec, s conversion.Scope) error { - out.SecretName = in.SecretName - out.AllowedNamespaces = (*v1beta1.AllowedNamespaces)(unsafe.Pointer(in.AllowedNamespaces)) - return nil -} - -// Convert_v1alpha3_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec is an autogenerated conversion function. -func Convert_v1alpha3_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(in *VSphereClusterIdentitySpec, out *v1beta1.VSphereClusterIdentitySpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha3_VSphereClusterIdentitySpec(in *v1beta1.VSphereClusterIdentitySpec, out *VSphereClusterIdentitySpec, s conversion.Scope) error { - out.SecretName = in.SecretName - out.AllowedNamespaces = (*AllowedNamespaces)(unsafe.Pointer(in.AllowedNamespaces)) - return nil -} - -// Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha3_VSphereClusterIdentitySpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha3_VSphereClusterIdentitySpec(in *v1beta1.VSphereClusterIdentitySpec, out *VSphereClusterIdentitySpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha3_VSphereClusterIdentitySpec(in, out, s) -} - -func autoConvert_v1alpha3_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(in *VSphereClusterIdentityStatus, out *v1beta1.VSphereClusterIdentityStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha3_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1alpha3_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(in *VSphereClusterIdentityStatus, out *v1beta1.VSphereClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha3_VSphereClusterIdentityStatus(in *v1beta1.VSphereClusterIdentityStatus, out *VSphereClusterIdentityStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha3_VSphereClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha3_VSphereClusterIdentityStatus(in *v1beta1.VSphereClusterIdentityStatus, out *VSphereClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha3_VSphereClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1alpha3_VSphereClusterList_To_v1beta1_VSphereClusterList(in *VSphereClusterList, out *v1beta1.VSphereClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereCluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_VSphereCluster_To_v1beta1_VSphereCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_VSphereClusterList_To_v1beta1_VSphereClusterList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereClusterList_To_v1beta1_VSphereClusterList(in *VSphereClusterList, out *v1beta1.VSphereClusterList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterList_To_v1beta1_VSphereClusterList(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterList_To_v1alpha3_VSphereClusterList(in *v1beta1.VSphereClusterList, out *VSphereClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereCluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereCluster_To_v1alpha3_VSphereCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereClusterList_To_v1alpha3_VSphereClusterList is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterList_To_v1alpha3_VSphereClusterList(in *v1beta1.VSphereClusterList, out *VSphereClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterList_To_v1alpha3_VSphereClusterList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(in *VSphereClusterSpec, out *v1beta1.VSphereClusterSpec, s conversion.Scope) error { - out.Server = in.Server - // WARNING: in.Insecure requires manual conversion: does not exist in peer-type - out.Thumbprint = in.Thumbprint - // WARNING: in.CloudProviderConfiguration requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - // WARNING: in.LoadBalancerRef requires manual conversion: does not exist in peer-type - out.IdentityRef = (*v1beta1.VSphereIdentityReference)(unsafe.Pointer(in.IdentityRef)) - return nil -} - -func autoConvert_v1beta1_VSphereClusterSpec_To_v1alpha3_VSphereClusterSpec(in *v1beta1.VSphereClusterSpec, out *VSphereClusterSpec, s conversion.Scope) error { - out.Server = in.Server - out.Thumbprint = in.Thumbprint - if err := Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.IdentityRef = (*VSphereIdentityReference)(unsafe.Pointer(in.IdentityRef)) - // WARNING: in.ClusterModules requires manual conversion: does not exist in peer-type - // WARNING: in.FailureDomainSelector requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(in *VSphereClusterStatus, out *v1beta1.VSphereClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureDomains = *(*apiv1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -// Convert_v1alpha3_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus is an autogenerated conversion function. -func Convert_v1alpha3_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(in *VSphereClusterStatus, out *v1beta1.VSphereClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterStatus_To_v1alpha3_VSphereClusterStatus(in *v1beta1.VSphereClusterStatus, out *VSphereClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureDomains = *(*apiv1alpha3.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) - // WARNING: in.VCenterVersion requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(in *VSphereDeploymentZone, out *v1beta1.VSphereDeploymentZone, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone is an autogenerated conversion function. -func Convert_v1alpha3_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(in *VSphereDeploymentZone, out *v1beta1.VSphereDeploymentZone, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZone_To_v1alpha3_VSphereDeploymentZone(in *v1beta1.VSphereDeploymentZone, out *VSphereDeploymentZone, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha3_VSphereDeploymentZoneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha3_VSphereDeploymentZoneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereDeploymentZone_To_v1alpha3_VSphereDeploymentZone is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZone_To_v1alpha3_VSphereDeploymentZone(in *v1beta1.VSphereDeploymentZone, out *VSphereDeploymentZone, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZone_To_v1alpha3_VSphereDeploymentZone(in, out, s) -} - -func autoConvert_v1alpha3_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(in *VSphereDeploymentZoneList, out *v1beta1.VSphereDeploymentZoneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.VSphereDeploymentZone)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(in *VSphereDeploymentZoneList, out *v1beta1.VSphereDeploymentZoneList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZoneList_To_v1alpha3_VSphereDeploymentZoneList(in *v1beta1.VSphereDeploymentZoneList, out *VSphereDeploymentZoneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]VSphereDeploymentZone)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha3_VSphereDeploymentZoneList is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha3_VSphereDeploymentZoneList(in *v1beta1.VSphereDeploymentZoneList, out *VSphereDeploymentZoneList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZoneList_To_v1alpha3_VSphereDeploymentZoneList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(in *VSphereDeploymentZoneSpec, out *v1beta1.VSphereDeploymentZoneSpec, s conversion.Scope) error { - out.Server = in.Server - out.FailureDomain = in.FailureDomain - out.ControlPlane = (*bool)(unsafe.Pointer(in.ControlPlane)) - if err := Convert_v1alpha3_PlacementConstraint_To_v1beta1_PlacementConstraint(&in.PlacementConstraint, &out.PlacementConstraint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec is an autogenerated conversion function. -func Convert_v1alpha3_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(in *VSphereDeploymentZoneSpec, out *v1beta1.VSphereDeploymentZoneSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha3_VSphereDeploymentZoneSpec(in *v1beta1.VSphereDeploymentZoneSpec, out *VSphereDeploymentZoneSpec, s conversion.Scope) error { - out.Server = in.Server - out.FailureDomain = in.FailureDomain - out.ControlPlane = (*bool)(unsafe.Pointer(in.ControlPlane)) - if err := Convert_v1beta1_PlacementConstraint_To_v1alpha3_PlacementConstraint(&in.PlacementConstraint, &out.PlacementConstraint, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha3_VSphereDeploymentZoneSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha3_VSphereDeploymentZoneSpec(in *v1beta1.VSphereDeploymentZoneSpec, out *VSphereDeploymentZoneSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha3_VSphereDeploymentZoneSpec(in, out, s) -} - -func autoConvert_v1alpha3_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(in *VSphereDeploymentZoneStatus, out *v1beta1.VSphereDeploymentZoneStatus, s conversion.Scope) error { - out.Ready = (*bool)(unsafe.Pointer(in.Ready)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha3_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus is an autogenerated conversion function. -func Convert_v1alpha3_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(in *VSphereDeploymentZoneStatus, out *v1beta1.VSphereDeploymentZoneStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha3_VSphereDeploymentZoneStatus(in *v1beta1.VSphereDeploymentZoneStatus, out *VSphereDeploymentZoneStatus, s conversion.Scope) error { - out.Ready = (*bool)(unsafe.Pointer(in.Ready)) - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha3_VSphereDeploymentZoneStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha3_VSphereDeploymentZoneStatus(in *v1beta1.VSphereDeploymentZoneStatus, out *VSphereDeploymentZoneStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha3_VSphereDeploymentZoneStatus(in, out, s) -} - -func autoConvert_v1alpha3_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(in *VSphereFailureDomain, out *v1beta1.VSphereFailureDomain, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain is an autogenerated conversion function. -func Convert_v1alpha3_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(in *VSphereFailureDomain, out *v1beta1.VSphereFailureDomain, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(in, out, s) -} - -func autoConvert_v1beta1_VSphereFailureDomain_To_v1alpha3_VSphereFailureDomain(in *v1beta1.VSphereFailureDomain, out *VSphereFailureDomain, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha3_VSphereFailureDomainSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereFailureDomain_To_v1alpha3_VSphereFailureDomain is an autogenerated conversion function. -func Convert_v1beta1_VSphereFailureDomain_To_v1alpha3_VSphereFailureDomain(in *v1beta1.VSphereFailureDomain, out *VSphereFailureDomain, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereFailureDomain_To_v1alpha3_VSphereFailureDomain(in, out, s) -} - -func autoConvert_v1alpha3_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(in *VSphereFailureDomainList, out *v1beta1.VSphereFailureDomainList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.VSphereFailureDomain)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(in *VSphereFailureDomainList, out *v1beta1.VSphereFailureDomainList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(in, out, s) -} - -func autoConvert_v1beta1_VSphereFailureDomainList_To_v1alpha3_VSphereFailureDomainList(in *v1beta1.VSphereFailureDomainList, out *VSphereFailureDomainList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]VSphereFailureDomain)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_VSphereFailureDomainList_To_v1alpha3_VSphereFailureDomainList is an autogenerated conversion function. -func Convert_v1beta1_VSphereFailureDomainList_To_v1alpha3_VSphereFailureDomainList(in *v1beta1.VSphereFailureDomainList, out *VSphereFailureDomainList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereFailureDomainList_To_v1alpha3_VSphereFailureDomainList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(in *VSphereFailureDomainSpec, out *v1beta1.VSphereFailureDomainSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain(&in.Region, &out.Region, s); err != nil { - return err - } - if err := Convert_v1alpha3_FailureDomain_To_v1beta1_FailureDomain(&in.Zone, &out.Zone, s); err != nil { - return err - } - if err := Convert_v1alpha3_Topology_To_v1beta1_Topology(&in.Topology, &out.Topology, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec is an autogenerated conversion function. -func Convert_v1alpha3_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(in *VSphereFailureDomainSpec, out *v1beta1.VSphereFailureDomainSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereFailureDomainSpec_To_v1alpha3_VSphereFailureDomainSpec(in *v1beta1.VSphereFailureDomainSpec, out *VSphereFailureDomainSpec, s conversion.Scope) error { - if err := Convert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain(&in.Region, &out.Region, s); err != nil { - return err - } - if err := Convert_v1beta1_FailureDomain_To_v1alpha3_FailureDomain(&in.Zone, &out.Zone, s); err != nil { - return err - } - if err := Convert_v1beta1_Topology_To_v1alpha3_Topology(&in.Topology, &out.Topology, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha3_VSphereFailureDomainSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha3_VSphereFailureDomainSpec(in *v1beta1.VSphereFailureDomainSpec, out *VSphereFailureDomainSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereFailureDomainSpec_To_v1alpha3_VSphereFailureDomainSpec(in, out, s) -} - -func autoConvert_v1alpha3_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(in *VSphereIdentityReference, out *v1beta1.VSphereIdentityReference, s conversion.Scope) error { - out.Kind = v1beta1.VSphereIdentityKind(in.Kind) - out.Name = in.Name - return nil -} - -// Convert_v1alpha3_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference is an autogenerated conversion function. -func Convert_v1alpha3_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(in *VSphereIdentityReference, out *v1beta1.VSphereIdentityReference, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(in, out, s) -} - -func autoConvert_v1beta1_VSphereIdentityReference_To_v1alpha3_VSphereIdentityReference(in *v1beta1.VSphereIdentityReference, out *VSphereIdentityReference, s conversion.Scope) error { - out.Kind = VSphereIdentityKind(in.Kind) - out.Name = in.Name - return nil -} - -// Convert_v1beta1_VSphereIdentityReference_To_v1alpha3_VSphereIdentityReference is an autogenerated conversion function. -func Convert_v1beta1_VSphereIdentityReference_To_v1alpha3_VSphereIdentityReference(in *v1beta1.VSphereIdentityReference, out *VSphereIdentityReference, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereIdentityReference_To_v1alpha3_VSphereIdentityReference(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine(in *VSphereMachine, out *v1beta1.VSphereMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine(in *VSphereMachine, out *v1beta1.VSphereMachine, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine(in *v1beta1.VSphereMachine, out *VSphereMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereMachineSpec_To_v1alpha3_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereMachineStatus_To_v1alpha3_VSphereMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine(in *v1beta1.VSphereMachine, out *VSphereMachine, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachineList_To_v1beta1_VSphereMachineList(in *VSphereMachineList, out *v1beta1.VSphereMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereMachine, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_VSphereMachine_To_v1beta1_VSphereMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_VSphereMachineList_To_v1beta1_VSphereMachineList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineList_To_v1beta1_VSphereMachineList(in *VSphereMachineList, out *v1beta1.VSphereMachineList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineList_To_v1beta1_VSphereMachineList(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineList_To_v1alpha3_VSphereMachineList(in *v1beta1.VSphereMachineList, out *VSphereMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachine, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereMachine_To_v1alpha3_VSphereMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereMachineList_To_v1alpha3_VSphereMachineList is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineList_To_v1alpha3_VSphereMachineList(in *v1beta1.VSphereMachineList, out *VSphereMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineList_To_v1alpha3_VSphereMachineList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(in *VSphereMachineSpec, out *v1beta1.VSphereMachineSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - return nil -} - -// Convert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(in *VSphereMachineSpec, out *v1beta1.VSphereMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineSpec_To_v1alpha3_VSphereMachineSpec(in *v1beta1.VSphereMachineSpec, out *VSphereMachineSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - // WARNING: in.PowerOffMode requires manual conversion: does not exist in peer-type - // WARNING: in.GuestSoftPowerOffTimeout requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(in *VSphereMachineStatus, out *v1beta1.VSphereMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]apiv1beta1.MachineAddress)(unsafe.Pointer(&in.Addresses)) - out.Network = *(*[]v1beta1.NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha3_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(in *VSphereMachineStatus, out *v1beta1.VSphereMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineStatus_To_v1alpha3_VSphereMachineStatus(in *v1beta1.VSphereMachineStatus, out *VSphereMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]apiv1alpha3.MachineAddress)(unsafe.Pointer(&in.Addresses)) - out.Network = *(*[]NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_VSphereMachineStatus_To_v1alpha3_VSphereMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineStatus_To_v1alpha3_VSphereMachineStatus(in *v1beta1.VSphereMachineStatus, out *VSphereMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineStatus_To_v1alpha3_VSphereMachineStatus(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(in *VSphereMachineTemplate, out *v1beta1.VSphereMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(in *VSphereMachineTemplate, out *v1beta1.VSphereMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate(in *v1beta1.VSphereMachineTemplate, out *VSphereMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha3_VSphereMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate(in *v1beta1.VSphereMachineTemplate, out *VSphereMachineTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(in *VSphereMachineTemplateList, out *v1beta1.VSphereMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(in *VSphereMachineTemplateList, out *v1beta1.VSphereMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplateList_To_v1alpha3_VSphereMachineTemplateList(in *v1beta1.VSphereMachineTemplateList, out *VSphereMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereMachineTemplate_To_v1alpha3_VSphereMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha3_VSphereMachineTemplateList is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha3_VSphereMachineTemplateList(in *v1beta1.VSphereMachineTemplateList, out *VSphereMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplateList_To_v1alpha3_VSphereMachineTemplateList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(in *VSphereMachineTemplateResource, out *v1beta1.VSphereMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha3_ObjectMeta_To_v1beta1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } - if err := Convert_v1alpha3_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(in *VSphereMachineTemplateResource, out *v1beta1.VSphereMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplateResource_To_v1alpha3_VSphereMachineTemplateResource(in *v1beta1.VSphereMachineTemplateResource, out *VSphereMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1beta1_ObjectMeta_To_v1alpha3_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereMachineSpec_To_v1alpha3_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha3_VSphereMachineTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha3_VSphereMachineTemplateResource(in *v1beta1.VSphereMachineTemplateResource, out *VSphereMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplateResource_To_v1alpha3_VSphereMachineTemplateResource(in, out, s) -} - -func autoConvert_v1alpha3_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(in *VSphereMachineTemplateSpec, out *v1beta1.VSphereMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha3_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(in *VSphereMachineTemplateSpec, out *v1beta1.VSphereMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha3_VSphereMachineTemplateSpec(in *v1beta1.VSphereMachineTemplateSpec, out *VSphereMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha3_VSphereMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha3_VSphereMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha3_VSphereMachineTemplateSpec(in *v1beta1.VSphereMachineTemplateSpec, out *VSphereMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha3_VSphereMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM(in *VSphereVM, out *v1beta1.VSphereVM, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_VSphereVMSpec_To_v1beta1_VSphereVMSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_VSphereVMStatus_To_v1beta1_VSphereVMStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM is an autogenerated conversion function. -func Convert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM(in *VSphereVM, out *v1beta1.VSphereVM, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM(in, out, s) -} - -func autoConvert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM(in *v1beta1.VSphereVM, out *VSphereVM, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereVMSpec_To_v1alpha3_VSphereVMSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereVMStatus_To_v1alpha3_VSphereVMStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM is an autogenerated conversion function. -func Convert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM(in *v1beta1.VSphereVM, out *VSphereVM, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM(in, out, s) -} - -func autoConvert_v1alpha3_VSphereVMList_To_v1beta1_VSphereVMList(in *VSphereVMList, out *v1beta1.VSphereVMList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereVM, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_VSphereVM_To_v1beta1_VSphereVM(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_VSphereVMList_To_v1beta1_VSphereVMList is an autogenerated conversion function. -func Convert_v1alpha3_VSphereVMList_To_v1beta1_VSphereVMList(in *VSphereVMList, out *v1beta1.VSphereVMList, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereVMList_To_v1beta1_VSphereVMList(in, out, s) -} - -func autoConvert_v1beta1_VSphereVMList_To_v1alpha3_VSphereVMList(in *v1beta1.VSphereVMList, out *VSphereVMList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereVM, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereVM_To_v1alpha3_VSphereVM(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereVMList_To_v1alpha3_VSphereVMList is an autogenerated conversion function. -func Convert_v1beta1_VSphereVMList_To_v1alpha3_VSphereVMList(in *v1beta1.VSphereVMList, out *VSphereVMList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVMList_To_v1alpha3_VSphereVMList(in, out, s) -} - -func autoConvert_v1alpha3_VSphereVMSpec_To_v1beta1_VSphereVMSpec(in *VSphereVMSpec, out *v1beta1.VSphereVMSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.BootstrapRef = (*v1.ObjectReference)(unsafe.Pointer(in.BootstrapRef)) - out.BiosUUID = in.BiosUUID - return nil -} - -// Convert_v1alpha3_VSphereVMSpec_To_v1beta1_VSphereVMSpec is an autogenerated conversion function. -func Convert_v1alpha3_VSphereVMSpec_To_v1beta1_VSphereVMSpec(in *VSphereVMSpec, out *v1beta1.VSphereVMSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereVMSpec_To_v1beta1_VSphereVMSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereVMSpec_To_v1alpha3_VSphereVMSpec(in *v1beta1.VSphereVMSpec, out *VSphereVMSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.BootstrapRef = (*v1.ObjectReference)(unsafe.Pointer(in.BootstrapRef)) - out.BiosUUID = in.BiosUUID - // WARNING: in.PowerOffMode requires manual conversion: does not exist in peer-type - // WARNING: in.GuestSoftPowerOffTimeout requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_VSphereVMStatus_To_v1beta1_VSphereVMStatus(in *VSphereVMStatus, out *v1beta1.VSphereVMStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) - out.CloneMode = v1beta1.CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.RetryAfter = in.RetryAfter - out.TaskRef = in.TaskRef - out.Network = *(*[]v1beta1.NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha3_VSphereVMStatus_To_v1beta1_VSphereVMStatus is an autogenerated conversion function. -func Convert_v1alpha3_VSphereVMStatus_To_v1beta1_VSphereVMStatus(in *VSphereVMStatus, out *v1beta1.VSphereVMStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_VSphereVMStatus_To_v1beta1_VSphereVMStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereVMStatus_To_v1alpha3_VSphereVMStatus(in *v1beta1.VSphereVMStatus, out *VSphereVMStatus, s conversion.Scope) error { - // WARNING: in.Host requires manual conversion: does not exist in peer-type - out.Ready = in.Ready - out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) - out.CloneMode = CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.RetryAfter = in.RetryAfter - out.TaskRef = in.TaskRef - out.Network = *(*[]NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - // WARNING: in.ModuleUUID requires manual conversion: does not exist in peer-type - // WARNING: in.VMRef requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_VirtualMachine_To_v1beta1_VirtualMachine(in *VirtualMachine, out *v1beta1.VirtualMachine, s conversion.Scope) error { - out.Name = in.Name - out.BiosUUID = in.BiosUUID - out.State = v1beta1.VirtualMachineState(in.State) - out.Network = *(*[]v1beta1.NetworkStatus)(unsafe.Pointer(&in.Network)) - out.VMRef = in.VMRef - return nil -} - -// Convert_v1alpha3_VirtualMachine_To_v1beta1_VirtualMachine is an autogenerated conversion function. -func Convert_v1alpha3_VirtualMachine_To_v1beta1_VirtualMachine(in *VirtualMachine, out *v1beta1.VirtualMachine, s conversion.Scope) error { - return autoConvert_v1alpha3_VirtualMachine_To_v1beta1_VirtualMachine(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachine_To_v1alpha3_VirtualMachine(in *v1beta1.VirtualMachine, out *VirtualMachine, s conversion.Scope) error { - out.Name = in.Name - out.BiosUUID = in.BiosUUID - out.State = VirtualMachineState(in.State) - out.Network = *(*[]NetworkStatus)(unsafe.Pointer(&in.Network)) - out.VMRef = in.VMRef - return nil -} - -// Convert_v1beta1_VirtualMachine_To_v1alpha3_VirtualMachine is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachine_To_v1alpha3_VirtualMachine(in *v1beta1.VirtualMachine, out *VirtualMachine, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachine_To_v1alpha3_VirtualMachine(in, out, s) -} - -func autoConvert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(in *VirtualMachineCloneSpec, out *v1beta1.VirtualMachineCloneSpec, s conversion.Scope) error { - out.Template = in.Template - out.CloneMode = v1beta1.CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.Server = in.Server - out.Thumbprint = in.Thumbprint - out.Datacenter = in.Datacenter - out.Folder = in.Folder - out.Datastore = in.Datastore - out.StoragePolicyName = in.StoragePolicyName - out.ResourcePool = in.ResourcePool - if err := Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(&in.Network, &out.Network, s); err != nil { - return err - } - out.NumCPUs = in.NumCPUs - out.NumCoresPerSocket = in.NumCoresPerSocket - out.MemoryMiB = in.MemoryMiB - out.DiskGiB = in.DiskGiB - out.CustomVMXKeys = *(*map[string]string)(unsafe.Pointer(&in.CustomVMXKeys)) - return nil -} - -// Convert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec is an autogenerated conversion function. -func Convert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(in *VirtualMachineCloneSpec, out *v1beta1.VirtualMachineCloneSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineCloneSpec_To_v1alpha3_VirtualMachineCloneSpec(in *v1beta1.VirtualMachineCloneSpec, out *VirtualMachineCloneSpec, s conversion.Scope) error { - out.Template = in.Template - out.CloneMode = CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.Server = in.Server - out.Thumbprint = in.Thumbprint - out.Datacenter = in.Datacenter - out.Folder = in.Folder - out.Datastore = in.Datastore - out.StoragePolicyName = in.StoragePolicyName - out.ResourcePool = in.ResourcePool - if err := Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(&in.Network, &out.Network, s); err != nil { - return err - } - out.NumCPUs = in.NumCPUs - out.NumCoresPerSocket = in.NumCoresPerSocket - out.MemoryMiB = in.MemoryMiB - out.DiskGiB = in.DiskGiB - // WARNING: in.AdditionalDisksGiB requires manual conversion: does not exist in peer-type - out.CustomVMXKeys = *(*map[string]string)(unsafe.Pointer(&in.CustomVMXKeys)) - // WARNING: in.TagIDs requires manual conversion: does not exist in peer-type - // WARNING: in.PciDevices requires manual conversion: does not exist in peer-type - // WARNING: in.OS requires manual conversion: does not exist in peer-type - // WARNING: in.HardwareVersion requires manual conversion: does not exist in peer-type - return nil -} diff --git a/apis/v1alpha3/zz_generated.deepcopy.go b/apis/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index 42eb3e64fb..0000000000 --- a/apis/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,1375 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - apiv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint. -func (in *APIEndpoint) DeepCopy() *APIEndpoint { - if in == nil { - return nil - } - out := new(APIEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllowedNamespaces) DeepCopyInto(out *AllowedNamespaces) { - *out = *in - in.Selector.DeepCopyInto(&out.Selector) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedNamespaces. -func (in *AllowedNamespaces) DeepCopy() *AllowedNamespaces { - if in == nil { - return nil - } - out := new(AllowedNamespaces) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPICloudConfig) DeepCopyInto(out *CPICloudConfig) { - *out = *in - if in.ExtraArgs != nil { - in, out := &in.ExtraArgs, &out.ExtraArgs - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPICloudConfig. -func (in *CPICloudConfig) DeepCopy() *CPICloudConfig { - if in == nil { - return nil - } - out := new(CPICloudConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIConfig) DeepCopyInto(out *CPIConfig) { - *out = *in - in.Global.DeepCopyInto(&out.Global) - if in.VCenter != nil { - in, out := &in.VCenter, &out.VCenter - *out = make(map[string]CPIVCenterConfig, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.Network = in.Network - out.Disk = in.Disk - out.Workspace = in.Workspace - out.Labels = in.Labels - in.ProviderConfig.DeepCopyInto(&out.ProviderConfig) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIConfig. -func (in *CPIConfig) DeepCopy() *CPIConfig { - if in == nil { - return nil - } - out := new(CPIConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIDiskConfig) DeepCopyInto(out *CPIDiskConfig) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIDiskConfig. -func (in *CPIDiskConfig) DeepCopy() *CPIDiskConfig { - if in == nil { - return nil - } - out := new(CPIDiskConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIGlobalConfig) DeepCopyInto(out *CPIGlobalConfig) { - *out = *in - if in.APIDisable != nil { - in, out := &in.APIDisable, &out.APIDisable - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIGlobalConfig. -func (in *CPIGlobalConfig) DeepCopy() *CPIGlobalConfig { - if in == nil { - return nil - } - out := new(CPIGlobalConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPILabelConfig) DeepCopyInto(out *CPILabelConfig) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPILabelConfig. -func (in *CPILabelConfig) DeepCopy() *CPILabelConfig { - if in == nil { - return nil - } - out := new(CPILabelConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPINetworkConfig) DeepCopyInto(out *CPINetworkConfig) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPINetworkConfig. -func (in *CPINetworkConfig) DeepCopy() *CPINetworkConfig { - if in == nil { - return nil - } - out := new(CPINetworkConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIProviderConfig) DeepCopyInto(out *CPIProviderConfig) { - *out = *in - if in.Cloud != nil { - in, out := &in.Cloud, &out.Cloud - *out = new(CPICloudConfig) - (*in).DeepCopyInto(*out) - } - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = new(CPIStorageConfig) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIProviderConfig. -func (in *CPIProviderConfig) DeepCopy() *CPIProviderConfig { - if in == nil { - return nil - } - out := new(CPIProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIStorageConfig) DeepCopyInto(out *CPIStorageConfig) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIStorageConfig. -func (in *CPIStorageConfig) DeepCopy() *CPIStorageConfig { - if in == nil { - return nil - } - out := new(CPIStorageConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIVCenterConfig) DeepCopyInto(out *CPIVCenterConfig) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIVCenterConfig. -func (in *CPIVCenterConfig) DeepCopy() *CPIVCenterConfig { - if in == nil { - return nil - } - out := new(CPIVCenterConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPIWorkspaceConfig) DeepCopyInto(out *CPIWorkspaceConfig) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPIWorkspaceConfig. -func (in *CPIWorkspaceConfig) DeepCopy() *CPIWorkspaceConfig { - if in == nil { - return nil - } - out := new(CPIWorkspaceConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FailureDomain) DeepCopyInto(out *FailureDomain) { - *out = *in - if in.AutoConfigure != nil { - in, out := &in.AutoConfigure, &out.AutoConfigure - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomain. -func (in *FailureDomain) DeepCopy() *FailureDomain { - if in == nil { - return nil - } - out := new(FailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FailureDomainHosts) DeepCopyInto(out *FailureDomainHosts) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomainHosts. -func (in *FailureDomainHosts) DeepCopy() *FailureDomainHosts { - if in == nil { - return nil - } - out := new(FailureDomainHosts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HAProxyLoadBalancer) DeepCopyInto(out *HAProxyLoadBalancer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HAProxyLoadBalancer. -func (in *HAProxyLoadBalancer) DeepCopy() *HAProxyLoadBalancer { - if in == nil { - return nil - } - out := new(HAProxyLoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HAProxyLoadBalancer) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HAProxyLoadBalancerList) DeepCopyInto(out *HAProxyLoadBalancerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HAProxyLoadBalancer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HAProxyLoadBalancerList. -func (in *HAProxyLoadBalancerList) DeepCopy() *HAProxyLoadBalancerList { - if in == nil { - return nil - } - out := new(HAProxyLoadBalancerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HAProxyLoadBalancerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HAProxyLoadBalancerSpec) DeepCopyInto(out *HAProxyLoadBalancerSpec) { - *out = *in - in.VirtualMachineConfiguration.DeepCopyInto(&out.VirtualMachineConfiguration) - if in.User != nil { - in, out := &in.User, &out.User - *out = new(SSHUser) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HAProxyLoadBalancerSpec. -func (in *HAProxyLoadBalancerSpec) DeepCopy() *HAProxyLoadBalancerSpec { - if in == nil { - return nil - } - out := new(HAProxyLoadBalancerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HAProxyLoadBalancerStatus) DeepCopyInto(out *HAProxyLoadBalancerStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HAProxyLoadBalancerStatus. -func (in *HAProxyLoadBalancerStatus) DeepCopy() *HAProxyLoadBalancerStatus { - if in == nil { - return nil - } - out := new(HAProxyLoadBalancerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Network) DeepCopyInto(out *Network) { - *out = *in - if in.DHCP4 != nil { - in, out := &in.DHCP4, &out.DHCP4 - *out = new(bool) - **out = **in - } - if in.DHCP6 != nil { - in, out := &in.DHCP6, &out.DHCP6 - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network. -func (in *Network) DeepCopy() *Network { - if in == nil { - return nil - } - out := new(Network) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkDeviceSpec) DeepCopyInto(out *NetworkDeviceSpec) { - *out = *in - if in.IPAddrs != nil { - in, out := &in.IPAddrs, &out.IPAddrs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(int64) - **out = **in - } - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]NetworkRouteSpec, len(*in)) - copy(*out, *in) - } - if in.SearchDomains != nil { - in, out := &in.SearchDomains, &out.SearchDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceSpec. -func (in *NetworkDeviceSpec) DeepCopy() *NetworkDeviceSpec { - if in == nil { - return nil - } - out := new(NetworkDeviceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkRouteSpec) DeepCopyInto(out *NetworkRouteSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRouteSpec. -func (in *NetworkRouteSpec) DeepCopy() *NetworkRouteSpec { - if in == nil { - return nil - } - out := new(NetworkRouteSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { - *out = *in - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]NetworkDeviceSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]NetworkRouteSpec, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { - *out = *in - if in.IPAddrs != nil { - in, out := &in.IPAddrs, &out.IPAddrs - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. -func (in *NetworkStatus) DeepCopy() *NetworkStatus { - if in == nil { - return nil - } - out := new(NetworkStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PlacementConstraint) DeepCopyInto(out *PlacementConstraint) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementConstraint. -func (in *PlacementConstraint) DeepCopy() *PlacementConstraint { - if in == nil { - return nil - } - out := new(PlacementConstraint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SSHUser) DeepCopyInto(out *SSHUser) { - *out = *in - if in.AuthorizedKeys != nil { - in, out := &in.AuthorizedKeys, &out.AuthorizedKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSHUser. -func (in *SSHUser) DeepCopy() *SSHUser { - if in == nil { - return nil - } - out := new(SSHUser) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Topology) DeepCopyInto(out *Topology) { - *out = *in - if in.ComputeCluster != nil { - in, out := &in.ComputeCluster, &out.ComputeCluster - *out = new(string) - **out = **in - } - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = new(FailureDomainHosts) - **out = **in - } - if in.Networks != nil { - in, out := &in.Networks, &out.Networks - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology. -func (in *Topology) DeepCopy() *Topology { - if in == nil { - return nil - } - out := new(Topology) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereCluster) DeepCopyInto(out *VSphereCluster) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereCluster. -func (in *VSphereCluster) DeepCopy() *VSphereCluster { - if in == nil { - return nil - } - out := new(VSphereCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereCluster) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentity) DeepCopyInto(out *VSphereClusterIdentity) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentity. -func (in *VSphereClusterIdentity) DeepCopy() *VSphereClusterIdentity { - if in == nil { - return nil - } - out := new(VSphereClusterIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterIdentity) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentityList) DeepCopyInto(out *VSphereClusterIdentityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereClusterIdentity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentityList. -func (in *VSphereClusterIdentityList) DeepCopy() *VSphereClusterIdentityList { - if in == nil { - return nil - } - out := new(VSphereClusterIdentityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterIdentityList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentitySpec) DeepCopyInto(out *VSphereClusterIdentitySpec) { - *out = *in - if in.AllowedNamespaces != nil { - in, out := &in.AllowedNamespaces, &out.AllowedNamespaces - *out = new(AllowedNamespaces) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentitySpec. -func (in *VSphereClusterIdentitySpec) DeepCopy() *VSphereClusterIdentitySpec { - if in == nil { - return nil - } - out := new(VSphereClusterIdentitySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentityStatus) DeepCopyInto(out *VSphereClusterIdentityStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentityStatus. -func (in *VSphereClusterIdentityStatus) DeepCopy() *VSphereClusterIdentityStatus { - if in == nil { - return nil - } - out := new(VSphereClusterIdentityStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterList) DeepCopyInto(out *VSphereClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterList. -func (in *VSphereClusterList) DeepCopy() *VSphereClusterList { - if in == nil { - return nil - } - out := new(VSphereClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterSpec) DeepCopyInto(out *VSphereClusterSpec) { - *out = *in - if in.Insecure != nil { - in, out := &in.Insecure, &out.Insecure - *out = new(bool) - **out = **in - } - in.CloudProviderConfiguration.DeepCopyInto(&out.CloudProviderConfiguration) - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.LoadBalancerRef != nil { - in, out := &in.LoadBalancerRef, &out.LoadBalancerRef - *out = new(v1.ObjectReference) - **out = **in - } - if in.IdentityRef != nil { - in, out := &in.IdentityRef, &out.IdentityRef - *out = new(VSphereIdentityReference) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterSpec. -func (in *VSphereClusterSpec) DeepCopy() *VSphereClusterSpec { - if in == nil { - return nil - } - out := new(VSphereClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterStatus) DeepCopyInto(out *VSphereClusterStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1alpha3.FailureDomains, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterStatus. -func (in *VSphereClusterStatus) DeepCopy() *VSphereClusterStatus { - if in == nil { - return nil - } - out := new(VSphereClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZone) DeepCopyInto(out *VSphereDeploymentZone) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZone. -func (in *VSphereDeploymentZone) DeepCopy() *VSphereDeploymentZone { - if in == nil { - return nil - } - out := new(VSphereDeploymentZone) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereDeploymentZone) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZoneList) DeepCopyInto(out *VSphereDeploymentZoneList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereDeploymentZone, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZoneList. -func (in *VSphereDeploymentZoneList) DeepCopy() *VSphereDeploymentZoneList { - if in == nil { - return nil - } - out := new(VSphereDeploymentZoneList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereDeploymentZoneList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZoneSpec) DeepCopyInto(out *VSphereDeploymentZoneSpec) { - *out = *in - if in.ControlPlane != nil { - in, out := &in.ControlPlane, &out.ControlPlane - *out = new(bool) - **out = **in - } - out.PlacementConstraint = in.PlacementConstraint -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZoneSpec. -func (in *VSphereDeploymentZoneSpec) DeepCopy() *VSphereDeploymentZoneSpec { - if in == nil { - return nil - } - out := new(VSphereDeploymentZoneSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZoneStatus) DeepCopyInto(out *VSphereDeploymentZoneStatus) { - *out = *in - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZoneStatus. -func (in *VSphereDeploymentZoneStatus) DeepCopy() *VSphereDeploymentZoneStatus { - if in == nil { - return nil - } - out := new(VSphereDeploymentZoneStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomain) DeepCopyInto(out *VSphereFailureDomain) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomain. -func (in *VSphereFailureDomain) DeepCopy() *VSphereFailureDomain { - if in == nil { - return nil - } - out := new(VSphereFailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereFailureDomain) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomainList) DeepCopyInto(out *VSphereFailureDomainList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereFailureDomain, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomainList. -func (in *VSphereFailureDomainList) DeepCopy() *VSphereFailureDomainList { - if in == nil { - return nil - } - out := new(VSphereFailureDomainList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereFailureDomainList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomainSpec) DeepCopyInto(out *VSphereFailureDomainSpec) { - *out = *in - in.Region.DeepCopyInto(&out.Region) - in.Zone.DeepCopyInto(&out.Zone) - in.Topology.DeepCopyInto(&out.Topology) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomainSpec. -func (in *VSphereFailureDomainSpec) DeepCopy() *VSphereFailureDomainSpec { - if in == nil { - return nil - } - out := new(VSphereFailureDomainSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereIdentityReference) DeepCopyInto(out *VSphereIdentityReference) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereIdentityReference. -func (in *VSphereIdentityReference) DeepCopy() *VSphereIdentityReference { - if in == nil { - return nil - } - out := new(VSphereIdentityReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachine) DeepCopyInto(out *VSphereMachine) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachine. -func (in *VSphereMachine) DeepCopy() *VSphereMachine { - if in == nil { - return nil - } - out := new(VSphereMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachine) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineList) DeepCopyInto(out *VSphereMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineList. -func (in *VSphereMachineList) DeepCopy() *VSphereMachineList { - if in == nil { - return nil - } - out := new(VSphereMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineSpec) DeepCopyInto(out *VSphereMachineSpec) { - *out = *in - in.VirtualMachineCloneSpec.DeepCopyInto(&out.VirtualMachineCloneSpec) - if in.ProviderID != nil { - in, out := &in.ProviderID, &out.ProviderID - *out = new(string) - **out = **in - } - if in.FailureDomain != nil { - in, out := &in.FailureDomain, &out.FailureDomain - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineSpec. -func (in *VSphereMachineSpec) DeepCopy() *VSphereMachineSpec { - if in == nil { - return nil - } - out := new(VSphereMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineStatus) DeepCopyInto(out *VSphereMachineStatus) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]apiv1alpha3.MachineAddress, len(*in)) - copy(*out, *in) - } - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = make([]NetworkStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureReason != nil { - in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) - **out = **in - } - if in.FailureMessage != nil { - in, out := &in.FailureMessage, &out.FailureMessage - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineStatus. -func (in *VSphereMachineStatus) DeepCopy() *VSphereMachineStatus { - if in == nil { - return nil - } - out := new(VSphereMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplate) DeepCopyInto(out *VSphereMachineTemplate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplate. -func (in *VSphereMachineTemplate) DeepCopy() *VSphereMachineTemplate { - if in == nil { - return nil - } - out := new(VSphereMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplateList) DeepCopyInto(out *VSphereMachineTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachineTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplateList. -func (in *VSphereMachineTemplateList) DeepCopy() *VSphereMachineTemplateList { - if in == nil { - return nil - } - out := new(VSphereMachineTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineTemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplateResource) DeepCopyInto(out *VSphereMachineTemplateResource) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplateResource. -func (in *VSphereMachineTemplateResource) DeepCopy() *VSphereMachineTemplateResource { - if in == nil { - return nil - } - out := new(VSphereMachineTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplateSpec) DeepCopyInto(out *VSphereMachineTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplateSpec. -func (in *VSphereMachineTemplateSpec) DeepCopy() *VSphereMachineTemplateSpec { - if in == nil { - return nil - } - out := new(VSphereMachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVM) DeepCopyInto(out *VSphereVM) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVM. -func (in *VSphereVM) DeepCopy() *VSphereVM { - if in == nil { - return nil - } - out := new(VSphereVM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereVM) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVMList) DeepCopyInto(out *VSphereVMList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereVM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVMList. -func (in *VSphereVMList) DeepCopy() *VSphereVMList { - if in == nil { - return nil - } - out := new(VSphereVMList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereVMList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVMSpec) DeepCopyInto(out *VSphereVMSpec) { - *out = *in - in.VirtualMachineCloneSpec.DeepCopyInto(&out.VirtualMachineCloneSpec) - if in.BootstrapRef != nil { - in, out := &in.BootstrapRef, &out.BootstrapRef - *out = new(v1.ObjectReference) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVMSpec. -func (in *VSphereVMSpec) DeepCopy() *VSphereVMSpec { - if in == nil { - return nil - } - out := new(VSphereVMSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVMStatus) DeepCopyInto(out *VSphereVMStatus) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.RetryAfter.DeepCopyInto(&out.RetryAfter) - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = make([]NetworkStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureReason != nil { - in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) - **out = **in - } - if in.FailureMessage != nil { - in, out := &in.FailureMessage, &out.FailureMessage - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVMStatus. -func (in *VSphereVMStatus) DeepCopy() *VSphereVMStatus { - if in == nil { - return nil - } - out := new(VSphereVMStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine) { - *out = *in - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = make([]NetworkStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachine. -func (in *VirtualMachine) DeepCopy() *VirtualMachine { - if in == nil { - return nil - } - out := new(VirtualMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachineCloneSpec) DeepCopyInto(out *VirtualMachineCloneSpec) { - *out = *in - in.Network.DeepCopyInto(&out.Network) - if in.CustomVMXKeys != nil { - in, out := &in.CustomVMXKeys, &out.CustomVMXKeys - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneSpec. -func (in *VirtualMachineCloneSpec) DeepCopy() *VirtualMachineCloneSpec { - if in == nil { - return nil - } - out := new(VirtualMachineCloneSpec) - in.DeepCopyInto(out) - return out -} diff --git a/apis/v1alpha4/conversion.go b/apis/v1alpha4/conversion.go deleted file mode 100644 index 289c7933a3..0000000000 --- a/apis/v1alpha4/conversion.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - "k8s.io/apimachinery/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec(in *infrav1.VirtualMachineCloneSpec, out *VirtualMachineCloneSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec(in, out, s) -} - -func Convert_v1beta1_VSphereVMStatus_To_v1alpha4_VSphereVMStatus(in *infrav1.VSphereVMStatus, out *VSphereVMStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVMStatus_To_v1alpha4_VSphereVMStatus(in, out, s) -} - -func Convert_v1beta1_VSphereClusterStatus_To_v1alpha4_VSphereClusterStatus(in *infrav1.VSphereClusterStatus, out *VSphereClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterStatus_To_v1alpha4_VSphereClusterStatus(in, out, s) -} - -func Convert_v1beta1_VSphereClusterSpec_To_v1alpha4_VSphereClusterSpec(in *infrav1.VSphereClusterSpec, out *VSphereClusterSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterSpec_To_v1alpha4_VSphereClusterSpec(in, out, s) -} - -func Convert_v1beta1_VSphereMachineSpec_To_v1alpha4_VSphereMachineSpec(in *infrav1.VSphereMachineSpec, out *VSphereMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineSpec_To_v1alpha4_VSphereMachineSpec(in, out, s) -} - -func Convert_v1beta1_VSphereVMSpec_To_v1alpha4_VSphereVMSpec(in *infrav1.VSphereVMSpec, out *VSphereVMSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVMSpec_To_v1alpha4_VSphereVMSpec(in, out, s) -} diff --git a/apis/v1alpha4/doc.go b/apis/v1alpha4/doc.go deleted file mode 100644 index ab53fd3072..0000000000 --- a/apis/v1alpha4/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha4 contains API Schema definitions for the infrastructure v1alpha4 API group -// +kubebuilder:object:generate=true -// +groupName=infrastructure.cluster.x-k8s.io -// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1 -// -// Deprecated: This package will be removed in one of the next releases. -package v1alpha4 diff --git a/apis/v1alpha4/groupversion_info.go b/apis/v1alpha4/groupversion_info.go deleted file mode 100644 index 9f27920f2b..0000000000 --- a/apis/v1alpha4/groupversion_info.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - // Version is the API version. - Version = "v1alpha4" - - // GroupName is the name of the API group. - GroupName = "infrastructure.cluster.x-k8s.io" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} - - // schemeBuilder is used to add go types to the GroupVersionKind scheme. - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = schemeBuilder.AddToScheme - - // objectTypes contains all types to be registered to the GroupVersion. - objectTypes = []runtime.Object{} - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = schemeBuilder -) - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, objectTypes...) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/apis/v1alpha4/networkdevicespec_conversion.go b/apis/v1alpha4/networkdevicespec_conversion.go deleted file mode 100644 index 042f3a84d9..0000000000 --- a/apis/v1alpha4/networkdevicespec_conversion.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -func Convert_v1beta1_NetworkDeviceSpec_To_v1alpha4_NetworkDeviceSpec(in *infrav1.NetworkDeviceSpec, out *NetworkDeviceSpec, s conversion.Scope) error { - out.NetworkName = in.NetworkName - out.DeviceName = in.DeviceName - out.DHCP4 = in.DHCP4 - out.DHCP6 = in.DHCP6 - out.Gateway4 = in.Gateway4 - out.Gateway6 = in.Gateway6 - out.IPAddrs = in.IPAddrs - out.MTU = in.MTU - out.MACAddr = in.MACAddr - out.Nameservers = in.Nameservers - out.SearchDomains = in.SearchDomains - if in.Routes != nil { - inRoutes, outRoutes := &in.Routes, &out.Routes - *outRoutes = make([]NetworkRouteSpec, len(*inRoutes)) - for i := range *inRoutes { - if err := Convert_v1beta1_NetworkRouteSpec_To_v1alpha4_NetworkRouteSpec(&(*inRoutes)[i], &(*outRoutes)[i], s); err != nil { - return err - } - } - } else { - out.Routes = nil - } - return nil -} diff --git a/apis/v1alpha4/types.go b/apis/v1alpha4/types.go deleted file mode 100644 index 35b89cc7cf..0000000000 --- a/apis/v1alpha4/types.go +++ /dev/null @@ -1,355 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - "fmt" - - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -const ( - // AnnotationClusterInfrastructureReady indicates the cluster's - // infrastructure sources are ready and machines may be created. - AnnotationClusterInfrastructureReady = "vsphere.infrastructure.cluster.x-k8s.io/infrastructure-ready" - - // AnnotationControlPlaneReady indicates the cluster's control plane is - // ready. - AnnotationControlPlaneReady = "vsphere.infrastructure.cluster.x-k8s.io/control-plane-ready" - - // ValueReady is the ready value for *Ready annotations. - ValueReady = "true" -) - -// CloneMode is the type of clone operation used to clone a VM from a template. -type CloneMode string - -const ( - // FullClone indicates a VM will have no relationship to the source of the - // clone operation once the operation is complete. This is the safest clone - // mode, but it is not the fastest. - FullClone CloneMode = "fullClone" - - // LinkedClone means resulting VMs will be dependent upon the snapshot of - // the source VM/template from which the VM was cloned. This is the fastest - // clone mode, but it also prevents expanding a VMs disk beyond the size of - // the source VM/template. - LinkedClone CloneMode = "linkedClone" -) - -// VirtualMachineCloneSpec is information used to clone a virtual machine. -type VirtualMachineCloneSpec struct { - // Template is the name or inventory path of the template used to clone - // the virtual machine. - // +kubebuilder:validation:MinLength=1 - Template string `json:"template"` - - // CloneMode specifies the type of clone operation. - // The LinkedClone mode is only support for templates that have at least - // one snapshot. If the template has no snapshots, then CloneMode defaults - // to FullClone. - // When LinkedClone mode is enabled the DiskGiB field is ignored as it is - // not possible to expand disks of linked clones. - // Defaults to LinkedClone, but fails gracefully to FullClone if the source - // of the clone operation has no snapshots. - // +optional - CloneMode CloneMode `json:"cloneMode,omitempty"` - - // Snapshot is the name of the snapshot from which to create a linked clone. - // This field is ignored if LinkedClone is not enabled. - // Defaults to the source's current snapshot. - // +optional - Snapshot string `json:"snapshot,omitempty"` - - // Server is the IP address or FQDN of the vSphere server on which - // the virtual machine is created/located. - // +optional - Server string `json:"server,omitempty"` - - // Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - // When this is set to empty, this VirtualMachine would be created - // without TLS certificate validation of the communication between Cluster API Provider vSphere - // and the VMware vCenter server. - // +optional - Thumbprint string `json:"thumbprint,omitempty"` - - // Datacenter is the name or inventory path of the datacenter in which the - // virtual machine is created/located. - // +optional - Datacenter string `json:"datacenter,omitempty"` - - // Folder is the name or inventory path of the folder in which the - // virtual machine is created/located. - // +optional - Folder string `json:"folder,omitempty"` - - // Datastore is the name or inventory path of the datastore in which the - // virtual machine is created/located. - // +optional - Datastore string `json:"datastore,omitempty"` - - // StoragePolicyName of the storage policy to use with this - // Virtual Machine - // +optional - StoragePolicyName string `json:"storagePolicyName,omitempty"` - - // ResourcePool is the name or inventory path of the resource pool in which - // the virtual machine is created/located. - // +optional - ResourcePool string `json:"resourcePool,omitempty"` - - // Network is the network configuration for this machine's VM. - Network NetworkSpec `json:"network"` - - // NumCPUs is the number of virtual processors in a virtual machine. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - NumCPUs int32 `json:"numCPUs,omitempty"` - // NumCPUs is the number of cores among which to distribute CPUs in this - // virtual machine. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - NumCoresPerSocket int32 `json:"numCoresPerSocket,omitempty"` - // MemoryMiB is the size of a virtual machine's memory, in MiB. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - MemoryMiB int64 `json:"memoryMiB,omitempty"` - // DiskGiB is the size of a virtual machine's disk, in GiB. - // Defaults to the eponymous property value in the template from which the - // virtual machine is cloned. - // +optional - DiskGiB int32 `json:"diskGiB,omitempty"` - // CustomVMXKeys is a dictionary of advanced VMX options that can be set on VM - // Defaults to empty map - // +optional - CustomVMXKeys map[string]string `json:"customVMXKeys,omitempty"` -} - -// VSphereMachineTemplateResource describes the data needed to create a VSphereMachine from a template -type VSphereMachineTemplateResource struct { - - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - ObjectMeta clusterv1alpha4.ObjectMeta `json:"metadata,omitempty"` - - // Spec is the specification of the desired behavior of the machine. - Spec VSphereMachineSpec `json:"spec"` -} - -// VSphereMachineProviderConditionType is a valid value for VSphereMachineProviderCondition.Type -type VSphereMachineProviderConditionType string - -// Valid conditions for an VSphere machine instance -const ( - // MachineCreated indicates whether the machine has been created or not. If not, - // it should include a reason and message for the failure. - MachineCreated VSphereMachineProviderConditionType = "MachineCreated" -) - -// APIEndpoint represents a reachable Kubernetes API endpoint. -type APIEndpoint struct { - // The hostname on which the API server is serving. - Host string `json:"host"` - - // The port on which the API server is serving. - Port int32 `json:"port"` -} - -// IsZero returns true if either the host or the port are zero values. -func (v APIEndpoint) IsZero() bool { - return v.Host == "" || v.Port == 0 -} - -// String returns a formatted version HOST:PORT of this APIEndpoint. -func (v APIEndpoint) String() string { - return fmt.Sprintf("%s:%d", v.Host, v.Port) -} - -// NetworkSpec defines the virtual machine's network configuration. -type NetworkSpec struct { - // Devices is the list of network devices used by the virtual machine. - // TODO(akutz) Make sure at least one network matches the - // ClusterSpec.CloudProviderConfiguration.Network.Name - Devices []NetworkDeviceSpec `json:"devices"` - - // Routes is a list of optional, static routes applied to the virtual - // machine. - // +optional - Routes []NetworkRouteSpec `json:"routes,omitempty"` - - // PreferredAPIServeCIDR is the preferred CIDR for the Kubernetes API - // server endpoint on this machine - // +optional - PreferredAPIServerCIDR string `json:"preferredAPIServerCidr,omitempty"` -} - -// NetworkDeviceSpec defines the network configuration for a virtual machine's -// network device. -type NetworkDeviceSpec struct { - // NetworkName is the name of the vSphere network to which the device - // will be connected. - NetworkName string `json:"networkName"` - - // DeviceName may be used to explicitly assign a name to the network device - // as it exists in the guest operating system. - // +optional - DeviceName string `json:"deviceName,omitempty"` - - // DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - // on this device. - // If true then IPAddrs should not contain any IPv4 addresses. - // +optional - DHCP4 bool `json:"dhcp4,omitempty"` - - // DHCP6 is a flag that indicates whether or not to use DHCP for IPv6 - // on this device. - // If true then IPAddrs should not contain any IPv6 addresses. - // +optional - DHCP6 bool `json:"dhcp6,omitempty"` - - // Gateway4 is the IPv4 gateway used by this device. - // Required when DHCP4 is false. - // +optional - Gateway4 string `json:"gateway4,omitempty"` - - // Gateway4 is the IPv4 gateway used by this device. - // Required when DHCP6 is false. - // +optional - Gateway6 string `json:"gateway6,omitempty"` - - // IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign - // to this device. IP addresses must also specify the segment length in - // CIDR notation. - // Required when DHCP4 and DHCP6 are both false. - // +optional - IPAddrs []string `json:"ipAddrs,omitempty"` - - // MTU is the device’s Maximum Transmission Unit size in bytes. - // +optional - MTU *int64 `json:"mtu,omitempty"` - - // MACAddr is the MAC address used by this device. - // It is generally a good idea to omit this field and allow a MAC address - // to be generated. - // Please note that this value must use the VMware OUI to work with the - // in-tree vSphere cloud provider. - // +optional - MACAddr string `json:"macAddr,omitempty"` - - // Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS - // nameservers. - // Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - // +optional - Nameservers []string `json:"nameservers,omitempty"` - - // Routes is a list of optional, static routes applied to the device. - // +optional - Routes []NetworkRouteSpec `json:"routes,omitempty"` - - // SearchDomains is a list of search domains used when resolving IP - // addresses with DNS. - // +optional - SearchDomains []string `json:"searchDomains,omitempty"` -} - -// NetworkRouteSpec defines a static network route. -type NetworkRouteSpec struct { - // To is an IPv4 or IPv6 address. - To string `json:"to"` - // Via is an IPv4 or IPv6 address. - Via string `json:"via"` - // Metric is the weight/priority of the route. - Metric int32 `json:"metric"` -} - -// NetworkStatus provides information about one of a VM's networks. -type NetworkStatus struct { - // Connected is a flag that indicates whether this network is currently - // connected to the VM. - Connected bool `json:"connected,omitempty"` - - // IPAddrs is one or more IP addresses reported by vm-tools. - // +optional - IPAddrs []string `json:"ipAddrs,omitempty"` - - // MACAddr is the MAC address of the network device. - MACAddr string `json:"macAddr"` - - // NetworkName is the name of the network. - // +optional - NetworkName string `json:"networkName,omitempty"` -} - -// VirtualMachineState describes the state of a VM. -type VirtualMachineState string - -const ( - // VirtualMachineStateNotFound is the string representing a VM that - // cannot be located. - VirtualMachineStateNotFound VirtualMachineState = "notfound" - - // VirtualMachineStatePending is the string representing a VM with an in-flight task. - VirtualMachineStatePending = "pending" - - // VirtualMachineStateReady is the string representing a powered-on VM with reported IP addresses. - VirtualMachineStateReady = "ready" -) - -// VirtualMachinePowerState describe the power state of a VM -type VirtualMachinePowerState string - -const ( - // VirtualMachinePowerStatePoweredOn is the string representing a VM in powered on state - VirtualMachinePowerStatePoweredOn VirtualMachinePowerState = "poweredOn" - - // VirtualMachinePowerStatePoweredOff is the string representing a VM in powered off state - VirtualMachinePowerStatePoweredOff = "poweredOff" - - // VirtualMachinePowerStateSuspended is the string representing a VM in suspended state - VirtualMachinePowerStateSuspended = "suspended" -) - -// VirtualMachine represents data about a vSphere virtual machine object. -type VirtualMachine struct { - // Name is the VM's name. - Name string `json:"name"` - - // BiosUUID is the VM's BIOS UUID. - BiosUUID string `json:"biosUUID"` - - // State is the VM's state. - State VirtualMachineState `json:"state"` - - // Network is the status of the VM's network devices. - Network []NetworkStatus `json:"network"` - - // VMRef is the VM's Managed Object Reference on vSphere. - VMRef string `json:"vmRef"` -} - -// SSHUser is granted remote access to a system. -type SSHUser struct { - // Name is the name of the SSH user. - Name string `json:"name"` - // AuthorizedKeys is one or more public SSH keys that grant remote access. - AuthorizedKeys []string `json:"authorizedKeys"` -} diff --git a/apis/v1alpha4/vspherecluster_conversion.go b/apis/v1alpha4/vspherecluster_conversion.go deleted file mode 100644 index e8ffaaf114..0000000000 --- a/apis/v1alpha4/vspherecluster_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereCluster to the Hub version (v1beta1). -func (src *VSphereCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereCluster) - return Convert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereCluster. -func (dst *VSphereCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereCluster) - return Convert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster(src, dst, nil) -} - -// ConvertTo converts this VSphereClusterList to the Hub version (v1beta1). -func (src *VSphereClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterList) - return Convert_v1alpha4_VSphereClusterList_To_v1beta1_VSphereClusterList(src, dst, nil) -} - -// ConvertFrom converts this VSphereVM to the Hub version (v1beta1). -func (dst *VSphereClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterList) - return Convert_v1beta1_VSphereClusterList_To_v1alpha4_VSphereClusterList(src, dst, nil) -} diff --git a/apis/v1alpha4/vspherecluster_types.go b/apis/v1alpha4/vspherecluster_types.go deleted file mode 100644 index df17a5bd9c..0000000000 --- a/apis/v1alpha4/vspherecluster_types.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -const ( - // ClusterFinalizer allows ReconcileVSphereCluster to clean up vSphere - // resources associated with VSphereCluster before removing it from the - // API server. - ClusterFinalizer = "vspherecluster.infrastructure.cluster.x-k8s.io" -) - -// VSphereClusterSpec defines the desired state of VSphereCluster -type VSphereClusterSpec struct { - // Server is the address of the vSphere endpoint. - Server string `json:"server,omitempty"` - - // Thumbprint is the colon-separated SHA-1 checksum of the given vCenter server's host certificate - // +optional - Thumbprint string `json:"thumbprint,omitempty"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint APIEndpoint `json:"controlPlaneEndpoint"` - - // IdentityRef is a reference to either a Secret or VSphereClusterIdentity that contains - // the identity to use when reconciling the cluster. - // +optional - IdentityRef *VSphereIdentityReference `json:"identityRef,omitempty"` -} - -// VSphereClusterStatus defines the observed state of VSphereClusterSpec -type VSphereClusterStatus struct { - // +optional - Ready bool `json:"ready,omitempty"` - - // Conditions defines current service state of the VSphereCluster. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` - - // FailureDomains is a list of failure domain objects synced from the infrastructure provider. - FailureDomains clusterv1alpha4.FailureDomains `json:"failureDomains,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vsphereclusters,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for VSphereMachine" -// +kubebuilder:printcolumn:name="Server",type="string",JSONPath=".spec.server",description="Server is the address of the vSphere endpoint" -// +kubebuilder:printcolumn:name="ControlPlaneEndpoint",type="string",JSONPath=".spec.controlPlaneEndpoint[0]",description="API Endpoint",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine" - -// VSphereCluster is the Schema for the vsphereclusters API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereCluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereClusterSpec `json:"spec,omitempty"` - Status VSphereClusterStatus `json:"status,omitempty"` -} - -// GetConditions returns the conditions for the VSphereCluster. -func (c *VSphereCluster) GetConditions() clusterv1alpha4.Conditions { - return c.Status.Conditions -} - -// GetConditions sets conditions on the VSphereCluster. -func (c *VSphereCluster) SetConditions(conditions clusterv1alpha4.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereClusterList contains a list of VSphereCluster -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereCluster `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereCluster{}, &VSphereClusterList{}) -} diff --git a/apis/v1alpha4/vsphereclusteridentity_conversion.go b/apis/v1alpha4/vsphereclusteridentity_conversion.go deleted file mode 100644 index b6499ddc7c..0000000000 --- a/apis/v1alpha4/vsphereclusteridentity_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereClusterIdentity to the Hub version (v1beta1). -func (src *VSphereClusterIdentity) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterIdentity) - return Convert_v1alpha4_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereClusterIdentity. -func (dst *VSphereClusterIdentity) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterIdentity) - return Convert_v1beta1_VSphereClusterIdentity_To_v1alpha4_VSphereClusterIdentity(src, dst, nil) -} - -// ConvertTo converts this VSphereClusterIdentityList to the Hub version (v1beta1). -func (src *VSphereClusterIdentityList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterIdentityList) - return Convert_v1alpha4_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(src, dst, nil) -} - -// ConvertFrom converts this VSphereClusterIdentityList to the Hub version (v1beta1). -func (dst *VSphereClusterIdentityList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterIdentityList) - return Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha4_VSphereClusterIdentityList(src, dst, nil) -} diff --git a/apis/v1alpha4/vsphereclusteridentity_types.go b/apis/v1alpha4/vsphereclusteridentity_types.go deleted file mode 100644 index 5ed3b6a866..0000000000 --- a/apis/v1alpha4/vsphereclusteridentity_types.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -const ( - // SecretIdentitySetFinalizer is the finalizer for VSphereCluster credentials secrets . - SecretIdentitySetFinalizer = "vspherecluster/infrastructure.cluster.x-k8s.io" -) - -type VSphereClusterIdentitySpec struct { - // SecretName references a Secret inside the controller namespace with the credentials to use - // +kubebuilder:validation:MinLength=1 - SecretName string `json:"secretName,omitempty"` - - // AllowedNamespaces is used to identify which namespaces are allowed to use this account. - // Namespaces can be selected with a label selector. - // If this object is nil, no namespaces will be allowed - // +optional - AllowedNamespaces *AllowedNamespaces `json:"allowedNamespaces,omitempty"` -} - -type VSphereClusterIdentityStatus struct { - // +optional - Ready bool `json:"ready,omitempty"` - - // Conditions defines current service state of the VSphereCluster. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` -} - -type AllowedNamespaces struct { - // Selector is a standard Kubernetes LabelSelector. A label query over a set of resources. - // +optional - Selector metav1.LabelSelector `json:"selector"` -} - -type VSphereIdentityKind string - -var ( - VSphereClusterIdentityKind = VSphereIdentityKind("VSphereClusterIdentity") - SecretKind = VSphereIdentityKind("Secret") -) - -type VSphereIdentityReference struct { - // Kind of the identity. Can either be VSphereClusterIdentity or Secret - // +kubebuilder:validation:Enum=VSphereClusterIdentity;Secret - Kind VSphereIdentityKind `json:"kind"` - - // Name of the identity. - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` -} - -func (c *VSphereClusterIdentity) GetConditions() clusterv1alpha4.Conditions { - return c.Status.Conditions -} - -func (c *VSphereClusterIdentity) SetConditions(conditions clusterv1alpha4.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vsphereclusteridentities,scope=Cluster,categories=cluster-api -// +kubebuilder:subresource:status - -// VSphereClusterIdentity defines the account to be used for reconciling clusters -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterIdentity struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereClusterIdentitySpec `json:"spec,omitempty"` - Status VSphereClusterIdentityStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereClusterIdentityList contains a list of VSphereClusterIdentity -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterIdentityList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereClusterIdentity `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereClusterIdentity{}, &VSphereClusterIdentityList{}) -} diff --git a/apis/v1alpha4/vsphereclustertemplate_conversion.go b/apis/v1alpha4/vsphereclustertemplate_conversion.go deleted file mode 100644 index 7736da4d27..0000000000 --- a/apis/v1alpha4/vsphereclustertemplate_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereClusterTemplate to the Hub version (v1beta1). -func (src *VSphereClusterTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterTemplate) - return Convert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereClusterTemplate. -func (dst *VSphereClusterTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterTemplate) - return Convert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate(src, dst, nil) -} - -// ConvertTo converts this VSphereClusterIdentityList to the Hub version (v1beta1). -func (src *VSphereClusterTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereClusterTemplateList) - return Convert_v1alpha4_VSphereClusterTemplateList_To_v1beta1_VSphereClusterTemplateList(src, dst, nil) -} - -// ConvertFrom converts this VSphereClusterIdentityList to the Hub version (v1beta1). -func (dst *VSphereClusterTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereClusterTemplateList) - return Convert_v1beta1_VSphereClusterTemplateList_To_v1alpha4_VSphereClusterTemplateList(src, dst, nil) -} diff --git a/apis/v1alpha4/vsphereclustertemplate_types.go b/apis/v1alpha4/vsphereclustertemplate_types.go deleted file mode 100644 index 311d752951..0000000000 --- a/apis/v1alpha4/vsphereclustertemplate_types.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// VSphereClusterTemplateSpec defines the desired state of VSphereClusterTemplate -type VSphereClusterTemplateSpec struct { - Template VSphereClusterTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vsphereclustertemplates,scope=Namespaced,categories=cluster-api - -// VSphereClusterTemplate is the Schema for the vsphereclustertemplates API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereClusterTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereClusterTemplateList contains a list of VSphereClusterTemplate. -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereClusterTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereClusterTemplate `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereClusterTemplate{}, &VSphereClusterTemplateList{}) -} - -type VSphereClusterTemplateResource struct { - Spec VSphereClusterSpec `json:"spec"` -} diff --git a/apis/v1alpha4/vspheredeploymentzone_conversion.go b/apis/v1alpha4/vspheredeploymentzone_conversion.go deleted file mode 100644 index 857fc6e741..0000000000 --- a/apis/v1alpha4/vspheredeploymentzone_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereDeploymentZone to the Hub version (v1beta1). -func (src *VSphereDeploymentZone) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereDeploymentZone) - return Convert_v1alpha4_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereDeploymentZone. -func (dst *VSphereDeploymentZone) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereDeploymentZone) - return Convert_v1beta1_VSphereDeploymentZone_To_v1alpha4_VSphereDeploymentZone(src, dst, nil) -} - -// ConvertTo converts this VSphereDeploymentZoneList to the Hub version (v1beta1). -func (src *VSphereDeploymentZoneList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereDeploymentZoneList) - return Convert_v1alpha4_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(src, dst, nil) -} - -// ConvertFrom converts this VSphereDeploymentZoneList to the Hub version (v1beta1). -func (dst *VSphereDeploymentZoneList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereDeploymentZoneList) - return Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha4_VSphereDeploymentZoneList(src, dst, nil) -} diff --git a/apis/v1alpha4/vspheredeploymentzone_types.go b/apis/v1alpha4/vspheredeploymentzone_types.go deleted file mode 100644 index 20abdff0ad..0000000000 --- a/apis/v1alpha4/vspheredeploymentzone_types.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -// VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone -type VSphereDeploymentZoneSpec struct { - - // Server is the address of the vSphere endpoint. - Server string `json:"server,omitempty"` - - // FailureDomain is the name of the VSphereFailureDomain used for this VSphereDeploymentZone - FailureDomain string `json:"failureDomain,omitempty"` - - // ControlPlane determines if this failure domain is suitable for use by control plane machines. - // +optional - ControlPlane *bool `json:"controlPlane,omitempty"` - - // PlacementConstraint encapsulates the placement constraints - // used within this deployment zone. - PlacementConstraint PlacementConstraint `json:"placementConstraint"` -} - -// PlacementConstraint is the context information for VM placements within a failure domain -type PlacementConstraint struct { - // ResourcePool is the name or inventory path of the resource pool in which - // the virtual machine is created/located. - // +optional - ResourcePool string `json:"resourcePool,omitempty"` - - // Folder is the name or inventory path of the folder in which the - // virtual machine is created/located. - // +optional - Folder string `json:"folder,omitempty"` -} - -type Network struct { - // Name is the network name for this machine's VM. - Name string `json:"name,omitempty"` - - // DHCP4 is a flag that indicates whether or not to use DHCP for IPv4 - // +optional - DHCP4 *bool `json:"dhcp4,omitempty"` - - // DHCP6 indicates whether or not to use DHCP for IPv6 - // +optional - DHCP6 *bool `json:"dhcp6,omitempty"` -} - -type VSphereDeploymentZoneStatus struct { - // Ready is true when the VSphereDeploymentZone resource is ready. - // If set to false, it will be ignored by VSphereClusters - // +optional - Ready *bool `json:"ready,omitempty"` - - // Conditions defines current service state of the VSphereMachine. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspheredeploymentzones,scope=Cluster,categories=cluster-api -// +kubebuilder:subresource:status - -// VSphereDeploymentZone is the Schema for the vspheredeploymentzones API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereDeploymentZone struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereDeploymentZoneSpec `json:"spec,omitempty"` - Status VSphereDeploymentZoneStatus `json:"status,omitempty"` -} - -func (z *VSphereDeploymentZone) GetConditions() clusterv1alpha4.Conditions { - return z.Status.Conditions -} - -func (z *VSphereDeploymentZone) SetConditions(conditions clusterv1alpha4.Conditions) { - z.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereDeploymentZoneList contains a list of VSphereDeploymentZone -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereDeploymentZoneList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereDeploymentZone `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereDeploymentZone{}, &VSphereDeploymentZoneList{}) -} diff --git a/apis/v1alpha4/vspherefailuredomain_conversion.go b/apis/v1alpha4/vspherefailuredomain_conversion.go deleted file mode 100644 index 006033f971..0000000000 --- a/apis/v1alpha4/vspherefailuredomain_conversion.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereFailureDomain to the Hub version (v1beta1). -func (src *VSphereFailureDomain) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereFailureDomain) - return Convert_v1alpha4_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereFailureDomain. -func (dst *VSphereFailureDomain) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereFailureDomain) - return Convert_v1beta1_VSphereFailureDomain_To_v1alpha4_VSphereFailureDomain(src, dst, nil) -} - -// ConvertTo converts this VSphereFailureDomainList to the Hub version (v1beta1). -func (src *VSphereFailureDomainList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereFailureDomainList) - return Convert_v1alpha4_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(src, dst, nil) -} - -// ConvertFrom converts this VSphereFailureDomainList to the Hub version (v1beta1). -func (dst *VSphereFailureDomainList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereFailureDomainList) - return Convert_v1beta1_VSphereFailureDomainList_To_v1alpha4_VSphereFailureDomainList(src, dst, nil) -} diff --git a/apis/v1alpha4/vspherefailuredomain_types.go b/apis/v1alpha4/vspherefailuredomain_types.go deleted file mode 100644 index e19be8c7dc..0000000000 --- a/apis/v1alpha4/vspherefailuredomain_types.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type FailureDomainType string - -const ( - HostGroupFailureDomain FailureDomainType = "HostGroup" - ComputeClusterFailureDomain FailureDomainType = "ComputeCluster" - DatacenterFailureDomain FailureDomainType = "Datacenter" -) - -// VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain -type VSphereFailureDomainSpec struct { - - // Region defines the name and type of a region - Region FailureDomain `json:"region"` - - // Zone defines the name and type of a zone - Zone FailureDomain `json:"zone"` - - // Topology describes a given failure domain using vSphere constructs - Topology Topology `json:"topology"` -} - -type FailureDomain struct { - // Name is the name of the tag that represents this failure domain - Name string `json:"name"` - - // Type is the type of failure domain, the current values are "Datacenter", "ComputeCluster" and "HostGroup" - // +kubebuilder:validation:Enum=Datacenter;ComputeCluster;HostGroup - Type FailureDomainType `json:"type"` - - // TagCategory is the category used for the tag - TagCategory string `json:"tagCategory"` - - // AutoConfigure tags the Type which is specified in the Topology - AutoConfigure *bool `json:"autoConfigure,omitempty"` -} - -type Topology struct { - // The underlying infrastructure for this failure domain - // Datacenter as the failure domain - // +kubebuilder:validation:Required - Datacenter string `json:"datacenter"` - - // ComputeCluster as the failure domain - // +optional - ComputeCluster *string `json:"computeCluster,omitempty"` - - // Hosts has information required for placement of machines on VSphere hosts. - // +optional - Hosts *FailureDomainHosts `json:"hosts,omitempty"` - - // Networks is the list of networks within this failure domain - // +optional - Networks []string `json:"networks,omitempty"` - - // Datastore is the name or inventory path of the datastore in which the - // virtual machine is created/located. - // +optional - Datastore string `json:"datastore,omitempty"` -} - -type FailureDomainHosts struct { - // VMGroupName is the name of the VM group - VMGroupName string `json:"vmGroupName"` - - // HostGroupName is the name of the Host group - HostGroupName string `json:"hostGroupName"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspherefailuredomains,scope=Cluster,categories=cluster-api - -// VSphereFailureDomain is the Schema for the vspherefailuredomains API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereFailureDomain struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereFailureDomainSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereFailureDomainList contains a list of VSphereFailureDomain -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereFailureDomainList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereFailureDomain `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereFailureDomain{}, &VSphereFailureDomainList{}) -} diff --git a/apis/v1alpha4/vspheremachine_conversion.go b/apis/v1alpha4/vspheremachine_conversion.go deleted file mode 100644 index be24354e57..0000000000 --- a/apis/v1alpha4/vspheremachine_conversion.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereMachine to the Hub version (v1beta1). -func (src *VSphereMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachine) - if err := Convert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereMachine{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.AdditionalDisksGiB = restored.Spec.AdditionalDisksGiB - dst.Spec.TagIDs = restored.Spec.TagIDs - dst.Spec.PowerOffMode = restored.Spec.PowerOffMode - dst.Spec.GuestSoftPowerOffTimeout = restored.Spec.GuestSoftPowerOffTimeout - for i := range dst.Spec.Network.Devices { - dst.Spec.Network.Devices[i].AddressesFromPools = restored.Spec.Network.Devices[i].AddressesFromPools - dst.Spec.Network.Devices[i].DHCP4Overrides = restored.Spec.Network.Devices[i].DHCP4Overrides - dst.Spec.Network.Devices[i].DHCP6Overrides = restored.Spec.Network.Devices[i].DHCP6Overrides - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereMachine. -func (dst *VSphereMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachine) - return Convert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine(src, dst, nil) -} - -// ConvertTo converts this VSphereMachineList to the Hub version (v1beta1). -func (src *VSphereMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachineList) - return Convert_v1alpha4_VSphereMachineList_To_v1beta1_VSphereMachineList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereMachineList. -func (dst *VSphereMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachineList) - return Convert_v1beta1_VSphereMachineList_To_v1alpha4_VSphereMachineList(src, dst, nil) -} diff --git a/apis/v1alpha4/vspheremachine_types.go b/apis/v1alpha4/vspheremachine_types.go deleted file mode 100644 index 1df8a61e1f..0000000000 --- a/apis/v1alpha4/vspheremachine_types.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // MachineFinalizer allows ReconcileVSphereMachine to clean up VSphere - // resources associated with VSphereMachine before removing it from the - // API Server. - MachineFinalizer = "vspheremachine.infrastructure.cluster.x-k8s.io" -) - -// VSphereMachineSpec defines the desired state of VSphereMachine -type VSphereMachineSpec struct { - VirtualMachineCloneSpec `json:",inline"` - - // ProviderID is the virtual machine's BIOS UUID formated as - // vsphere://12345678-1234-1234-1234-123456789abc - // +optional - ProviderID *string `json:"providerID,omitempty"` - - // FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. - // For this infrastructure provider, the name is equivalent to the name of the VSphereDeploymentZone. - FailureDomain *string `json:"failureDomain,omitempty"` -} - -// VSphereMachineStatus defines the observed state of VSphereMachine -type VSphereMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the VSphere instance associated addresses. - Addresses []clusterv1alpha4.MachineAddress `json:"addresses,omitempty"` - - // Network returns the network status for each of the machine's configured - // network interfaces. - // +optional - Network []NetworkStatus `json:"network,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a succinct value suitable - // for machine interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // FailureMessage will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the VSphereMachine. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspheremachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this VSphereMachine belongs" -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status" -// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="VSphereMachine instance ID" -// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns this VSphereMachine",priority=1 -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of Machine" - -// VSphereMachine is the Schema for the vspheremachines API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereMachineSpec `json:"spec,omitempty"` - Status VSphereMachineStatus `json:"status,omitempty"` -} - -func (m *VSphereMachine) GetConditions() clusterv1alpha4.Conditions { - return m.Status.Conditions -} - -func (m *VSphereMachine) SetConditions(conditions clusterv1alpha4.Conditions) { - m.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereMachineList contains a list of VSphereMachine -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereMachine `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereMachine{}, &VSphereMachineList{}) -} diff --git a/apis/v1alpha4/vspheremachinetemplate_conversion.go b/apis/v1alpha4/vspheremachinetemplate_conversion.go deleted file mode 100644 index e1c2a4ea8e..0000000000 --- a/apis/v1alpha4/vspheremachinetemplate_conversion.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereMachineTemplate to the Hub version (v1beta1). -func (src *VSphereMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachineTemplate) - if err := Convert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereMachineTemplate{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - dst.Spec.Template.Spec.TagIDs = restored.Spec.Template.Spec.TagIDs - dst.Spec.Template.Spec.AdditionalDisksGiB = restored.Spec.Template.Spec.AdditionalDisksGiB - dst.Spec.Template.Spec.PowerOffMode = restored.Spec.Template.Spec.PowerOffMode - dst.Spec.Template.Spec.GuestSoftPowerOffTimeout = restored.Spec.Template.Spec.GuestSoftPowerOffTimeout - for i := range dst.Spec.Template.Spec.Network.Devices { - dst.Spec.Template.Spec.Network.Devices[i].AddressesFromPools = restored.Spec.Template.Spec.Network.Devices[i].AddressesFromPools - dst.Spec.Template.Spec.Network.Devices[i].DHCP4Overrides = restored.Spec.Template.Spec.Network.Devices[i].DHCP4Overrides - dst.Spec.Template.Spec.Network.Devices[i].DHCP6Overrides = restored.Spec.Template.Spec.Network.Devices[i].DHCP6Overrides - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereMachineTemplate. -func (dst *VSphereMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachineTemplate) - if err := Convert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - return nil -} - -func (src *VSphereMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereMachineTemplateList) - return Convert_v1alpha4_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(src, dst, nil) -} - -func (dst *VSphereMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereMachineTemplateList) - return Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha4_VSphereMachineTemplateList(src, dst, nil) -} - -func Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in *clusterv1alpha4.ObjectMeta, out *clusterv1.ObjectMeta, s apiconversion.Scope) error { - // wrapping the conversion func to avoid having compile errors due to compileErrorOnMissingConversion() - // more details at https://github.com/kubernetes/kubernetes/issues/98380 - return clusterv1alpha4.Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(in, out, s) -} - -func Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in *clusterv1.ObjectMeta, out *clusterv1alpha4.ObjectMeta, s apiconversion.Scope) error { - // wrapping the conversion func to avoid having compile errors due to compileErrorOnMissingConversion() - // more details at https://github.com/kubernetes/kubernetes/issues/98380 - return clusterv1alpha4.Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(in, out, s) -} diff --git a/apis/v1alpha4/vspheremachinetemplate_types.go b/apis/v1alpha4/vspheremachinetemplate_types.go deleted file mode 100644 index 888934c5b6..0000000000 --- a/apis/v1alpha4/vspheremachinetemplate_types.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate -type VSphereMachineTemplateSpec struct { - Template VSphereMachineTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspheremachinetemplates,scope=Namespaced,categories=cluster-api - -// VSphereMachineTemplate is the Schema for the vspheremachinetemplates API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachineTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereMachineTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// VSphereMachineTemplateList contains a list of VSphereMachineTemplate -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereMachineTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereMachineTemplate `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereMachineTemplate{}, &VSphereMachineTemplateList{}) -} diff --git a/apis/v1alpha4/vspherevm_conversion.go b/apis/v1alpha4/vspherevm_conversion.go deleted file mode 100644 index 023c6a65fd..0000000000 --- a/apis/v1alpha4/vspherevm_conversion.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha4 - -import ( - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" - - infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" -) - -// ConvertTo converts this VSphereVM to the Hub version (v1beta1). -func (src *VSphereVM) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereVM) - if err := Convert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.VSphereVM{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - dst.Spec.TagIDs = restored.Spec.TagIDs - dst.Spec.AdditionalDisksGiB = restored.Spec.AdditionalDisksGiB - dst.Spec.PowerOffMode = restored.Spec.PowerOffMode - dst.Spec.GuestSoftPowerOffTimeout = restored.Spec.GuestSoftPowerOffTimeout - dst.Status.Host = restored.Status.Host - for i := range dst.Spec.Network.Devices { - dst.Spec.Network.Devices[i].AddressesFromPools = restored.Spec.Network.Devices[i].AddressesFromPools - dst.Spec.Network.Devices[i].DHCP4Overrides = restored.Spec.Network.Devices[i].DHCP4Overrides - dst.Spec.Network.Devices[i].DHCP6Overrides = restored.Spec.Network.Devices[i].DHCP6Overrides - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this VSphereVM. -func (dst *VSphereVM) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereVM) - if err := Convert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - return nil -} - -// ConvertTo converts this VSphereVMList to the Hub version (v1beta1). -func (src *VSphereVMList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.VSphereVMList) - return Convert_v1alpha4_VSphereVMList_To_v1beta1_VSphereVMList(src, dst, nil) -} - -// ConvertFrom converts this VSphereVM to the Hub version (v1beta1). -func (dst *VSphereVMList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.VSphereVMList) - return Convert_v1beta1_VSphereVMList_To_v1alpha4_VSphereVMList(src, dst, nil) -} diff --git a/apis/v1alpha4/vspherevm_types.go b/apis/v1alpha4/vspherevm_types.go deleted file mode 100644 index 03fc542e96..0000000000 --- a/apis/v1alpha4/vspherevm_types.go +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -//nolint:godot -package v1alpha4 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // VMFinalizer allows the reconciler to clean up resources associated - // with a VSphereVM before removing it from the API Server. - VMFinalizer = "vspherevm.infrastructure.cluster.x-k8s.io" -) - -// VSphereVMSpec defines the desired state of VSphereVM. -type VSphereVMSpec struct { - VirtualMachineCloneSpec `json:",inline"` - - // BootstrapRef is a reference to a bootstrap provider-specific resource - // that holds configuration details. - // This field is optional in case no bootstrap data is required to create - // a VM. - // +optional - BootstrapRef *corev1.ObjectReference `json:"bootstrapRef,omitempty"` - - // BiosUUID is the VM's BIOS UUID that is assigned at runtime after - // the VM has been created. - // This field is required at runtime for other controllers that read - // this CRD as unstructured data. - // +optional - BiosUUID string `json:"biosUUID,omitempty"` -} - -// VSphereVMStatus defines the observed state of VSphereVM -type VSphereVMStatus struct { - // Ready is true when the provider resource is ready. - // This field is required at runtime for other controllers that read - // this CRD as unstructured data. - // +optional - Ready bool `json:"ready,omitempty"` - - // Addresses is a list of the VM's IP addresses. - // This field is required at runtime for other controllers that read - // this CRD as unstructured data. - // +optional - Addresses []string `json:"addresses,omitempty"` - - // CloneMode is the type of clone operation used to clone this VM. Since - // LinkedMode is the default but fails gracefully if the source of the - // clone has no snapshots, this field may be used to determine the actual - // type of clone operation used to create this VM. - // +optional - CloneMode CloneMode `json:"cloneMode,omitempty"` - - // Snapshot is the name of the snapshot from which the VM was cloned if - // LinkedMode is enabled. - // +optional - Snapshot string `json:"snapshot,omitempty"` - - // RetryAfter tracks the time we can retry queueing a task - // +optional - RetryAfter metav1.Time `json:"retryAfter,omitempty"` - - // TaskRef is a managed object reference to a Task related to the machine. - // This value is set automatically at runtime and should not be set or - // modified by users. - // +optional - TaskRef string `json:"taskRef,omitempty"` - - // Network returns the network status for each of the machine's configured - // network interfaces. - // +optional - Network []NetworkStatus `json:"network,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the vspherevm and will contain a succinct value suitable - // for vm interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the vm. - // - // Any transient errors that occur during the reconciliation of vspherevms - // can be added as events to the vspherevm object and/or logged in the - // controller's output. - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // FailureMessage will be set in the event that there is a terminal problem - // reconciling the vspherevm and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the vm. - // - // Any transient errors that occur during the reconciliation of vspherevms - // can be added as events to the vspherevm object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the VSphereVM. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:deprecatedversion -// +kubebuilder:resource:path=vspherevms,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// VSphereVM is the Schema for the vspherevms API -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereVM struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec VSphereVMSpec `json:"spec,omitempty"` - Status VSphereVMStatus `json:"status,omitempty"` -} - -func (r *VSphereVM) GetConditions() clusterv1alpha4.Conditions { - return r.Status.Conditions -} - -func (r *VSphereVM) SetConditions(conditions clusterv1alpha4.Conditions) { - r.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// VSphereVMList contains a list of VSphereVM -// -// Deprecated: This type will be removed in one of the next releases. -type VSphereVMList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []VSphereVM `json:"items"` -} - -func init() { - objectTypes = append(objectTypes, &VSphereVM{}, &VSphereVMList{}) -} diff --git a/apis/v1alpha4/zz_generated.conversion.go b/apis/v1alpha4/zz_generated.conversion.go deleted file mode 100644 index cfed962c4c..0000000000 --- a/apis/v1alpha4/zz_generated.conversion.go +++ /dev/null @@ -1,1849 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha4 - -import ( - unsafe "unsafe" - - v1 "k8s.io/api/core/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1beta1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - apiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - errors "sigs.k8s.io/cluster-api/errors" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*APIEndpoint)(nil), (*v1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(a.(*APIEndpoint), b.(*v1beta1.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.APIEndpoint)(nil), (*APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*v1beta1.APIEndpoint), b.(*APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AllowedNamespaces)(nil), (*v1beta1.AllowedNamespaces)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AllowedNamespaces_To_v1beta1_AllowedNamespaces(a.(*AllowedNamespaces), b.(*v1beta1.AllowedNamespaces), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AllowedNamespaces)(nil), (*AllowedNamespaces)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AllowedNamespaces_To_v1alpha4_AllowedNamespaces(a.(*v1beta1.AllowedNamespaces), b.(*AllowedNamespaces), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FailureDomain)(nil), (*v1beta1.FailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain(a.(*FailureDomain), b.(*v1beta1.FailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FailureDomain)(nil), (*FailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain(a.(*v1beta1.FailureDomain), b.(*FailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*FailureDomainHosts)(nil), (*v1beta1.FailureDomainHosts)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FailureDomainHosts_To_v1beta1_FailureDomainHosts(a.(*FailureDomainHosts), b.(*v1beta1.FailureDomainHosts), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.FailureDomainHosts)(nil), (*FailureDomainHosts)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FailureDomainHosts_To_v1alpha4_FailureDomainHosts(a.(*v1beta1.FailureDomainHosts), b.(*FailureDomainHosts), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Network)(nil), (*v1beta1.Network)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Network_To_v1beta1_Network(a.(*Network), b.(*v1beta1.Network), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.Network)(nil), (*Network)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Network_To_v1alpha4_Network(a.(*v1beta1.Network), b.(*Network), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkDeviceSpec)(nil), (*v1beta1.NetworkDeviceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(a.(*NetworkDeviceSpec), b.(*v1beta1.NetworkDeviceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkRouteSpec)(nil), (*v1beta1.NetworkRouteSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(a.(*NetworkRouteSpec), b.(*v1beta1.NetworkRouteSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkRouteSpec)(nil), (*NetworkRouteSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkRouteSpec_To_v1alpha4_NetworkRouteSpec(a.(*v1beta1.NetworkRouteSpec), b.(*NetworkRouteSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkSpec)(nil), (*v1beta1.NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(a.(*NetworkSpec), b.(*v1beta1.NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkSpec)(nil), (*NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(a.(*v1beta1.NetworkSpec), b.(*NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkStatus)(nil), (*v1beta1.NetworkStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NetworkStatus_To_v1beta1_NetworkStatus(a.(*NetworkStatus), b.(*v1beta1.NetworkStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkStatus)(nil), (*NetworkStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkStatus_To_v1alpha4_NetworkStatus(a.(*v1beta1.NetworkStatus), b.(*NetworkStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PlacementConstraint)(nil), (*v1beta1.PlacementConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_PlacementConstraint_To_v1beta1_PlacementConstraint(a.(*PlacementConstraint), b.(*v1beta1.PlacementConstraint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.PlacementConstraint)(nil), (*PlacementConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PlacementConstraint_To_v1alpha4_PlacementConstraint(a.(*v1beta1.PlacementConstraint), b.(*PlacementConstraint), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SSHUser)(nil), (*v1beta1.SSHUser)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SSHUser_To_v1beta1_SSHUser(a.(*SSHUser), b.(*v1beta1.SSHUser), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.SSHUser)(nil), (*SSHUser)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SSHUser_To_v1alpha4_SSHUser(a.(*v1beta1.SSHUser), b.(*SSHUser), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Topology)(nil), (*v1beta1.Topology)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Topology_To_v1beta1_Topology(a.(*Topology), b.(*v1beta1.Topology), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.Topology)(nil), (*Topology)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Topology_To_v1alpha4_Topology(a.(*v1beta1.Topology), b.(*Topology), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereCluster)(nil), (*v1beta1.VSphereCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster(a.(*VSphereCluster), b.(*v1beta1.VSphereCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereCluster)(nil), (*VSphereCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster(a.(*v1beta1.VSphereCluster), b.(*VSphereCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentity)(nil), (*v1beta1.VSphereClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(a.(*VSphereClusterIdentity), b.(*v1beta1.VSphereClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentity)(nil), (*VSphereClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentity_To_v1alpha4_VSphereClusterIdentity(a.(*v1beta1.VSphereClusterIdentity), b.(*VSphereClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentityList)(nil), (*v1beta1.VSphereClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(a.(*VSphereClusterIdentityList), b.(*v1beta1.VSphereClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentityList)(nil), (*VSphereClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha4_VSphereClusterIdentityList(a.(*v1beta1.VSphereClusterIdentityList), b.(*VSphereClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentitySpec)(nil), (*v1beta1.VSphereClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(a.(*VSphereClusterIdentitySpec), b.(*v1beta1.VSphereClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentitySpec)(nil), (*VSphereClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha4_VSphereClusterIdentitySpec(a.(*v1beta1.VSphereClusterIdentitySpec), b.(*VSphereClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterIdentityStatus)(nil), (*v1beta1.VSphereClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(a.(*VSphereClusterIdentityStatus), b.(*v1beta1.VSphereClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterIdentityStatus)(nil), (*VSphereClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha4_VSphereClusterIdentityStatus(a.(*v1beta1.VSphereClusterIdentityStatus), b.(*VSphereClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterList)(nil), (*v1beta1.VSphereClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterList_To_v1beta1_VSphereClusterList(a.(*VSphereClusterList), b.(*v1beta1.VSphereClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterList)(nil), (*VSphereClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterList_To_v1alpha4_VSphereClusterList(a.(*v1beta1.VSphereClusterList), b.(*VSphereClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterSpec)(nil), (*v1beta1.VSphereClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(a.(*VSphereClusterSpec), b.(*v1beta1.VSphereClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterStatus)(nil), (*v1beta1.VSphereClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(a.(*VSphereClusterStatus), b.(*v1beta1.VSphereClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterTemplate)(nil), (*v1beta1.VSphereClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate(a.(*VSphereClusterTemplate), b.(*v1beta1.VSphereClusterTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterTemplate)(nil), (*VSphereClusterTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate(a.(*v1beta1.VSphereClusterTemplate), b.(*VSphereClusterTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterTemplateList)(nil), (*v1beta1.VSphereClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterTemplateList_To_v1beta1_VSphereClusterTemplateList(a.(*VSphereClusterTemplateList), b.(*v1beta1.VSphereClusterTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterTemplateList)(nil), (*VSphereClusterTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterTemplateList_To_v1alpha4_VSphereClusterTemplateList(a.(*v1beta1.VSphereClusterTemplateList), b.(*VSphereClusterTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterTemplateResource)(nil), (*v1beta1.VSphereClusterTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterTemplateResource_To_v1beta1_VSphereClusterTemplateResource(a.(*VSphereClusterTemplateResource), b.(*v1beta1.VSphereClusterTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterTemplateResource)(nil), (*VSphereClusterTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterTemplateResource_To_v1alpha4_VSphereClusterTemplateResource(a.(*v1beta1.VSphereClusterTemplateResource), b.(*VSphereClusterTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereClusterTemplateSpec)(nil), (*v1beta1.VSphereClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereClusterTemplateSpec_To_v1beta1_VSphereClusterTemplateSpec(a.(*VSphereClusterTemplateSpec), b.(*v1beta1.VSphereClusterTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereClusterTemplateSpec)(nil), (*VSphereClusterTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterTemplateSpec_To_v1alpha4_VSphereClusterTemplateSpec(a.(*v1beta1.VSphereClusterTemplateSpec), b.(*VSphereClusterTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZone)(nil), (*v1beta1.VSphereDeploymentZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(a.(*VSphereDeploymentZone), b.(*v1beta1.VSphereDeploymentZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZone)(nil), (*VSphereDeploymentZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZone_To_v1alpha4_VSphereDeploymentZone(a.(*v1beta1.VSphereDeploymentZone), b.(*VSphereDeploymentZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZoneList)(nil), (*v1beta1.VSphereDeploymentZoneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(a.(*VSphereDeploymentZoneList), b.(*v1beta1.VSphereDeploymentZoneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZoneList)(nil), (*VSphereDeploymentZoneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha4_VSphereDeploymentZoneList(a.(*v1beta1.VSphereDeploymentZoneList), b.(*VSphereDeploymentZoneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZoneSpec)(nil), (*v1beta1.VSphereDeploymentZoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(a.(*VSphereDeploymentZoneSpec), b.(*v1beta1.VSphereDeploymentZoneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZoneSpec)(nil), (*VSphereDeploymentZoneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha4_VSphereDeploymentZoneSpec(a.(*v1beta1.VSphereDeploymentZoneSpec), b.(*VSphereDeploymentZoneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereDeploymentZoneStatus)(nil), (*v1beta1.VSphereDeploymentZoneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(a.(*VSphereDeploymentZoneStatus), b.(*v1beta1.VSphereDeploymentZoneStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereDeploymentZoneStatus)(nil), (*VSphereDeploymentZoneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha4_VSphereDeploymentZoneStatus(a.(*v1beta1.VSphereDeploymentZoneStatus), b.(*VSphereDeploymentZoneStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereFailureDomain)(nil), (*v1beta1.VSphereFailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(a.(*VSphereFailureDomain), b.(*v1beta1.VSphereFailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereFailureDomain)(nil), (*VSphereFailureDomain)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereFailureDomain_To_v1alpha4_VSphereFailureDomain(a.(*v1beta1.VSphereFailureDomain), b.(*VSphereFailureDomain), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereFailureDomainList)(nil), (*v1beta1.VSphereFailureDomainList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(a.(*VSphereFailureDomainList), b.(*v1beta1.VSphereFailureDomainList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereFailureDomainList)(nil), (*VSphereFailureDomainList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereFailureDomainList_To_v1alpha4_VSphereFailureDomainList(a.(*v1beta1.VSphereFailureDomainList), b.(*VSphereFailureDomainList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereFailureDomainSpec)(nil), (*v1beta1.VSphereFailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(a.(*VSphereFailureDomainSpec), b.(*v1beta1.VSphereFailureDomainSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereFailureDomainSpec)(nil), (*VSphereFailureDomainSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha4_VSphereFailureDomainSpec(a.(*v1beta1.VSphereFailureDomainSpec), b.(*VSphereFailureDomainSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereIdentityReference)(nil), (*v1beta1.VSphereIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(a.(*VSphereIdentityReference), b.(*v1beta1.VSphereIdentityReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereIdentityReference)(nil), (*VSphereIdentityReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereIdentityReference_To_v1alpha4_VSphereIdentityReference(a.(*v1beta1.VSphereIdentityReference), b.(*VSphereIdentityReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachine)(nil), (*v1beta1.VSphereMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine(a.(*VSphereMachine), b.(*v1beta1.VSphereMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachine)(nil), (*VSphereMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine(a.(*v1beta1.VSphereMachine), b.(*VSphereMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineList)(nil), (*v1beta1.VSphereMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineList_To_v1beta1_VSphereMachineList(a.(*VSphereMachineList), b.(*v1beta1.VSphereMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineList)(nil), (*VSphereMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineList_To_v1alpha4_VSphereMachineList(a.(*v1beta1.VSphereMachineList), b.(*VSphereMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineSpec)(nil), (*v1beta1.VSphereMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(a.(*VSphereMachineSpec), b.(*v1beta1.VSphereMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineStatus)(nil), (*v1beta1.VSphereMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(a.(*VSphereMachineStatus), b.(*v1beta1.VSphereMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineStatus)(nil), (*VSphereMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineStatus_To_v1alpha4_VSphereMachineStatus(a.(*v1beta1.VSphereMachineStatus), b.(*VSphereMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplate)(nil), (*v1beta1.VSphereMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(a.(*VSphereMachineTemplate), b.(*v1beta1.VSphereMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplate)(nil), (*VSphereMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate(a.(*v1beta1.VSphereMachineTemplate), b.(*VSphereMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplateList)(nil), (*v1beta1.VSphereMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(a.(*VSphereMachineTemplateList), b.(*v1beta1.VSphereMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplateList)(nil), (*VSphereMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha4_VSphereMachineTemplateList(a.(*v1beta1.VSphereMachineTemplateList), b.(*VSphereMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplateResource)(nil), (*v1beta1.VSphereMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(a.(*VSphereMachineTemplateResource), b.(*v1beta1.VSphereMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplateResource)(nil), (*VSphereMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha4_VSphereMachineTemplateResource(a.(*v1beta1.VSphereMachineTemplateResource), b.(*VSphereMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereMachineTemplateSpec)(nil), (*v1beta1.VSphereMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(a.(*VSphereMachineTemplateSpec), b.(*v1beta1.VSphereMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereMachineTemplateSpec)(nil), (*VSphereMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha4_VSphereMachineTemplateSpec(a.(*v1beta1.VSphereMachineTemplateSpec), b.(*VSphereMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVM)(nil), (*v1beta1.VSphereVM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM(a.(*VSphereVM), b.(*v1beta1.VSphereVM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereVM)(nil), (*VSphereVM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM(a.(*v1beta1.VSphereVM), b.(*VSphereVM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVMList)(nil), (*v1beta1.VSphereVMList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereVMList_To_v1beta1_VSphereVMList(a.(*VSphereVMList), b.(*v1beta1.VSphereVMList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VSphereVMList)(nil), (*VSphereVMList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVMList_To_v1alpha4_VSphereVMList(a.(*v1beta1.VSphereVMList), b.(*VSphereVMList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVMSpec)(nil), (*v1beta1.VSphereVMSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereVMSpec_To_v1beta1_VSphereVMSpec(a.(*VSphereVMSpec), b.(*v1beta1.VSphereVMSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VSphereVMStatus)(nil), (*v1beta1.VSphereVMStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VSphereVMStatus_To_v1beta1_VSphereVMStatus(a.(*VSphereVMStatus), b.(*v1beta1.VSphereVMStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachine)(nil), (*v1beta1.VirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VirtualMachine_To_v1beta1_VirtualMachine(a.(*VirtualMachine), b.(*v1beta1.VirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachine)(nil), (*VirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachine_To_v1alpha4_VirtualMachine(a.(*v1beta1.VirtualMachine), b.(*VirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*VirtualMachineCloneSpec)(nil), (*v1beta1.VirtualMachineCloneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(a.(*VirtualMachineCloneSpec), b.(*v1beta1.VirtualMachineCloneSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1alpha4.ObjectMeta)(nil), (*apiv1beta1.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(a.(*apiv1alpha4.ObjectMeta), b.(*apiv1beta1.ObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.NetworkDeviceSpec)(nil), (*NetworkDeviceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkDeviceSpec_To_v1alpha4_NetworkDeviceSpec(a.(*v1beta1.NetworkDeviceSpec), b.(*NetworkDeviceSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta1.ObjectMeta)(nil), (*apiv1alpha4.ObjectMeta)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(a.(*apiv1beta1.ObjectMeta), b.(*apiv1alpha4.ObjectMeta), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereClusterSpec)(nil), (*VSphereClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterSpec_To_v1alpha4_VSphereClusterSpec(a.(*v1beta1.VSphereClusterSpec), b.(*VSphereClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereClusterStatus)(nil), (*VSphereClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereClusterStatus_To_v1alpha4_VSphereClusterStatus(a.(*v1beta1.VSphereClusterStatus), b.(*VSphereClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereMachineSpec)(nil), (*VSphereMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereMachineSpec_To_v1alpha4_VSphereMachineSpec(a.(*v1beta1.VSphereMachineSpec), b.(*VSphereMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereVMSpec)(nil), (*VSphereVMSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVMSpec_To_v1alpha4_VSphereVMSpec(a.(*v1beta1.VSphereVMSpec), b.(*VSphereVMSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VSphereVMStatus)(nil), (*VSphereVMStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VSphereVMStatus_To_v1alpha4_VSphereVMStatus(a.(*v1beta1.VSphereVMStatus), b.(*VSphereVMStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VirtualMachineCloneSpec)(nil), (*VirtualMachineCloneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec(a.(*v1beta1.VirtualMachineCloneSpec), b.(*VirtualMachineCloneSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { - out.Host = in.Host - out.Port = in.Port - return nil -} - -// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *APIEndpoint, out *v1beta1.APIEndpoint, s conversion.Scope) error { - return autoConvert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -func autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - out.Host = in.Host - out.Port = in.Port - return nil -} - -// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *v1beta1.APIEndpoint, out *APIEndpoint, s conversion.Scope) error { - return autoConvert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) -} - -func autoConvert_v1alpha4_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in *AllowedNamespaces, out *v1beta1.AllowedNamespaces, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_v1alpha4_AllowedNamespaces_To_v1beta1_AllowedNamespaces is an autogenerated conversion function. -func Convert_v1alpha4_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in *AllowedNamespaces, out *v1beta1.AllowedNamespaces, s conversion.Scope) error { - return autoConvert_v1alpha4_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in, out, s) -} - -func autoConvert_v1beta1_AllowedNamespaces_To_v1alpha4_AllowedNamespaces(in *v1beta1.AllowedNamespaces, out *AllowedNamespaces, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_v1beta1_AllowedNamespaces_To_v1alpha4_AllowedNamespaces is an autogenerated conversion function. -func Convert_v1beta1_AllowedNamespaces_To_v1alpha4_AllowedNamespaces(in *v1beta1.AllowedNamespaces, out *AllowedNamespaces, s conversion.Scope) error { - return autoConvert_v1beta1_AllowedNamespaces_To_v1alpha4_AllowedNamespaces(in, out, s) -} - -func autoConvert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain(in *FailureDomain, out *v1beta1.FailureDomain, s conversion.Scope) error { - out.Name = in.Name - out.Type = v1beta1.FailureDomainType(in.Type) - out.TagCategory = in.TagCategory - out.AutoConfigure = (*bool)(unsafe.Pointer(in.AutoConfigure)) - return nil -} - -// Convert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain is an autogenerated conversion function. -func Convert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain(in *FailureDomain, out *v1beta1.FailureDomain, s conversion.Scope) error { - return autoConvert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain(in, out, s) -} - -func autoConvert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain(in *v1beta1.FailureDomain, out *FailureDomain, s conversion.Scope) error { - out.Name = in.Name - out.Type = FailureDomainType(in.Type) - out.TagCategory = in.TagCategory - out.AutoConfigure = (*bool)(unsafe.Pointer(in.AutoConfigure)) - return nil -} - -// Convert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain is an autogenerated conversion function. -func Convert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain(in *v1beta1.FailureDomain, out *FailureDomain, s conversion.Scope) error { - return autoConvert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain(in, out, s) -} - -func autoConvert_v1alpha4_FailureDomainHosts_To_v1beta1_FailureDomainHosts(in *FailureDomainHosts, out *v1beta1.FailureDomainHosts, s conversion.Scope) error { - out.VMGroupName = in.VMGroupName - out.HostGroupName = in.HostGroupName - return nil -} - -// Convert_v1alpha4_FailureDomainHosts_To_v1beta1_FailureDomainHosts is an autogenerated conversion function. -func Convert_v1alpha4_FailureDomainHosts_To_v1beta1_FailureDomainHosts(in *FailureDomainHosts, out *v1beta1.FailureDomainHosts, s conversion.Scope) error { - return autoConvert_v1alpha4_FailureDomainHosts_To_v1beta1_FailureDomainHosts(in, out, s) -} - -func autoConvert_v1beta1_FailureDomainHosts_To_v1alpha4_FailureDomainHosts(in *v1beta1.FailureDomainHosts, out *FailureDomainHosts, s conversion.Scope) error { - out.VMGroupName = in.VMGroupName - out.HostGroupName = in.HostGroupName - return nil -} - -// Convert_v1beta1_FailureDomainHosts_To_v1alpha4_FailureDomainHosts is an autogenerated conversion function. -func Convert_v1beta1_FailureDomainHosts_To_v1alpha4_FailureDomainHosts(in *v1beta1.FailureDomainHosts, out *FailureDomainHosts, s conversion.Scope) error { - return autoConvert_v1beta1_FailureDomainHosts_To_v1alpha4_FailureDomainHosts(in, out, s) -} - -func autoConvert_v1alpha4_Network_To_v1beta1_Network(in *Network, out *v1beta1.Network, s conversion.Scope) error { - out.Name = in.Name - out.DHCP4 = (*bool)(unsafe.Pointer(in.DHCP4)) - out.DHCP6 = (*bool)(unsafe.Pointer(in.DHCP6)) - return nil -} - -// Convert_v1alpha4_Network_To_v1beta1_Network is an autogenerated conversion function. -func Convert_v1alpha4_Network_To_v1beta1_Network(in *Network, out *v1beta1.Network, s conversion.Scope) error { - return autoConvert_v1alpha4_Network_To_v1beta1_Network(in, out, s) -} - -func autoConvert_v1beta1_Network_To_v1alpha4_Network(in *v1beta1.Network, out *Network, s conversion.Scope) error { - out.Name = in.Name - out.DHCP4 = (*bool)(unsafe.Pointer(in.DHCP4)) - out.DHCP6 = (*bool)(unsafe.Pointer(in.DHCP6)) - return nil -} - -// Convert_v1beta1_Network_To_v1alpha4_Network is an autogenerated conversion function. -func Convert_v1beta1_Network_To_v1alpha4_Network(in *v1beta1.Network, out *Network, s conversion.Scope) error { - return autoConvert_v1beta1_Network_To_v1alpha4_Network(in, out, s) -} - -func autoConvert_v1alpha4_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(in *NetworkDeviceSpec, out *v1beta1.NetworkDeviceSpec, s conversion.Scope) error { - out.NetworkName = in.NetworkName - out.DeviceName = in.DeviceName - out.DHCP4 = in.DHCP4 - out.DHCP6 = in.DHCP6 - out.Gateway4 = in.Gateway4 - out.Gateway6 = in.Gateway6 - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MTU = (*int64)(unsafe.Pointer(in.MTU)) - out.MACAddr = in.MACAddr - out.Nameservers = *(*[]string)(unsafe.Pointer(&in.Nameservers)) - out.Routes = *(*[]v1beta1.NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.SearchDomains = *(*[]string)(unsafe.Pointer(&in.SearchDomains)) - return nil -} - -// Convert_v1alpha4_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec is an autogenerated conversion function. -func Convert_v1alpha4_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(in *NetworkDeviceSpec, out *v1beta1.NetworkDeviceSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkDeviceSpec_To_v1alpha4_NetworkDeviceSpec(in *v1beta1.NetworkDeviceSpec, out *NetworkDeviceSpec, s conversion.Scope) error { - out.NetworkName = in.NetworkName - out.DeviceName = in.DeviceName - out.DHCP4 = in.DHCP4 - out.DHCP6 = in.DHCP6 - out.Gateway4 = in.Gateway4 - out.Gateway6 = in.Gateway6 - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MTU = (*int64)(unsafe.Pointer(in.MTU)) - out.MACAddr = in.MACAddr - out.Nameservers = *(*[]string)(unsafe.Pointer(&in.Nameservers)) - out.Routes = *(*[]NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.SearchDomains = *(*[]string)(unsafe.Pointer(&in.SearchDomains)) - // WARNING: in.AddressesFromPools requires manual conversion: does not exist in peer-type - // WARNING: in.DHCP4Overrides requires manual conversion: does not exist in peer-type - // WARNING: in.DHCP6Overrides requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(in *NetworkRouteSpec, out *v1beta1.NetworkRouteSpec, s conversion.Scope) error { - out.To = in.To - out.Via = in.Via - out.Metric = in.Metric - return nil -} - -// Convert_v1alpha4_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec is an autogenerated conversion function. -func Convert_v1alpha4_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(in *NetworkRouteSpec, out *v1beta1.NetworkRouteSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_NetworkRouteSpec_To_v1beta1_NetworkRouteSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkRouteSpec_To_v1alpha4_NetworkRouteSpec(in *v1beta1.NetworkRouteSpec, out *NetworkRouteSpec, s conversion.Scope) error { - out.To = in.To - out.Via = in.Via - out.Metric = in.Metric - return nil -} - -// Convert_v1beta1_NetworkRouteSpec_To_v1alpha4_NetworkRouteSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkRouteSpec_To_v1alpha4_NetworkRouteSpec(in *v1beta1.NetworkRouteSpec, out *NetworkRouteSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkRouteSpec_To_v1alpha4_NetworkRouteSpec(in, out, s) -} - -func autoConvert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]v1beta1.NetworkDeviceSpec, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_NetworkDeviceSpec_To_v1beta1_NetworkDeviceSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Devices = nil - } - out.Routes = *(*[]v1beta1.NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.PreferredAPIServerCIDR = in.PreferredAPIServerCIDR - return nil -} - -// Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec is an autogenerated conversion function. -func Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]NetworkDeviceSpec, len(*in)) - for i := range *in { - if err := Convert_v1beta1_NetworkDeviceSpec_To_v1alpha4_NetworkDeviceSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Devices = nil - } - out.Routes = *(*[]NetworkRouteSpec)(unsafe.Pointer(&in.Routes)) - out.PreferredAPIServerCIDR = in.PreferredAPIServerCIDR - return nil -} - -// Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in, out, s) -} - -func autoConvert_v1alpha4_NetworkStatus_To_v1beta1_NetworkStatus(in *NetworkStatus, out *v1beta1.NetworkStatus, s conversion.Scope) error { - out.Connected = in.Connected - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MACAddr = in.MACAddr - out.NetworkName = in.NetworkName - return nil -} - -// Convert_v1alpha4_NetworkStatus_To_v1beta1_NetworkStatus is an autogenerated conversion function. -func Convert_v1alpha4_NetworkStatus_To_v1beta1_NetworkStatus(in *NetworkStatus, out *v1beta1.NetworkStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_NetworkStatus_To_v1beta1_NetworkStatus(in, out, s) -} - -func autoConvert_v1beta1_NetworkStatus_To_v1alpha4_NetworkStatus(in *v1beta1.NetworkStatus, out *NetworkStatus, s conversion.Scope) error { - out.Connected = in.Connected - out.IPAddrs = *(*[]string)(unsafe.Pointer(&in.IPAddrs)) - out.MACAddr = in.MACAddr - out.NetworkName = in.NetworkName - return nil -} - -// Convert_v1beta1_NetworkStatus_To_v1alpha4_NetworkStatus is an autogenerated conversion function. -func Convert_v1beta1_NetworkStatus_To_v1alpha4_NetworkStatus(in *v1beta1.NetworkStatus, out *NetworkStatus, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkStatus_To_v1alpha4_NetworkStatus(in, out, s) -} - -func autoConvert_v1alpha4_PlacementConstraint_To_v1beta1_PlacementConstraint(in *PlacementConstraint, out *v1beta1.PlacementConstraint, s conversion.Scope) error { - out.ResourcePool = in.ResourcePool - out.Folder = in.Folder - return nil -} - -// Convert_v1alpha4_PlacementConstraint_To_v1beta1_PlacementConstraint is an autogenerated conversion function. -func Convert_v1alpha4_PlacementConstraint_To_v1beta1_PlacementConstraint(in *PlacementConstraint, out *v1beta1.PlacementConstraint, s conversion.Scope) error { - return autoConvert_v1alpha4_PlacementConstraint_To_v1beta1_PlacementConstraint(in, out, s) -} - -func autoConvert_v1beta1_PlacementConstraint_To_v1alpha4_PlacementConstraint(in *v1beta1.PlacementConstraint, out *PlacementConstraint, s conversion.Scope) error { - out.ResourcePool = in.ResourcePool - out.Folder = in.Folder - return nil -} - -// Convert_v1beta1_PlacementConstraint_To_v1alpha4_PlacementConstraint is an autogenerated conversion function. -func Convert_v1beta1_PlacementConstraint_To_v1alpha4_PlacementConstraint(in *v1beta1.PlacementConstraint, out *PlacementConstraint, s conversion.Scope) error { - return autoConvert_v1beta1_PlacementConstraint_To_v1alpha4_PlacementConstraint(in, out, s) -} - -func autoConvert_v1alpha4_SSHUser_To_v1beta1_SSHUser(in *SSHUser, out *v1beta1.SSHUser, s conversion.Scope) error { - out.Name = in.Name - out.AuthorizedKeys = *(*[]string)(unsafe.Pointer(&in.AuthorizedKeys)) - return nil -} - -// Convert_v1alpha4_SSHUser_To_v1beta1_SSHUser is an autogenerated conversion function. -func Convert_v1alpha4_SSHUser_To_v1beta1_SSHUser(in *SSHUser, out *v1beta1.SSHUser, s conversion.Scope) error { - return autoConvert_v1alpha4_SSHUser_To_v1beta1_SSHUser(in, out, s) -} - -func autoConvert_v1beta1_SSHUser_To_v1alpha4_SSHUser(in *v1beta1.SSHUser, out *SSHUser, s conversion.Scope) error { - out.Name = in.Name - out.AuthorizedKeys = *(*[]string)(unsafe.Pointer(&in.AuthorizedKeys)) - return nil -} - -// Convert_v1beta1_SSHUser_To_v1alpha4_SSHUser is an autogenerated conversion function. -func Convert_v1beta1_SSHUser_To_v1alpha4_SSHUser(in *v1beta1.SSHUser, out *SSHUser, s conversion.Scope) error { - return autoConvert_v1beta1_SSHUser_To_v1alpha4_SSHUser(in, out, s) -} - -func autoConvert_v1alpha4_Topology_To_v1beta1_Topology(in *Topology, out *v1beta1.Topology, s conversion.Scope) error { - out.Datacenter = in.Datacenter - out.ComputeCluster = (*string)(unsafe.Pointer(in.ComputeCluster)) - out.Hosts = (*v1beta1.FailureDomainHosts)(unsafe.Pointer(in.Hosts)) - out.Networks = *(*[]string)(unsafe.Pointer(&in.Networks)) - out.Datastore = in.Datastore - return nil -} - -// Convert_v1alpha4_Topology_To_v1beta1_Topology is an autogenerated conversion function. -func Convert_v1alpha4_Topology_To_v1beta1_Topology(in *Topology, out *v1beta1.Topology, s conversion.Scope) error { - return autoConvert_v1alpha4_Topology_To_v1beta1_Topology(in, out, s) -} - -func autoConvert_v1beta1_Topology_To_v1alpha4_Topology(in *v1beta1.Topology, out *Topology, s conversion.Scope) error { - out.Datacenter = in.Datacenter - out.ComputeCluster = (*string)(unsafe.Pointer(in.ComputeCluster)) - out.Hosts = (*FailureDomainHosts)(unsafe.Pointer(in.Hosts)) - out.Networks = *(*[]string)(unsafe.Pointer(&in.Networks)) - out.Datastore = in.Datastore - return nil -} - -// Convert_v1beta1_Topology_To_v1alpha4_Topology is an autogenerated conversion function. -func Convert_v1beta1_Topology_To_v1alpha4_Topology(in *v1beta1.Topology, out *Topology, s conversion.Scope) error { - return autoConvert_v1beta1_Topology_To_v1alpha4_Topology(in, out, s) -} - -func autoConvert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster(in *VSphereCluster, out *v1beta1.VSphereCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster is an autogenerated conversion function. -func Convert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster(in *VSphereCluster, out *v1beta1.VSphereCluster, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster(in, out, s) -} - -func autoConvert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster(in *v1beta1.VSphereCluster, out *VSphereCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereClusterSpec_To_v1alpha4_VSphereClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereClusterStatus_To_v1alpha4_VSphereClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster is an autogenerated conversion function. -func Convert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster(in *v1beta1.VSphereCluster, out *VSphereCluster, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(in *VSphereClusterIdentity, out *v1beta1.VSphereClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(in *VSphereClusterIdentity, out *v1beta1.VSphereClusterIdentity, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterIdentity_To_v1beta1_VSphereClusterIdentity(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentity_To_v1alpha4_VSphereClusterIdentity(in *v1beta1.VSphereClusterIdentity, out *VSphereClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha4_VSphereClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha4_VSphereClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereClusterIdentity_To_v1alpha4_VSphereClusterIdentity is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentity_To_v1alpha4_VSphereClusterIdentity(in *v1beta1.VSphereClusterIdentity, out *VSphereClusterIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentity_To_v1alpha4_VSphereClusterIdentity(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(in *VSphereClusterIdentityList, out *v1beta1.VSphereClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.VSphereClusterIdentity)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(in *VSphereClusterIdentityList, out *v1beta1.VSphereClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterIdentityList_To_v1beta1_VSphereClusterIdentityList(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentityList_To_v1alpha4_VSphereClusterIdentityList(in *v1beta1.VSphereClusterIdentityList, out *VSphereClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]VSphereClusterIdentity)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha4_VSphereClusterIdentityList is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentityList_To_v1alpha4_VSphereClusterIdentityList(in *v1beta1.VSphereClusterIdentityList, out *VSphereClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentityList_To_v1alpha4_VSphereClusterIdentityList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(in *VSphereClusterIdentitySpec, out *v1beta1.VSphereClusterIdentitySpec, s conversion.Scope) error { - out.SecretName = in.SecretName - out.AllowedNamespaces = (*v1beta1.AllowedNamespaces)(unsafe.Pointer(in.AllowedNamespaces)) - return nil -} - -// Convert_v1alpha4_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(in *VSphereClusterIdentitySpec, out *v1beta1.VSphereClusterIdentitySpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterIdentitySpec_To_v1beta1_VSphereClusterIdentitySpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha4_VSphereClusterIdentitySpec(in *v1beta1.VSphereClusterIdentitySpec, out *VSphereClusterIdentitySpec, s conversion.Scope) error { - out.SecretName = in.SecretName - out.AllowedNamespaces = (*AllowedNamespaces)(unsafe.Pointer(in.AllowedNamespaces)) - return nil -} - -// Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha4_VSphereClusterIdentitySpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha4_VSphereClusterIdentitySpec(in *v1beta1.VSphereClusterIdentitySpec, out *VSphereClusterIdentitySpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentitySpec_To_v1alpha4_VSphereClusterIdentitySpec(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(in *VSphereClusterIdentityStatus, out *v1beta1.VSphereClusterIdentityStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha4_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(in *VSphereClusterIdentityStatus, out *v1beta1.VSphereClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterIdentityStatus_To_v1beta1_VSphereClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha4_VSphereClusterIdentityStatus(in *v1beta1.VSphereClusterIdentityStatus, out *VSphereClusterIdentityStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha4_VSphereClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha4_VSphereClusterIdentityStatus(in *v1beta1.VSphereClusterIdentityStatus, out *VSphereClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterIdentityStatus_To_v1alpha4_VSphereClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterList_To_v1beta1_VSphereClusterList(in *VSphereClusterList, out *v1beta1.VSphereClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereCluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_VSphereCluster_To_v1beta1_VSphereCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_VSphereClusterList_To_v1beta1_VSphereClusterList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterList_To_v1beta1_VSphereClusterList(in *VSphereClusterList, out *v1beta1.VSphereClusterList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterList_To_v1beta1_VSphereClusterList(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterList_To_v1alpha4_VSphereClusterList(in *v1beta1.VSphereClusterList, out *VSphereClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereCluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereCluster_To_v1alpha4_VSphereCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereClusterList_To_v1alpha4_VSphereClusterList is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterList_To_v1alpha4_VSphereClusterList(in *v1beta1.VSphereClusterList, out *VSphereClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterList_To_v1alpha4_VSphereClusterList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(in *VSphereClusterSpec, out *v1beta1.VSphereClusterSpec, s conversion.Scope) error { - out.Server = in.Server - out.Thumbprint = in.Thumbprint - if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.IdentityRef = (*v1beta1.VSphereIdentityReference)(unsafe.Pointer(in.IdentityRef)) - return nil -} - -// Convert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(in *VSphereClusterSpec, out *v1beta1.VSphereClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterSpec_To_v1alpha4_VSphereClusterSpec(in *v1beta1.VSphereClusterSpec, out *VSphereClusterSpec, s conversion.Scope) error { - out.Server = in.Server - out.Thumbprint = in.Thumbprint - if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.IdentityRef = (*VSphereIdentityReference)(unsafe.Pointer(in.IdentityRef)) - // WARNING: in.ClusterModules requires manual conversion: does not exist in peer-type - // WARNING: in.FailureDomainSelector requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(in *VSphereClusterStatus, out *v1beta1.VSphereClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureDomains = *(*apiv1beta1.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) - return nil -} - -// Convert_v1alpha4_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(in *VSphereClusterStatus, out *v1beta1.VSphereClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterStatus_To_v1beta1_VSphereClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterStatus_To_v1alpha4_VSphereClusterStatus(in *v1beta1.VSphereClusterStatus, out *VSphereClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureDomains = *(*apiv1alpha4.FailureDomains)(unsafe.Pointer(&in.FailureDomains)) - // WARNING: in.VCenterVersion requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate(in *VSphereClusterTemplate, out *v1beta1.VSphereClusterTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereClusterTemplateSpec_To_v1beta1_VSphereClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate(in *VSphereClusterTemplate, out *v1beta1.VSphereClusterTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate(in *v1beta1.VSphereClusterTemplate, out *VSphereClusterTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereClusterTemplateSpec_To_v1alpha4_VSphereClusterTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate(in *v1beta1.VSphereClusterTemplate, out *VSphereClusterTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterTemplateList_To_v1beta1_VSphereClusterTemplateList(in *VSphereClusterTemplateList, out *v1beta1.VSphereClusterTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereClusterTemplate, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_VSphereClusterTemplate_To_v1beta1_VSphereClusterTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_VSphereClusterTemplateList_To_v1beta1_VSphereClusterTemplateList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterTemplateList_To_v1beta1_VSphereClusterTemplateList(in *VSphereClusterTemplateList, out *v1beta1.VSphereClusterTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterTemplateList_To_v1beta1_VSphereClusterTemplateList(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterTemplateList_To_v1alpha4_VSphereClusterTemplateList(in *v1beta1.VSphereClusterTemplateList, out *VSphereClusterTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereClusterTemplate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereClusterTemplate_To_v1alpha4_VSphereClusterTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereClusterTemplateList_To_v1alpha4_VSphereClusterTemplateList is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterTemplateList_To_v1alpha4_VSphereClusterTemplateList(in *v1beta1.VSphereClusterTemplateList, out *VSphereClusterTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterTemplateList_To_v1alpha4_VSphereClusterTemplateList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterTemplateResource_To_v1beta1_VSphereClusterTemplateResource(in *VSphereClusterTemplateResource, out *v1beta1.VSphereClusterTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha4_VSphereClusterSpec_To_v1beta1_VSphereClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereClusterTemplateResource_To_v1beta1_VSphereClusterTemplateResource is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterTemplateResource_To_v1beta1_VSphereClusterTemplateResource(in *VSphereClusterTemplateResource, out *v1beta1.VSphereClusterTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterTemplateResource_To_v1beta1_VSphereClusterTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterTemplateResource_To_v1alpha4_VSphereClusterTemplateResource(in *v1beta1.VSphereClusterTemplateResource, out *VSphereClusterTemplateResource, s conversion.Scope) error { - if err := Convert_v1beta1_VSphereClusterSpec_To_v1alpha4_VSphereClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereClusterTemplateResource_To_v1alpha4_VSphereClusterTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterTemplateResource_To_v1alpha4_VSphereClusterTemplateResource(in *v1beta1.VSphereClusterTemplateResource, out *VSphereClusterTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterTemplateResource_To_v1alpha4_VSphereClusterTemplateResource(in, out, s) -} - -func autoConvert_v1alpha4_VSphereClusterTemplateSpec_To_v1beta1_VSphereClusterTemplateSpec(in *VSphereClusterTemplateSpec, out *v1beta1.VSphereClusterTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_VSphereClusterTemplateResource_To_v1beta1_VSphereClusterTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereClusterTemplateSpec_To_v1beta1_VSphereClusterTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereClusterTemplateSpec_To_v1beta1_VSphereClusterTemplateSpec(in *VSphereClusterTemplateSpec, out *v1beta1.VSphereClusterTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereClusterTemplateSpec_To_v1beta1_VSphereClusterTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereClusterTemplateSpec_To_v1alpha4_VSphereClusterTemplateSpec(in *v1beta1.VSphereClusterTemplateSpec, out *VSphereClusterTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VSphereClusterTemplateResource_To_v1alpha4_VSphereClusterTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereClusterTemplateSpec_To_v1alpha4_VSphereClusterTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereClusterTemplateSpec_To_v1alpha4_VSphereClusterTemplateSpec(in *v1beta1.VSphereClusterTemplateSpec, out *VSphereClusterTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereClusterTemplateSpec_To_v1alpha4_VSphereClusterTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha4_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(in *VSphereDeploymentZone, out *v1beta1.VSphereDeploymentZone, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone is an autogenerated conversion function. -func Convert_v1alpha4_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(in *VSphereDeploymentZone, out *v1beta1.VSphereDeploymentZone, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereDeploymentZone_To_v1beta1_VSphereDeploymentZone(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZone_To_v1alpha4_VSphereDeploymentZone(in *v1beta1.VSphereDeploymentZone, out *VSphereDeploymentZone, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha4_VSphereDeploymentZoneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha4_VSphereDeploymentZoneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereDeploymentZone_To_v1alpha4_VSphereDeploymentZone is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZone_To_v1alpha4_VSphereDeploymentZone(in *v1beta1.VSphereDeploymentZone, out *VSphereDeploymentZone, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZone_To_v1alpha4_VSphereDeploymentZone(in, out, s) -} - -func autoConvert_v1alpha4_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(in *VSphereDeploymentZoneList, out *v1beta1.VSphereDeploymentZoneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.VSphereDeploymentZone)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(in *VSphereDeploymentZoneList, out *v1beta1.VSphereDeploymentZoneList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereDeploymentZoneList_To_v1beta1_VSphereDeploymentZoneList(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZoneList_To_v1alpha4_VSphereDeploymentZoneList(in *v1beta1.VSphereDeploymentZoneList, out *VSphereDeploymentZoneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]VSphereDeploymentZone)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha4_VSphereDeploymentZoneList is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZoneList_To_v1alpha4_VSphereDeploymentZoneList(in *v1beta1.VSphereDeploymentZoneList, out *VSphereDeploymentZoneList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZoneList_To_v1alpha4_VSphereDeploymentZoneList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(in *VSphereDeploymentZoneSpec, out *v1beta1.VSphereDeploymentZoneSpec, s conversion.Scope) error { - out.Server = in.Server - out.FailureDomain = in.FailureDomain - out.ControlPlane = (*bool)(unsafe.Pointer(in.ControlPlane)) - if err := Convert_v1alpha4_PlacementConstraint_To_v1beta1_PlacementConstraint(&in.PlacementConstraint, &out.PlacementConstraint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(in *VSphereDeploymentZoneSpec, out *v1beta1.VSphereDeploymentZoneSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereDeploymentZoneSpec_To_v1beta1_VSphereDeploymentZoneSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha4_VSphereDeploymentZoneSpec(in *v1beta1.VSphereDeploymentZoneSpec, out *VSphereDeploymentZoneSpec, s conversion.Scope) error { - out.Server = in.Server - out.FailureDomain = in.FailureDomain - out.ControlPlane = (*bool)(unsafe.Pointer(in.ControlPlane)) - if err := Convert_v1beta1_PlacementConstraint_To_v1alpha4_PlacementConstraint(&in.PlacementConstraint, &out.PlacementConstraint, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha4_VSphereDeploymentZoneSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha4_VSphereDeploymentZoneSpec(in *v1beta1.VSphereDeploymentZoneSpec, out *VSphereDeploymentZoneSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZoneSpec_To_v1alpha4_VSphereDeploymentZoneSpec(in, out, s) -} - -func autoConvert_v1alpha4_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(in *VSphereDeploymentZoneStatus, out *v1beta1.VSphereDeploymentZoneStatus, s conversion.Scope) error { - out.Ready = (*bool)(unsafe.Pointer(in.Ready)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha4_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus is an autogenerated conversion function. -func Convert_v1alpha4_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(in *VSphereDeploymentZoneStatus, out *v1beta1.VSphereDeploymentZoneStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereDeploymentZoneStatus_To_v1beta1_VSphereDeploymentZoneStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha4_VSphereDeploymentZoneStatus(in *v1beta1.VSphereDeploymentZoneStatus, out *VSphereDeploymentZoneStatus, s conversion.Scope) error { - out.Ready = (*bool)(unsafe.Pointer(in.Ready)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha4_VSphereDeploymentZoneStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha4_VSphereDeploymentZoneStatus(in *v1beta1.VSphereDeploymentZoneStatus, out *VSphereDeploymentZoneStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereDeploymentZoneStatus_To_v1alpha4_VSphereDeploymentZoneStatus(in, out, s) -} - -func autoConvert_v1alpha4_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(in *VSphereFailureDomain, out *v1beta1.VSphereFailureDomain, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain is an autogenerated conversion function. -func Convert_v1alpha4_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(in *VSphereFailureDomain, out *v1beta1.VSphereFailureDomain, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereFailureDomain_To_v1beta1_VSphereFailureDomain(in, out, s) -} - -func autoConvert_v1beta1_VSphereFailureDomain_To_v1alpha4_VSphereFailureDomain(in *v1beta1.VSphereFailureDomain, out *VSphereFailureDomain, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha4_VSphereFailureDomainSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereFailureDomain_To_v1alpha4_VSphereFailureDomain is an autogenerated conversion function. -func Convert_v1beta1_VSphereFailureDomain_To_v1alpha4_VSphereFailureDomain(in *v1beta1.VSphereFailureDomain, out *VSphereFailureDomain, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereFailureDomain_To_v1alpha4_VSphereFailureDomain(in, out, s) -} - -func autoConvert_v1alpha4_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(in *VSphereFailureDomainList, out *v1beta1.VSphereFailureDomainList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.VSphereFailureDomain)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(in *VSphereFailureDomainList, out *v1beta1.VSphereFailureDomainList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereFailureDomainList_To_v1beta1_VSphereFailureDomainList(in, out, s) -} - -func autoConvert_v1beta1_VSphereFailureDomainList_To_v1alpha4_VSphereFailureDomainList(in *v1beta1.VSphereFailureDomainList, out *VSphereFailureDomainList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]VSphereFailureDomain)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_VSphereFailureDomainList_To_v1alpha4_VSphereFailureDomainList is an autogenerated conversion function. -func Convert_v1beta1_VSphereFailureDomainList_To_v1alpha4_VSphereFailureDomainList(in *v1beta1.VSphereFailureDomainList, out *VSphereFailureDomainList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereFailureDomainList_To_v1alpha4_VSphereFailureDomainList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(in *VSphereFailureDomainSpec, out *v1beta1.VSphereFailureDomainSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain(&in.Region, &out.Region, s); err != nil { - return err - } - if err := Convert_v1alpha4_FailureDomain_To_v1beta1_FailureDomain(&in.Zone, &out.Zone, s); err != nil { - return err - } - if err := Convert_v1alpha4_Topology_To_v1beta1_Topology(&in.Topology, &out.Topology, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(in *VSphereFailureDomainSpec, out *v1beta1.VSphereFailureDomainSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereFailureDomainSpec_To_v1beta1_VSphereFailureDomainSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereFailureDomainSpec_To_v1alpha4_VSphereFailureDomainSpec(in *v1beta1.VSphereFailureDomainSpec, out *VSphereFailureDomainSpec, s conversion.Scope) error { - if err := Convert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain(&in.Region, &out.Region, s); err != nil { - return err - } - if err := Convert_v1beta1_FailureDomain_To_v1alpha4_FailureDomain(&in.Zone, &out.Zone, s); err != nil { - return err - } - if err := Convert_v1beta1_Topology_To_v1alpha4_Topology(&in.Topology, &out.Topology, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha4_VSphereFailureDomainSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereFailureDomainSpec_To_v1alpha4_VSphereFailureDomainSpec(in *v1beta1.VSphereFailureDomainSpec, out *VSphereFailureDomainSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereFailureDomainSpec_To_v1alpha4_VSphereFailureDomainSpec(in, out, s) -} - -func autoConvert_v1alpha4_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(in *VSphereIdentityReference, out *v1beta1.VSphereIdentityReference, s conversion.Scope) error { - out.Kind = v1beta1.VSphereIdentityKind(in.Kind) - out.Name = in.Name - return nil -} - -// Convert_v1alpha4_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference is an autogenerated conversion function. -func Convert_v1alpha4_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(in *VSphereIdentityReference, out *v1beta1.VSphereIdentityReference, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereIdentityReference_To_v1beta1_VSphereIdentityReference(in, out, s) -} - -func autoConvert_v1beta1_VSphereIdentityReference_To_v1alpha4_VSphereIdentityReference(in *v1beta1.VSphereIdentityReference, out *VSphereIdentityReference, s conversion.Scope) error { - out.Kind = VSphereIdentityKind(in.Kind) - out.Name = in.Name - return nil -} - -// Convert_v1beta1_VSphereIdentityReference_To_v1alpha4_VSphereIdentityReference is an autogenerated conversion function. -func Convert_v1beta1_VSphereIdentityReference_To_v1alpha4_VSphereIdentityReference(in *v1beta1.VSphereIdentityReference, out *VSphereIdentityReference, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereIdentityReference_To_v1alpha4_VSphereIdentityReference(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine(in *VSphereMachine, out *v1beta1.VSphereMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine(in *VSphereMachine, out *v1beta1.VSphereMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine(in *v1beta1.VSphereMachine, out *VSphereMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereMachineSpec_To_v1alpha4_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereMachineStatus_To_v1alpha4_VSphereMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine(in *v1beta1.VSphereMachine, out *VSphereMachine, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachineList_To_v1beta1_VSphereMachineList(in *VSphereMachineList, out *v1beta1.VSphereMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereMachine, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_VSphereMachine_To_v1beta1_VSphereMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_VSphereMachineList_To_v1beta1_VSphereMachineList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineList_To_v1beta1_VSphereMachineList(in *VSphereMachineList, out *v1beta1.VSphereMachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineList_To_v1beta1_VSphereMachineList(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineList_To_v1alpha4_VSphereMachineList(in *v1beta1.VSphereMachineList, out *VSphereMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachine, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereMachine_To_v1alpha4_VSphereMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereMachineList_To_v1alpha4_VSphereMachineList is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineList_To_v1alpha4_VSphereMachineList(in *v1beta1.VSphereMachineList, out *VSphereMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineList_To_v1alpha4_VSphereMachineList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(in *VSphereMachineSpec, out *v1beta1.VSphereMachineSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - return nil -} - -// Convert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(in *VSphereMachineSpec, out *v1beta1.VSphereMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineSpec_To_v1alpha4_VSphereMachineSpec(in *v1beta1.VSphereMachineSpec, out *VSphereMachineSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - // WARNING: in.PowerOffMode requires manual conversion: does not exist in peer-type - // WARNING: in.GuestSoftPowerOffTimeout requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(in *VSphereMachineStatus, out *v1beta1.VSphereMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]apiv1beta1.MachineAddress)(unsafe.Pointer(&in.Addresses)) - out.Network = *(*[]v1beta1.NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha4_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(in *VSphereMachineStatus, out *v1beta1.VSphereMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineStatus_To_v1beta1_VSphereMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineStatus_To_v1alpha4_VSphereMachineStatus(in *v1beta1.VSphereMachineStatus, out *VSphereMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]apiv1alpha4.MachineAddress)(unsafe.Pointer(&in.Addresses)) - out.Network = *(*[]NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_VSphereMachineStatus_To_v1alpha4_VSphereMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineStatus_To_v1alpha4_VSphereMachineStatus(in *v1beta1.VSphereMachineStatus, out *VSphereMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineStatus_To_v1alpha4_VSphereMachineStatus(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(in *VSphereMachineTemplate, out *v1beta1.VSphereMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(in *VSphereMachineTemplate, out *v1beta1.VSphereMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate(in *v1beta1.VSphereMachineTemplate, out *VSphereMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha4_VSphereMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate(in *v1beta1.VSphereMachineTemplate, out *VSphereMachineTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(in *VSphereMachineTemplateList, out *v1beta1.VSphereMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_VSphereMachineTemplate_To_v1beta1_VSphereMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(in *VSphereMachineTemplateList, out *v1beta1.VSphereMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineTemplateList_To_v1beta1_VSphereMachineTemplateList(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplateList_To_v1alpha4_VSphereMachineTemplateList(in *v1beta1.VSphereMachineTemplateList, out *VSphereMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereMachineTemplate_To_v1alpha4_VSphereMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha4_VSphereMachineTemplateList is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplateList_To_v1alpha4_VSphereMachineTemplateList(in *v1beta1.VSphereMachineTemplateList, out *VSphereMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplateList_To_v1alpha4_VSphereMachineTemplateList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(in *VSphereMachineTemplateResource, out *v1beta1.VSphereMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } - if err := Convert_v1alpha4_VSphereMachineSpec_To_v1beta1_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(in *VSphereMachineTemplateResource, out *v1beta1.VSphereMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplateResource_To_v1alpha4_VSphereMachineTemplateResource(in *v1beta1.VSphereMachineTemplateResource, out *VSphereMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereMachineSpec_To_v1alpha4_VSphereMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha4_VSphereMachineTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha4_VSphereMachineTemplateResource(in *v1beta1.VSphereMachineTemplateResource, out *VSphereMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplateResource_To_v1alpha4_VSphereMachineTemplateResource(in, out, s) -} - -func autoConvert_v1alpha4_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(in *VSphereMachineTemplateSpec, out *v1beta1.VSphereMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_VSphereMachineTemplateResource_To_v1beta1_VSphereMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(in *VSphereMachineTemplateSpec, out *v1beta1.VSphereMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereMachineTemplateSpec_To_v1beta1_VSphereMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha4_VSphereMachineTemplateSpec(in *v1beta1.VSphereMachineTemplateSpec, out *VSphereMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VSphereMachineTemplateResource_To_v1alpha4_VSphereMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha4_VSphereMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha4_VSphereMachineTemplateSpec(in *v1beta1.VSphereMachineTemplateSpec, out *VSphereMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereMachineTemplateSpec_To_v1alpha4_VSphereMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM(in *VSphereVM, out *v1beta1.VSphereVM, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_VSphereVMSpec_To_v1beta1_VSphereVMSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_VSphereVMStatus_To_v1beta1_VSphereVMStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM is an autogenerated conversion function. -func Convert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM(in *VSphereVM, out *v1beta1.VSphereVM, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM(in, out, s) -} - -func autoConvert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM(in *v1beta1.VSphereVM, out *VSphereVM, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_VSphereVMSpec_To_v1alpha4_VSphereVMSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_VSphereVMStatus_To_v1alpha4_VSphereVMStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM is an autogenerated conversion function. -func Convert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM(in *v1beta1.VSphereVM, out *VSphereVM, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM(in, out, s) -} - -func autoConvert_v1alpha4_VSphereVMList_To_v1beta1_VSphereVMList(in *VSphereVMList, out *v1beta1.VSphereVMList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.VSphereVM, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_VSphereVM_To_v1beta1_VSphereVM(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_VSphereVMList_To_v1beta1_VSphereVMList is an autogenerated conversion function. -func Convert_v1alpha4_VSphereVMList_To_v1beta1_VSphereVMList(in *VSphereVMList, out *v1beta1.VSphereVMList, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereVMList_To_v1beta1_VSphereVMList(in, out, s) -} - -func autoConvert_v1beta1_VSphereVMList_To_v1alpha4_VSphereVMList(in *v1beta1.VSphereVMList, out *VSphereVMList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereVM, len(*in)) - for i := range *in { - if err := Convert_v1beta1_VSphereVM_To_v1alpha4_VSphereVM(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_VSphereVMList_To_v1alpha4_VSphereVMList is an autogenerated conversion function. -func Convert_v1beta1_VSphereVMList_To_v1alpha4_VSphereVMList(in *v1beta1.VSphereVMList, out *VSphereVMList, s conversion.Scope) error { - return autoConvert_v1beta1_VSphereVMList_To_v1alpha4_VSphereVMList(in, out, s) -} - -func autoConvert_v1alpha4_VSphereVMSpec_To_v1beta1_VSphereVMSpec(in *VSphereVMSpec, out *v1beta1.VSphereVMSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.BootstrapRef = (*v1.ObjectReference)(unsafe.Pointer(in.BootstrapRef)) - out.BiosUUID = in.BiosUUID - return nil -} - -// Convert_v1alpha4_VSphereVMSpec_To_v1beta1_VSphereVMSpec is an autogenerated conversion function. -func Convert_v1alpha4_VSphereVMSpec_To_v1beta1_VSphereVMSpec(in *VSphereVMSpec, out *v1beta1.VSphereVMSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereVMSpec_To_v1beta1_VSphereVMSpec(in, out, s) -} - -func autoConvert_v1beta1_VSphereVMSpec_To_v1alpha4_VSphereVMSpec(in *v1beta1.VSphereVMSpec, out *VSphereVMSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec(&in.VirtualMachineCloneSpec, &out.VirtualMachineCloneSpec, s); err != nil { - return err - } - out.BootstrapRef = (*v1.ObjectReference)(unsafe.Pointer(in.BootstrapRef)) - out.BiosUUID = in.BiosUUID - // WARNING: in.PowerOffMode requires manual conversion: does not exist in peer-type - // WARNING: in.GuestSoftPowerOffTimeout requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_VSphereVMStatus_To_v1beta1_VSphereVMStatus(in *VSphereVMStatus, out *v1beta1.VSphereVMStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) - out.CloneMode = v1beta1.CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.RetryAfter = in.RetryAfter - out.TaskRef = in.TaskRef - out.Network = *(*[]v1beta1.NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha4_VSphereVMStatus_To_v1beta1_VSphereVMStatus is an autogenerated conversion function. -func Convert_v1alpha4_VSphereVMStatus_To_v1beta1_VSphereVMStatus(in *VSphereVMStatus, out *v1beta1.VSphereVMStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_VSphereVMStatus_To_v1beta1_VSphereVMStatus(in, out, s) -} - -func autoConvert_v1beta1_VSphereVMStatus_To_v1alpha4_VSphereVMStatus(in *v1beta1.VSphereVMStatus, out *VSphereVMStatus, s conversion.Scope) error { - // WARNING: in.Host requires manual conversion: does not exist in peer-type - out.Ready = in.Ready - out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) - out.CloneMode = CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.RetryAfter = in.RetryAfter - out.TaskRef = in.TaskRef - out.Network = *(*[]NetworkStatus)(unsafe.Pointer(&in.Network)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - // WARNING: in.ModuleUUID requires manual conversion: does not exist in peer-type - // WARNING: in.VMRef requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_VirtualMachine_To_v1beta1_VirtualMachine(in *VirtualMachine, out *v1beta1.VirtualMachine, s conversion.Scope) error { - out.Name = in.Name - out.BiosUUID = in.BiosUUID - out.State = v1beta1.VirtualMachineState(in.State) - out.Network = *(*[]v1beta1.NetworkStatus)(unsafe.Pointer(&in.Network)) - out.VMRef = in.VMRef - return nil -} - -// Convert_v1alpha4_VirtualMachine_To_v1beta1_VirtualMachine is an autogenerated conversion function. -func Convert_v1alpha4_VirtualMachine_To_v1beta1_VirtualMachine(in *VirtualMachine, out *v1beta1.VirtualMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_VirtualMachine_To_v1beta1_VirtualMachine(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachine_To_v1alpha4_VirtualMachine(in *v1beta1.VirtualMachine, out *VirtualMachine, s conversion.Scope) error { - out.Name = in.Name - out.BiosUUID = in.BiosUUID - out.State = VirtualMachineState(in.State) - out.Network = *(*[]NetworkStatus)(unsafe.Pointer(&in.Network)) - out.VMRef = in.VMRef - return nil -} - -// Convert_v1beta1_VirtualMachine_To_v1alpha4_VirtualMachine is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachine_To_v1alpha4_VirtualMachine(in *v1beta1.VirtualMachine, out *VirtualMachine, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachine_To_v1alpha4_VirtualMachine(in, out, s) -} - -func autoConvert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(in *VirtualMachineCloneSpec, out *v1beta1.VirtualMachineCloneSpec, s conversion.Scope) error { - out.Template = in.Template - out.CloneMode = v1beta1.CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.Server = in.Server - out.Thumbprint = in.Thumbprint - out.Datacenter = in.Datacenter - out.Folder = in.Folder - out.Datastore = in.Datastore - out.StoragePolicyName = in.StoragePolicyName - out.ResourcePool = in.ResourcePool - if err := Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(&in.Network, &out.Network, s); err != nil { - return err - } - out.NumCPUs = in.NumCPUs - out.NumCoresPerSocket = in.NumCoresPerSocket - out.MemoryMiB = in.MemoryMiB - out.DiskGiB = in.DiskGiB - out.CustomVMXKeys = *(*map[string]string)(unsafe.Pointer(&in.CustomVMXKeys)) - return nil -} - -// Convert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec is an autogenerated conversion function. -func Convert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(in *VirtualMachineCloneSpec, out *v1beta1.VirtualMachineCloneSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VirtualMachineCloneSpec_To_v1beta1_VirtualMachineCloneSpec(in, out, s) -} - -func autoConvert_v1beta1_VirtualMachineCloneSpec_To_v1alpha4_VirtualMachineCloneSpec(in *v1beta1.VirtualMachineCloneSpec, out *VirtualMachineCloneSpec, s conversion.Scope) error { - out.Template = in.Template - out.CloneMode = CloneMode(in.CloneMode) - out.Snapshot = in.Snapshot - out.Server = in.Server - out.Thumbprint = in.Thumbprint - out.Datacenter = in.Datacenter - out.Folder = in.Folder - out.Datastore = in.Datastore - out.StoragePolicyName = in.StoragePolicyName - out.ResourcePool = in.ResourcePool - if err := Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(&in.Network, &out.Network, s); err != nil { - return err - } - out.NumCPUs = in.NumCPUs - out.NumCoresPerSocket = in.NumCoresPerSocket - out.MemoryMiB = in.MemoryMiB - out.DiskGiB = in.DiskGiB - // WARNING: in.AdditionalDisksGiB requires manual conversion: does not exist in peer-type - out.CustomVMXKeys = *(*map[string]string)(unsafe.Pointer(&in.CustomVMXKeys)) - // WARNING: in.TagIDs requires manual conversion: does not exist in peer-type - // WARNING: in.PciDevices requires manual conversion: does not exist in peer-type - // WARNING: in.OS requires manual conversion: does not exist in peer-type - // WARNING: in.HardwareVersion requires manual conversion: does not exist in peer-type - return nil -} diff --git a/apis/v1alpha4/zz_generated.deepcopy.go b/apis/v1alpha4/zz_generated.deepcopy.go deleted file mode 100644 index a647bc4694..0000000000 --- a/apis/v1alpha4/zz_generated.deepcopy.go +++ /dev/null @@ -1,1174 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha4 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIEndpoint) DeepCopyInto(out *APIEndpoint) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIEndpoint. -func (in *APIEndpoint) DeepCopy() *APIEndpoint { - if in == nil { - return nil - } - out := new(APIEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllowedNamespaces) DeepCopyInto(out *AllowedNamespaces) { - *out = *in - in.Selector.DeepCopyInto(&out.Selector) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedNamespaces. -func (in *AllowedNamespaces) DeepCopy() *AllowedNamespaces { - if in == nil { - return nil - } - out := new(AllowedNamespaces) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FailureDomain) DeepCopyInto(out *FailureDomain) { - *out = *in - if in.AutoConfigure != nil { - in, out := &in.AutoConfigure, &out.AutoConfigure - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomain. -func (in *FailureDomain) DeepCopy() *FailureDomain { - if in == nil { - return nil - } - out := new(FailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FailureDomainHosts) DeepCopyInto(out *FailureDomainHosts) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomainHosts. -func (in *FailureDomainHosts) DeepCopy() *FailureDomainHosts { - if in == nil { - return nil - } - out := new(FailureDomainHosts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Network) DeepCopyInto(out *Network) { - *out = *in - if in.DHCP4 != nil { - in, out := &in.DHCP4, &out.DHCP4 - *out = new(bool) - **out = **in - } - if in.DHCP6 != nil { - in, out := &in.DHCP6, &out.DHCP6 - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network. -func (in *Network) DeepCopy() *Network { - if in == nil { - return nil - } - out := new(Network) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkDeviceSpec) DeepCopyInto(out *NetworkDeviceSpec) { - *out = *in - if in.IPAddrs != nil { - in, out := &in.IPAddrs, &out.IPAddrs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(int64) - **out = **in - } - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]NetworkRouteSpec, len(*in)) - copy(*out, *in) - } - if in.SearchDomains != nil { - in, out := &in.SearchDomains, &out.SearchDomains - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceSpec. -func (in *NetworkDeviceSpec) DeepCopy() *NetworkDeviceSpec { - if in == nil { - return nil - } - out := new(NetworkDeviceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkRouteSpec) DeepCopyInto(out *NetworkRouteSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkRouteSpec. -func (in *NetworkRouteSpec) DeepCopy() *NetworkRouteSpec { - if in == nil { - return nil - } - out := new(NetworkRouteSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { - *out = *in - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]NetworkDeviceSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]NetworkRouteSpec, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { - *out = *in - if in.IPAddrs != nil { - in, out := &in.IPAddrs, &out.IPAddrs - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. -func (in *NetworkStatus) DeepCopy() *NetworkStatus { - if in == nil { - return nil - } - out := new(NetworkStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PlacementConstraint) DeepCopyInto(out *PlacementConstraint) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementConstraint. -func (in *PlacementConstraint) DeepCopy() *PlacementConstraint { - if in == nil { - return nil - } - out := new(PlacementConstraint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SSHUser) DeepCopyInto(out *SSHUser) { - *out = *in - if in.AuthorizedKeys != nil { - in, out := &in.AuthorizedKeys, &out.AuthorizedKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSHUser. -func (in *SSHUser) DeepCopy() *SSHUser { - if in == nil { - return nil - } - out := new(SSHUser) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Topology) DeepCopyInto(out *Topology) { - *out = *in - if in.ComputeCluster != nil { - in, out := &in.ComputeCluster, &out.ComputeCluster - *out = new(string) - **out = **in - } - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = new(FailureDomainHosts) - **out = **in - } - if in.Networks != nil { - in, out := &in.Networks, &out.Networks - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology. -func (in *Topology) DeepCopy() *Topology { - if in == nil { - return nil - } - out := new(Topology) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereCluster) DeepCopyInto(out *VSphereCluster) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereCluster. -func (in *VSphereCluster) DeepCopy() *VSphereCluster { - if in == nil { - return nil - } - out := new(VSphereCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereCluster) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentity) DeepCopyInto(out *VSphereClusterIdentity) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentity. -func (in *VSphereClusterIdentity) DeepCopy() *VSphereClusterIdentity { - if in == nil { - return nil - } - out := new(VSphereClusterIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterIdentity) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentityList) DeepCopyInto(out *VSphereClusterIdentityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereClusterIdentity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentityList. -func (in *VSphereClusterIdentityList) DeepCopy() *VSphereClusterIdentityList { - if in == nil { - return nil - } - out := new(VSphereClusterIdentityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterIdentityList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentitySpec) DeepCopyInto(out *VSphereClusterIdentitySpec) { - *out = *in - if in.AllowedNamespaces != nil { - in, out := &in.AllowedNamespaces, &out.AllowedNamespaces - *out = new(AllowedNamespaces) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentitySpec. -func (in *VSphereClusterIdentitySpec) DeepCopy() *VSphereClusterIdentitySpec { - if in == nil { - return nil - } - out := new(VSphereClusterIdentitySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterIdentityStatus) DeepCopyInto(out *VSphereClusterIdentityStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterIdentityStatus. -func (in *VSphereClusterIdentityStatus) DeepCopy() *VSphereClusterIdentityStatus { - if in == nil { - return nil - } - out := new(VSphereClusterIdentityStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterList) DeepCopyInto(out *VSphereClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterList. -func (in *VSphereClusterList) DeepCopy() *VSphereClusterList { - if in == nil { - return nil - } - out := new(VSphereClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterSpec) DeepCopyInto(out *VSphereClusterSpec) { - *out = *in - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.IdentityRef != nil { - in, out := &in.IdentityRef, &out.IdentityRef - *out = new(VSphereIdentityReference) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterSpec. -func (in *VSphereClusterSpec) DeepCopy() *VSphereClusterSpec { - if in == nil { - return nil - } - out := new(VSphereClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterStatus) DeepCopyInto(out *VSphereClusterStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1alpha4.FailureDomains, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterStatus. -func (in *VSphereClusterStatus) DeepCopy() *VSphereClusterStatus { - if in == nil { - return nil - } - out := new(VSphereClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterTemplate) DeepCopyInto(out *VSphereClusterTemplate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterTemplate. -func (in *VSphereClusterTemplate) DeepCopy() *VSphereClusterTemplate { - if in == nil { - return nil - } - out := new(VSphereClusterTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterTemplateList) DeepCopyInto(out *VSphereClusterTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereClusterTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterTemplateList. -func (in *VSphereClusterTemplateList) DeepCopy() *VSphereClusterTemplateList { - if in == nil { - return nil - } - out := new(VSphereClusterTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereClusterTemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterTemplateResource) DeepCopyInto(out *VSphereClusterTemplateResource) { - *out = *in - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterTemplateResource. -func (in *VSphereClusterTemplateResource) DeepCopy() *VSphereClusterTemplateResource { - if in == nil { - return nil - } - out := new(VSphereClusterTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereClusterTemplateSpec) DeepCopyInto(out *VSphereClusterTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereClusterTemplateSpec. -func (in *VSphereClusterTemplateSpec) DeepCopy() *VSphereClusterTemplateSpec { - if in == nil { - return nil - } - out := new(VSphereClusterTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZone) DeepCopyInto(out *VSphereDeploymentZone) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZone. -func (in *VSphereDeploymentZone) DeepCopy() *VSphereDeploymentZone { - if in == nil { - return nil - } - out := new(VSphereDeploymentZone) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereDeploymentZone) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZoneList) DeepCopyInto(out *VSphereDeploymentZoneList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereDeploymentZone, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZoneList. -func (in *VSphereDeploymentZoneList) DeepCopy() *VSphereDeploymentZoneList { - if in == nil { - return nil - } - out := new(VSphereDeploymentZoneList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereDeploymentZoneList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZoneSpec) DeepCopyInto(out *VSphereDeploymentZoneSpec) { - *out = *in - if in.ControlPlane != nil { - in, out := &in.ControlPlane, &out.ControlPlane - *out = new(bool) - **out = **in - } - out.PlacementConstraint = in.PlacementConstraint -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZoneSpec. -func (in *VSphereDeploymentZoneSpec) DeepCopy() *VSphereDeploymentZoneSpec { - if in == nil { - return nil - } - out := new(VSphereDeploymentZoneSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDeploymentZoneStatus) DeepCopyInto(out *VSphereDeploymentZoneStatus) { - *out = *in - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDeploymentZoneStatus. -func (in *VSphereDeploymentZoneStatus) DeepCopy() *VSphereDeploymentZoneStatus { - if in == nil { - return nil - } - out := new(VSphereDeploymentZoneStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomain) DeepCopyInto(out *VSphereFailureDomain) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomain. -func (in *VSphereFailureDomain) DeepCopy() *VSphereFailureDomain { - if in == nil { - return nil - } - out := new(VSphereFailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereFailureDomain) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomainList) DeepCopyInto(out *VSphereFailureDomainList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereFailureDomain, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomainList. -func (in *VSphereFailureDomainList) DeepCopy() *VSphereFailureDomainList { - if in == nil { - return nil - } - out := new(VSphereFailureDomainList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereFailureDomainList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomainSpec) DeepCopyInto(out *VSphereFailureDomainSpec) { - *out = *in - in.Region.DeepCopyInto(&out.Region) - in.Zone.DeepCopyInto(&out.Zone) - in.Topology.DeepCopyInto(&out.Topology) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomainSpec. -func (in *VSphereFailureDomainSpec) DeepCopy() *VSphereFailureDomainSpec { - if in == nil { - return nil - } - out := new(VSphereFailureDomainSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereIdentityReference) DeepCopyInto(out *VSphereIdentityReference) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereIdentityReference. -func (in *VSphereIdentityReference) DeepCopy() *VSphereIdentityReference { - if in == nil { - return nil - } - out := new(VSphereIdentityReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachine) DeepCopyInto(out *VSphereMachine) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachine. -func (in *VSphereMachine) DeepCopy() *VSphereMachine { - if in == nil { - return nil - } - out := new(VSphereMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachine) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineList) DeepCopyInto(out *VSphereMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineList. -func (in *VSphereMachineList) DeepCopy() *VSphereMachineList { - if in == nil { - return nil - } - out := new(VSphereMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineSpec) DeepCopyInto(out *VSphereMachineSpec) { - *out = *in - in.VirtualMachineCloneSpec.DeepCopyInto(&out.VirtualMachineCloneSpec) - if in.ProviderID != nil { - in, out := &in.ProviderID, &out.ProviderID - *out = new(string) - **out = **in - } - if in.FailureDomain != nil { - in, out := &in.FailureDomain, &out.FailureDomain - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineSpec. -func (in *VSphereMachineSpec) DeepCopy() *VSphereMachineSpec { - if in == nil { - return nil - } - out := new(VSphereMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineStatus) DeepCopyInto(out *VSphereMachineStatus) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]apiv1alpha4.MachineAddress, len(*in)) - copy(*out, *in) - } - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = make([]NetworkStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureReason != nil { - in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) - **out = **in - } - if in.FailureMessage != nil { - in, out := &in.FailureMessage, &out.FailureMessage - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineStatus. -func (in *VSphereMachineStatus) DeepCopy() *VSphereMachineStatus { - if in == nil { - return nil - } - out := new(VSphereMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplate) DeepCopyInto(out *VSphereMachineTemplate) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplate. -func (in *VSphereMachineTemplate) DeepCopy() *VSphereMachineTemplate { - if in == nil { - return nil - } - out := new(VSphereMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineTemplate) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplateList) DeepCopyInto(out *VSphereMachineTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereMachineTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplateList. -func (in *VSphereMachineTemplateList) DeepCopy() *VSphereMachineTemplateList { - if in == nil { - return nil - } - out := new(VSphereMachineTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineTemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplateResource) DeepCopyInto(out *VSphereMachineTemplateResource) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplateResource. -func (in *VSphereMachineTemplateResource) DeepCopy() *VSphereMachineTemplateResource { - if in == nil { - return nil - } - out := new(VSphereMachineTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineTemplateSpec) DeepCopyInto(out *VSphereMachineTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineTemplateSpec. -func (in *VSphereMachineTemplateSpec) DeepCopy() *VSphereMachineTemplateSpec { - if in == nil { - return nil - } - out := new(VSphereMachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVM) DeepCopyInto(out *VSphereVM) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVM. -func (in *VSphereVM) DeepCopy() *VSphereVM { - if in == nil { - return nil - } - out := new(VSphereVM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereVM) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVMList) DeepCopyInto(out *VSphereVMList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]VSphereVM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVMList. -func (in *VSphereVMList) DeepCopy() *VSphereVMList { - if in == nil { - return nil - } - out := new(VSphereVMList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereVMList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVMSpec) DeepCopyInto(out *VSphereVMSpec) { - *out = *in - in.VirtualMachineCloneSpec.DeepCopyInto(&out.VirtualMachineCloneSpec) - if in.BootstrapRef != nil { - in, out := &in.BootstrapRef, &out.BootstrapRef - *out = new(v1.ObjectReference) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVMSpec. -func (in *VSphereVMSpec) DeepCopy() *VSphereVMSpec { - if in == nil { - return nil - } - out := new(VSphereVMSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereVMStatus) DeepCopyInto(out *VSphereVMStatus) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.RetryAfter.DeepCopyInto(&out.RetryAfter) - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = make([]NetworkStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FailureReason != nil { - in, out := &in.FailureReason, &out.FailureReason - *out = new(errors.MachineStatusError) - **out = **in - } - if in.FailureMessage != nil { - in, out := &in.FailureMessage, &out.FailureMessage - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereVMStatus. -func (in *VSphereVMStatus) DeepCopy() *VSphereVMStatus { - if in == nil { - return nil - } - out := new(VSphereVMStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine) { - *out = *in - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = make([]NetworkStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachine. -func (in *VirtualMachine) DeepCopy() *VirtualMachine { - if in == nil { - return nil - } - out := new(VirtualMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachineCloneSpec) DeepCopyInto(out *VirtualMachineCloneSpec) { - *out = *in - in.Network.DeepCopyInto(&out.Network) - if in.CustomVMXKeys != nil { - in, out := &in.CustomVMXKeys, &out.CustomVMXKeys - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineCloneSpec. -func (in *VirtualMachineCloneSpec) DeepCopy() *VirtualMachineCloneSpec { - if in == nil { - return nil - } - out := new(VirtualMachineCloneSpec) - in.DeepCopyInto(out) - return out -} diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_haproxyloadbalancers.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_haproxyloadbalancers.yaml deleted file mode 100644 index c2f473d41d..0000000000 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_haproxyloadbalancers.yaml +++ /dev/null @@ -1,296 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - name: haproxyloadbalancers.infrastructure.cluster.x-k8s.io -spec: - group: infrastructure.cluster.x-k8s.io - names: - kind: HAProxyLoadBalancer - listKind: HAProxyLoadBalancerList - plural: haproxyloadbalancers - singular: haproxyloadbalancer - scope: Namespaced - versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "HAProxyLoadBalancer is the Schema for the haproxyloadbalancers - API \n Deprecated: This type will be removed in v1alpha4." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: HAProxyLoadBalancerSpec defines the desired state of HAProxyLoadBalancer. - properties: - user: - description: SSHUser specifies the name of a user that is granted - remote access to the deployed VM. - properties: - authorizedKeys: - description: AuthorizedKeys is one or more public SSH keys that - grant remote access. - items: - type: string - type: array - name: - description: Name is the name of the SSH user. - type: string - required: - - authorizedKeys - - name - type: object - virtualMachineConfiguration: - description: VirtualMachineConfiguration is information used to deploy - a load balancer VM. - properties: - cloneMode: - description: CloneMode specifies the type of clone operation. - The LinkedClone mode is only support for templates that have - at least one snapshot. If the template has no snapshots, then - CloneMode defaults to FullClone. When LinkedClone mode is enabled - the DiskGiB field is ignored as it is not possible to expand - disks of linked clones. Defaults to LinkedClone, but fails gracefully - to FullClone if the source of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX options - that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the datacenter - in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, - in GiB. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int32 - type: integer - folder: - description: Folder is the name or inventory path of the folder - in which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's memory, - in MiB. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: Devices is the list of network devices used by - the virtual machine. TODO(akutz) Make sure at least one - network matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly assign - a name to the network device as it exists in the guest - operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether - or not to use DHCP for IPv4 on this device. If true - then IPAddrs should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether - or not to use DHCP for IPv6 on this device. If true - then IPAddrs should not contain any IPv6 addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by this - device. Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this - device. Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 and/or - IPv6 addresses to assign to this device. IP addresses - must also specify the segment length in CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by this - device. It is generally a good idea to omit this field - and allow a MAC address to be generated. Please note - that this value must use the VMware OUI to work with - the in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission - Unit size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or IPv6 - addresses used as DNS nameservers. Please note that - Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere - network to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of - the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains - used when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR for - the Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes applied - to the virtual machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in a - virtual machine. Defaults to the eponymous property value in - the template from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to distribute - CPUs in this virtual machine. Defaults to the eponymous property - value in the template from which the virtual machine is cloned. - format: int32 - type: integer - resourcePool: - description: ResourcePool is the name or inventory path of the - resource pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere server - on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which to - create a linked clone. This field is ignored if LinkedClone - is not enabled. Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use with - this Virtual Machine - type: string - template: - description: Template is the name or inventory path of the template - used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum - of the given vCenter server's host certificate When this is - set to empty, this VirtualMachine would be created without TLS - certificate validation of the communication between Cluster - API Provider vSphere and the VMware vCenter server. - type: string - required: - - network - - template - type: object - required: - - virtualMachineConfiguration - type: object - status: - description: HAProxyLoadBalancerStatus defines the observed state of HAProxyLoadBalancer. - properties: - address: - description: "Address is the IP address or DNS name of the load balancer. - \n This field is required as part of the Portable Load Balancer - model and is inspected via an unstructured reader by other controllers - to determine the status of the load balancer." - type: string - ready: - description: "Ready indicates whether or not the load balancer is - ready. \n This field is required as part of the Portable Load Balancer - model and is inspected via an unstructured reader by other controllers - to determine the status of the load balancer." - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusteridentities.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusteridentities.yaml index 0402098b78..777cbaa024 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusteridentities.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusteridentities.yaml @@ -16,272 +16,6 @@ spec: singular: vsphereclusteridentity scope: Cluster versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereClusterIdentity defines the account to be used for reconciling - clusters \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - allowedNamespaces: - description: AllowedNamespaces is used to identify which namespaces - are allowed to use this account. Namespaces can be selected with - a label selector. If this object is nil, no namespaces will be allowed - properties: - selector: - description: Selector is a standard Kubernetes LabelSelector. - A label query over a set of resources. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A - single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is "key", - the operator is "In", and the values array contains only - "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - type: object - secretName: - description: SecretName references a Secret inside the controller - namespace with the credentials to use - minLength: 1 - type: string - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - ready: - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereClusterIdentity defines the account to be used for reconciling - clusters \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - allowedNamespaces: - description: AllowedNamespaces is used to identify which namespaces - are allowed to use this account. Namespaces can be selected with - a label selector. If this object is nil, no namespaces will be allowed - properties: - selector: - description: Selector is a standard Kubernetes LabelSelector. - A label query over a set of resources. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If - the operator is In or NotIn, the values array must - be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced - during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A - single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is "key", - the operator is "In", and the values array contains only - "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - type: object - secretName: - description: SecretName references a Secret inside the controller - namespace with the credentials to use - minLength: 1 - type: string - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - ready: - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusters.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusters.yaml index d7902076dc..e9e1d26b15 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusters.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclusters.yaml @@ -16,556 +16,6 @@ spec: singular: vspherecluster scope: Namespaced versions: - - additionalPrinterColumns: - - description: Cluster infrastructure is ready for VSphereMachine - jsonPath: .status.ready - name: Ready - type: string - - description: Server is the address of the vSphere endpoint - jsonPath: .spec.server - name: Server - type: string - - description: API Endpoint - jsonPath: .spec.controlPlaneEndpoint[0] - name: ControlPlaneEndpoint - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereCluster is the Schema for the vsphereclusters API \n - Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster. - properties: - cloudProviderConfiguration: - description: "CloudProviderConfiguration holds the cluster-wide configuration - for the vSphere cloud provider. \n Deprecated: will be removed in - v1alpha4." - properties: - disk: - description: Disk is the vSphere cloud provider's disk configuration. - properties: - scsiControllerType: - description: SCSIControllerType defines SCSI controller to - be used. - type: string - type: object - global: - description: Global is the vSphere cloud provider's global configuration. - properties: - apiBindPort: - description: APIBindPort configures the vSphere cloud controller - manager API port. Defaults to 43001. - type: string - apiDisable: - description: APIDisable disables the vSphere cloud controller - manager API. Defaults to true. - type: boolean - caFile: - description: CAFile Specifies the path to a CA certificate - in PEM format. If not configured, the system's CA certificates - will be used. - type: string - datacenters: - description: Datacenters is a CSV string of the datacenters - in which VMs are located. - type: string - insecure: - description: Insecure is a flag that disables TLS peer verification. - type: boolean - password: - description: Password is the password used to access a vSphere - endpoint. - type: string - port: - description: Port is the port on which the vSphere endpoint - is listening. Defaults to 443. - type: string - roundTripperCount: - description: RoundTripperCount specifies the SOAP round tripper - count (retries = RoundTripper - 1) - format: int32 - type: integer - secretName: - description: SecretName is the name of the Kubernetes secret - in which the vSphere credentials are located. - type: string - secretNamespace: - description: SecretNamespace is the namespace for SecretName. - type: string - secretsDirectory: - description: 'SecretsDirectory is a directory in which secrets - may be found. This may used in the event that: 1. It is - not desirable to use the K8s API to watch changes to secrets - 2. The cloud controller manager is not running in a K8s - environment, such as DC/OS. For example, the container storage - interface (CSI) is container orcehstrator (CO) agnostic, - and should support non-K8s COs. Defaults to /etc/cloud/credentials.' - type: string - serviceAccount: - description: ServiceAccount is the Kubernetes service account - used to launch the cloud controller manager. Defaults to - cloud-controller-manager. - type: string - thumbprint: - description: Thumbprint is the cryptographic thumbprint of - the vSphere endpoint's certificate. - type: string - username: - description: Username is the username used to access a vSphere - endpoint. - type: string - type: object - labels: - description: Labels is the vSphere cloud provider's zone and region - configuration. - properties: - region: - description: Region is the region in which VMs are created/located. - type: string - zone: - description: Zone is the zone in which VMs are created/located. - type: string - type: object - network: - description: Network is the vSphere cloud provider's network configuration. - properties: - name: - description: Name is the name of the network to which VMs - are connected. - type: string - type: object - providerConfig: - description: CPIProviderConfig contains extra information used - to configure the vSphere cloud provider. - properties: - cloud: - properties: - controllerImage: - type: string - extraArgs: - additionalProperties: - type: string - description: ExtraArgs passes through extra arguments - to the cloud provider. The arguments here are passed - to the cloud provider daemonset specification - type: object - type: object - storage: - properties: - attacherImage: - type: string - controllerImage: - type: string - livenessProbeImage: - type: string - metadataSyncerImage: - type: string - nodeDriverImage: - type: string - provisionerImage: - type: string - registrarImage: - type: string - type: object - type: object - virtualCenter: - additionalProperties: - description: CPIVCenterConfig is a vSphere cloud provider's - vCenter configuration. - properties: - datacenters: - description: Datacenters is a CSV string of the datacenters - in which VMs are located. - type: string - password: - description: Password is the password used to access a vSphere - endpoint. - type: string - port: - description: Port is the port on which the vSphere endpoint - is listening. Defaults to 443. - type: string - roundTripperCount: - description: RoundTripperCount specifies the SOAP round - tripper count (retries = RoundTripper - 1) - format: int32 - type: integer - thumbprint: - description: Thumbprint is the cryptographic thumbprint - of the vSphere endpoint's certificate. - type: string - username: - description: Username is the username used to access a vSphere - endpoint. - type: string - type: object - description: VCenter is a list of vCenter configurations. - type: object - workspace: - description: Workspace is the vSphere cloud provider's workspace - configuration. - properties: - datacenter: - description: Datacenter is the datacenter in which VMs are - created/located. - type: string - datastore: - description: Datastore is the datastore in which VMs are created/located. - type: string - folder: - description: Folder is the folder in which VMs are created/located. - type: string - resourcePool: - description: ResourcePool is the resource pool in which VMs - are created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere - endpoint. - type: string - type: object - type: object - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - identityRef: - description: IdentityRef is a reference to either a Secret or VSphereClusterIdentity - that contains the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - insecure: - description: "Insecure is a flag that controls whether to validate - the vSphere server's certificate. \n Deprecated: will be removed - in v1alpha4." - type: boolean - loadBalancerRef: - description: "LoadBalancerRef may be used to enable a control plane - load balancer for this cluster. When a LoadBalancerRef is provided, - the VSphereCluster.Status.Ready field will not be true until the - referenced resource is Status.Ready and has a non-empty Status.Address - value. \n Deprecated: will be removed in v1alpha4." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate When provided, Insecure - should not be set to true - type: string - type: object - status: - description: VSphereClusterStatus defines the observed state of VSphereClusterSpec. - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - failureDomains: - additionalProperties: - description: FailureDomainSpec is the Schema for Cluster API failure - domains. It allows controllers to understand how many failure - domains a cluster can optionally span across. - properties: - attributes: - additionalProperties: - type: string - description: Attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: ControlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean - type: object - description: FailureDomains is a list of failure domain objects synced - from the infrastructure provider. - type: object - ready: - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster infrastructure is ready for VSphereMachine - jsonPath: .status.ready - name: Ready - type: string - - description: Server is the address of the vSphere endpoint - jsonPath: .spec.server - name: Server - type: string - - description: API Endpoint - jsonPath: .spec.controlPlaneEndpoint[0] - name: ControlPlaneEndpoint - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereCluster is the Schema for the vsphereclusters API \n - Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster - properties: - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - identityRef: - description: IdentityRef is a reference to either a Secret or VSphereClusterIdentity - that contains the identity to use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate - type: string - type: object - status: - description: VSphereClusterStatus defines the observed state of VSphereClusterSpec - properties: - conditions: - description: Conditions defines current service state of the VSphereCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - failureDomains: - additionalProperties: - description: FailureDomainSpec is the Schema for Cluster API failure - domains. It allows controllers to understand how many failure - domains a cluster can optionally span across. - properties: - attributes: - additionalProperties: - type: string - description: Attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: ControlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean - type: object - description: FailureDomains is a list of failure domain objects synced - from the infrastructure provider. - type: object - ready: - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Cluster infrastructure is ready for VSphereMachine jsonPath: .status.ready diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclustertemplates.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclustertemplates.yaml index d5dd50e300..40e23bf7f6 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclustertemplates.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vsphereclustertemplates.yaml @@ -16,85 +16,6 @@ spec: singular: vsphereclustertemplate scope: Namespaced versions: - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereClusterTemplate is the Schema for the vsphereclustertemplates - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereClusterTemplateSpec defines the desired state of VSphereClusterTemplate - properties: - template: - properties: - spec: - description: VSphereClusterSpec defines the desired state of VSphereCluster - properties: - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint - used to communicate with the control plane. - properties: - host: - description: The hostname on which the API server is serving. - type: string - port: - description: The port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - identityRef: - description: IdentityRef is a reference to either a Secret - or VSphereClusterIdentity that contains the identity to - use when reconciling the cluster. - properties: - kind: - description: Kind of the identity. Can either be VSphereClusterIdentity - or Secret - enum: - - VSphereClusterIdentity - - Secret - type: string - name: - description: Name of the identity. - minLength: 1 - type: string - required: - - kind - - name - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum - of the given vCenter server's host certificate - type: string - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheredeploymentzones.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheredeploymentzones.yaml index acb644b490..ca644b0a08 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheredeploymentzones.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheredeploymentzones.yaml @@ -16,216 +16,6 @@ spec: singular: vspheredeploymentzone scope: Cluster versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereDeploymentZone is the Schema for the vspheredeploymentzones - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone - properties: - controlPlane: - description: ControlPlane determines if this failure domain is suitable - for use by control plane machines. - type: boolean - failureDomain: - description: failureDomain is the name of the VSphereFailureDomain - used for this VSphereDeploymentZone - type: string - placementConstraint: - description: PlacementConstraint encapsulates the placement constraints - used within this deployment zone. - properties: - folder: - description: Folder is the name or inventory path of the folder - in which the virtual machine is created/located. - type: string - resourcePool: - description: ResourcePool is the name or inventory path of the - resource pool in which the virtual machine is created/located. - type: string - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - required: - - placementConstraint - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - ready: - description: Ready is true when the VSphereDeploymentZone resource - is ready. If set to false, it will be ignored by VSphereClusters - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereDeploymentZone is the Schema for the vspheredeploymentzones - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereDeploymentZoneSpec defines the desired state of VSphereDeploymentZone - properties: - controlPlane: - description: ControlPlane determines if this failure domain is suitable - for use by control plane machines. - type: boolean - failureDomain: - description: FailureDomain is the name of the VSphereFailureDomain - used for this VSphereDeploymentZone - type: string - placementConstraint: - description: PlacementConstraint encapsulates the placement constraints - used within this deployment zone. - properties: - folder: - description: Folder is the name or inventory path of the folder - in which the virtual machine is created/located. - type: string - resourcePool: - description: ResourcePool is the name or inventory path of the - resource pool in which the virtual machine is created/located. - type: string - type: object - server: - description: Server is the address of the vSphere endpoint. - type: string - required: - - placementConstraint - type: object - status: - properties: - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - ready: - description: Ready is true when the VSphereDeploymentZone resource - is ready. If set to false, it will be ignored by VSphereClusters - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherefailuredomains.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherefailuredomains.yaml index 8fe3cd64eb..7a2ee491d7 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherefailuredomains.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherefailuredomains.yaml @@ -16,250 +16,6 @@ spec: singular: vspherefailuredomain scope: Cluster versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereFailureDomain is the Schema for the vspherefailuredomains - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain - properties: - region: - description: Region defines the name and type of a region - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - topology: - description: Topology is the what describes a given failure domain - using vSphere constructs - properties: - computeCluster: - description: ComputeCluster as the failure domain - type: string - datacenter: - description: The underlying infrastructure for this failure domain - Datacenter as the failure domain - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - hosts: - description: Hosts has information required for placement of machines - on VSphere hosts. - properties: - hostGroupName: - description: HostGroupName is the name of the Host group - type: string - vmGroupName: - description: VMGroupName is the name of the VM group - type: string - required: - - hostGroupName - - vmGroupName - type: object - networks: - description: Networks is the list of networks within this failure - domain - items: - type: string - type: array - required: - - datacenter - type: object - zone: - description: Zone defines the name and type of a zone - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - required: - - region - - topology - - zone - type: object - type: object - served: true - storage: false - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereFailureDomain is the Schema for the vspherefailuredomains - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereFailureDomainSpec defines the desired state of VSphereFailureDomain - properties: - region: - description: Region defines the name and type of a region - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - topology: - description: Topology describes a given failure domain using vSphere - constructs - properties: - computeCluster: - description: ComputeCluster as the failure domain - type: string - datacenter: - description: The underlying infrastructure for this failure domain - Datacenter as the failure domain - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - hosts: - description: Hosts has information required for placement of machines - on VSphere hosts. - properties: - hostGroupName: - description: HostGroupName is the name of the Host group - type: string - vmGroupName: - description: VMGroupName is the name of the VM group - type: string - required: - - hostGroupName - - vmGroupName - type: object - networks: - description: Networks is the list of networks within this failure - domain - items: - type: string - type: array - required: - - datacenter - type: object - zone: - description: Zone defines the name and type of a zone - properties: - autoConfigure: - description: AutoConfigure tags the Type which is specified in - the Topology - type: boolean - name: - description: Name is the name of the tag that represents this - failure domain - type: string - tagCategory: - description: TagCategory is the category used for the tag - type: string - type: - description: Type is the type of failure domain, the current values - are "Datacenter", "ComputeCluster" and "HostGroup" - enum: - - Datacenter - - ComputeCluster - - HostGroup - type: string - required: - - name - - tagCategory - - type - type: object - required: - - region - - topology - - zone - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachines.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachines.yaml index f9d2bdfa43..47ddaf8329 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachines.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachines.yaml @@ -16,802 +16,6 @@ spec: singular: vspheremachine scope: Namespaced versions: - - additionalPrinterColumns: - - description: Cluster to which this VSphereMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - description: Machine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: VSphereMachine instance ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine object which owns this VSphereMachine - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereMachine is the Schema for the vspheremachines API \n - Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereMachineSpec defines the desired state of VSphereMachine - properties: - cloneMode: - description: CloneMode specifies the type of clone operation. The - LinkedClone mode is only support for templates that have at least - one snapshot. If the template has no snapshots, then CloneMode defaults - to FullClone. When LinkedClone mode is enabled the DiskGiB field - is ignored as it is not possible to expand disks of linked clones. - Defaults to LinkedClone, but fails gracefully to FullClone if the - source of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX options - that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the datacenter - in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which - the virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster API. For - this infrastructure provider, the name is equivalent to the name - of the VSphereDeploymentZone. - type: string - folder: - description: Folder is the name or inventory path of the folder in - which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's memory, - in MiB. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: Devices is the list of network devices used by the - virtual machine. TODO(akutz) Make sure at least one network - matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly assign - a name to the network device as it exists in the guest - operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether or not - to use DHCP for IPv4 on this device. If true then IPAddrs - should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether or not - to use DHCP for IPv6 on this device. If true then IPAddrs - should not contain any IPv6 addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 and/or - IPv6 addresses to assign to this device. IP addresses - must also specify the segment length in CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow - a MAC address to be generated. Please note that this value - must use the VMware OUI to work with the in-tree vSphere - cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or IPv6 addresses - used as DNS nameservers. Please note that Linux allows - only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere network - to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains used - when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR for the - Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes applied - to the virtual machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in a virtual - machine. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to distribute - CPUs in this virtual machine. Defaults to the eponymous property - value in the template from which the virtual machine is cloned. - format: int32 - type: integer - providerID: - description: ProviderID is the virtual machine's BIOS UUID formated - as vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: ResourcePool is the name or inventory path of the resource - pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere server - on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which to create - a linked clone. This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: Template is the name or inventory path of the template - used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate When this is set to empty, - this VirtualMachine would be created without TLS certificate validation - of the communication between Cluster API Provider vSphere and the - VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereMachineStatus defines the observed state of VSphereMachine - properties: - addresses: - description: Addresses contains the VSphere instance associated addresses. - items: - description: MachineAddress contains information for the node's - address. - properties: - address: - description: The machine address. - type: string - type: - description: Machine address type, one of Hostname, ExternalIP - or InternalIP. - type: string - required: - - address - - type - type: object - type: array - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: "FailureMessage will be set in the event that there is - a terminal problem reconciling the Machine and will contain a more - verbose string suitable for logging and human consumption. \n This - field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over time (like - service outages), but instead indicate that something is fundamentally - wrong with the Machine's spec or the configuration of the controller, - and that manual intervention is required. Examples of terminal errors - would be invalid combinations of settings in the spec, values that - are unsupported by the controller, or the responsible controller - itself being critically misconfigured. \n Any transient errors that - occur during the reconciliation of Machines can be added as events - to the Machine object and/or logged in the controller's output." - type: string - failureReason: - description: "FailureReason will be set in the event that there is - a terminal problem reconciling the Machine and will contain a succinct - value suitable for machine interpretation. \n This field should - not be set for transitive errors that a controller faces that are - expected to be fixed automatically over time (like service outages), - but instead indicate that something is fundamentally wrong with - the Machine's spec or the configuration of the controller, and that - manual intervention is required. Examples of terminal errors would - be invalid combinations of settings in the spec, values that are - unsupported by the controller, or the responsible controller itself - being critically misconfigured. \n Any transient errors that occur - during the reconciliation of Machines can be added as events to - the Machine object and/or logged in the controller's output." - type: string - network: - description: Network returns the network status for each of the machine's - configured network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: - description: Connected is a flag that indicates whether this - network is currently connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string - required: - - macAddr - type: object - type: array - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Cluster to which this VSphereMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - description: Machine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: VSphereMachine instance ID - jsonPath: .spec.providerID - name: ProviderID - type: string - - description: Machine object which owns this VSphereMachine - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Time duration since creation of Machine - jsonPath: .metadata.creationTimestamp - name: Age - type: date - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereMachine is the Schema for the vspheremachines API \n - Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereMachineSpec defines the desired state of VSphereMachine - properties: - cloneMode: - description: CloneMode specifies the type of clone operation. The - LinkedClone mode is only support for templates that have at least - one snapshot. If the template has no snapshots, then CloneMode defaults - to FullClone. When LinkedClone mode is enabled the DiskGiB field - is ignored as it is not possible to expand disks of linked clones. - Defaults to LinkedClone, but fails gracefully to FullClone if the - source of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX options - that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the datacenter - in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which - the virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster API. For - this infrastructure provider, the name is equivalent to the name - of the VSphereDeploymentZone. - type: string - folder: - description: Folder is the name or inventory path of the folder in - which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's memory, - in MiB. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: Devices is the list of network devices used by the - virtual machine. TODO(akutz) Make sure at least one network - matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly assign - a name to the network device as it exists in the guest - operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether or not - to use DHCP for IPv4 on this device. If true then IPAddrs - should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether or not - to use DHCP for IPv6 on this device. If true then IPAddrs - should not contain any IPv6 addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 and/or - IPv6 addresses to assign to this device. IP addresses - must also specify the segment length in CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow - a MAC address to be generated. Please note that this value - must use the VMware OUI to work with the in-tree vSphere - cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or IPv6 addresses - used as DNS nameservers. Please note that Linux allows - only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere network - to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains used - when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR for the - Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes applied - to the virtual machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in a virtual - machine. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to distribute - CPUs in this virtual machine. Defaults to the eponymous property - value in the template from which the virtual machine is cloned. - format: int32 - type: integer - providerID: - description: ProviderID is the virtual machine's BIOS UUID formated - as vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: ResourcePool is the name or inventory path of the resource - pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere server - on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which to create - a linked clone. This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: Template is the name or inventory path of the template - used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate When this is set to empty, - this VirtualMachine would be created without TLS certificate validation - of the communication between Cluster API Provider vSphere and the - VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereMachineStatus defines the observed state of VSphereMachine - properties: - addresses: - description: Addresses contains the VSphere instance associated addresses. - items: - description: MachineAddress contains information for the node's - address. - properties: - address: - description: The machine address. - type: string - type: - description: Machine address type, one of Hostname, ExternalIP - or InternalIP. - type: string - required: - - address - - type - type: object - type: array - conditions: - description: Conditions defines current service state of the VSphereMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: "FailureMessage will be set in the event that there is - a terminal problem reconciling the Machine and will contain a more - verbose string suitable for logging and human consumption. \n This - field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over time (like - service outages), but instead indicate that something is fundamentally - wrong with the Machine's spec or the configuration of the controller, - and that manual intervention is required. Examples of terminal errors - would be invalid combinations of settings in the spec, values that - are unsupported by the controller, or the responsible controller - itself being critically misconfigured. \n Any transient errors that - occur during the reconciliation of Machines can be added as events - to the Machine object and/or logged in the controller's output." - type: string - failureReason: - description: "FailureReason will be set in the event that there is - a terminal problem reconciling the Machine and will contain a succinct - value suitable for machine interpretation. \n This field should - not be set for transitive errors that a controller faces that are - expected to be fixed automatically over time (like service outages), - but instead indicate that something is fundamentally wrong with - the Machine's spec or the configuration of the controller, and that - manual intervention is required. Examples of terminal errors would - be invalid combinations of settings in the spec, values that are - unsupported by the controller, or the responsible controller itself - being critically misconfigured. \n Any transient errors that occur - during the reconciliation of Machines can be added as events to - the Machine object and/or logged in the controller's output." - type: string - network: - description: Network returns the network status for each of the machine's - configured network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: - description: Connected is a flag that indicates whether this - network is currently connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string - required: - - macAddr - type: object - type: array - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Cluster to which this VSphereMachine belongs jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachinetemplates.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachinetemplates.yaml index 7f0624fc22..dd1a667a34 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachinetemplates.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspheremachinetemplates.yaml @@ -16,677 +16,6 @@ spec: singular: vspheremachinetemplate scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereMachineTemplate is the Schema for the vspheremachinetemplates - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate - properties: - template: - description: VSphereMachineTemplateResource describes the data needed - to create a VSphereMachine from a template - properties: - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - generateName: - description: "GenerateName is an optional prefix, used by - the server, to generate a unique name ONLY IF the Name field - has not been provided. If this field is used, the name returned - to the client will be different than the name passed. This - value will also be combined with a unique suffix. The provided - value has the same validation rules as the Name field, and - may be truncated by the length of the suffix required to - make the value unique on the server. \n If this field is - specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created - or 500 with Reason ServerTimeout indicating a unique name - could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the - Retry-After header). \n Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - \n Deprecated: This field has no function and is going to - be removed in a next release." - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: "Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names \n - Deprecated: This field has no function and is going to be - removed in a next release." - type: string - namespace: - description: "Namespace defines the space within each name - must be unique. An empty namespace is equivalent to the - \"default\" namespace, but \"default\" is the canonical - representation. Not all objects are required to be scoped - to a namespace - the value of this field for those objects - will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces - \n Deprecated: This field has no function and is going to - be removed in a next release." - type: string - ownerReferences: - description: "List of objects depended by this object. If - ALL objects in the list have been deleted, this object will - be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, - with the controller field set to true. There cannot be more - than one managing controller. \n Deprecated: This field - has no function and is going to be removed in a next release." - items: - description: OwnerReference contains enough information - to let you identify an owning object. An owning object - must be in the same namespace as the dependent, or be - cluster-scoped, so there is no namespace field. - properties: - apiVersion: - description: API version of the referent. - type: string - blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" - finalizer, then the owner cannot be deleted from the - key-value store until this reference is removed. See - https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this - field and enforces the foreground deletion. Defaults - to false. To set this field, a user needs "delete" - permission of the owner, otherwise 422 (Unprocessable - Entity) will be returned. - type: boolean - controller: - description: If true, this reference points to the managing - controller. - type: boolean - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids' - type: string - required: - - apiVersion - - kind - - name - - uid - type: object - x-kubernetes-map-type: atomic - type: array - type: object - spec: - description: Spec is the specification of the desired behavior - of the machine. - properties: - cloneMode: - description: CloneMode specifies the type of clone operation. - The LinkedClone mode is only support for templates that - have at least one snapshot. If the template has no snapshots, - then CloneMode defaults to FullClone. When LinkedClone mode - is enabled the DiskGiB field is ignored as it is not possible - to expand disks of linked clones. Defaults to LinkedClone, - but fails gracefully to FullClone if the source of the clone - operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX - options that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the - datacenter in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the - datastore in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, - in GiB. Defaults to the eponymous property value in the - template from which the virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster - API. For this infrastructure provider, the name is equivalent - to the name of the VSphereDeploymentZone. - type: string - folder: - description: Folder is the name or inventory path of the folder - in which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's - memory, in MiB. Defaults to the eponymous property value - in the template from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this - machine's VM. - properties: - devices: - description: Devices is the list of network devices used - by the virtual machine. TODO(akutz) Make sure at least - one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly - assign a name to the network device as it exists - in the guest operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether - or not to use DHCP for IPv4 on this device. If - true then IPAddrs should not contain any IPv4 - addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether - or not to use DHCP for IPv6 on this device. If - true then IPAddrs should not contain any IPv6 - addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by - this device. Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by - this device. Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 - and/or IPv6 addresses to assign to this device. - IP addresses must also specify the segment length - in CIDR notation. Required when DHCP4 and DHCP6 - are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by - this device. It is generally a good idea to omit - this field and allow a MAC address to be generated. - Please note that this value must use the VMware - OUI to work with the in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission - Unit size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or - IPv6 addresses used as DNS nameservers. Please - note that Linux allows only three nameservers - (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere - network to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static - routes applied to the device. - items: - description: NetworkRouteSpec defines a static - network route. - properties: - metric: - description: Metric is the weight/priority - of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains - used when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR - for the Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes - applied to the virtual machine. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in - a virtual machine. Defaults to the eponymous property value - in the template from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to - distribute CPUs in this virtual machine. Defaults to the - eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - providerID: - description: ProviderID is the virtual machine's BIOS UUID - formated as vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: ResourcePool is the name or inventory path of - the resource pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere - server on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which - to create a linked clone. This field is ignored if LinkedClone - is not enabled. Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use - with this Virtual Machine - type: string - template: - description: Template is the name or inventory path of the - template used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum - of the given vCenter server's host certificate When this - is set to empty, this VirtualMachine would be created without - TLS certificate validation of the communication between - Cluster API Provider vSphere and the VMware vCenter server. - type: string - required: - - network - - template - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: false - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereMachineTemplate is the Schema for the vspheremachinetemplates - API \n Deprecated: This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereMachineTemplateSpec defines the desired state of VSphereMachineTemplate - properties: - template: - description: VSphereMachineTemplateResource describes the data needed - to create a VSphereMachine from a template - properties: - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - type: object - spec: - description: Spec is the specification of the desired behavior - of the machine. - properties: - cloneMode: - description: CloneMode specifies the type of clone operation. - The LinkedClone mode is only support for templates that - have at least one snapshot. If the template has no snapshots, - then CloneMode defaults to FullClone. When LinkedClone mode - is enabled the DiskGiB field is ignored as it is not possible - to expand disks of linked clones. Defaults to LinkedClone, - but fails gracefully to FullClone if the source of the clone - operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX - options that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the - datacenter in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the - datastore in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, - in GiB. Defaults to the eponymous property value in the - template from which the virtual machine is cloned. - format: int32 - type: integer - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster - API. For this infrastructure provider, the name is equivalent - to the name of the VSphereDeploymentZone. - type: string - folder: - description: Folder is the name or inventory path of the folder - in which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's - memory, in MiB. Defaults to the eponymous property value - in the template from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this - machine's VM. - properties: - devices: - description: Devices is the list of network devices used - by the virtual machine. TODO(akutz) Make sure at least - one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly - assign a name to the network device as it exists - in the guest operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether - or not to use DHCP for IPv4 on this device. If - true then IPAddrs should not contain any IPv4 - addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether - or not to use DHCP for IPv6 on this device. If - true then IPAddrs should not contain any IPv6 - addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by - this device. Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by - this device. Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 - and/or IPv6 addresses to assign to this device. - IP addresses must also specify the segment length - in CIDR notation. Required when DHCP4 and DHCP6 - are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by - this device. It is generally a good idea to omit - this field and allow a MAC address to be generated. - Please note that this value must use the VMware - OUI to work with the in-tree vSphere cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission - Unit size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or - IPv6 addresses used as DNS nameservers. Please - note that Linux allows only three nameservers - (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere - network to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static - routes applied to the device. - items: - description: NetworkRouteSpec defines a static - network route. - properties: - metric: - description: Metric is the weight/priority - of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains - used when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR - for the Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes - applied to the virtual machine. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in - a virtual machine. Defaults to the eponymous property value - in the template from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to - distribute CPUs in this virtual machine. Defaults to the - eponymous property value in the template from which the - virtual machine is cloned. - format: int32 - type: integer - providerID: - description: ProviderID is the virtual machine's BIOS UUID - formated as vsphere://12345678-1234-1234-1234-123456789abc - type: string - resourcePool: - description: ResourcePool is the name or inventory path of - the resource pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere - server on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which - to create a linked clone. This field is ignored if LinkedClone - is not enabled. Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use - with this Virtual Machine - type: string - template: - description: Template is the name or inventory path of the - template used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum - of the given vCenter server's host certificate When this - is set to empty, this VirtualMachine would be created without - TLS certificate validation of the communication between - Cluster API Provider vSphere and the VMware vCenter server. - type: string - required: - - network - - template - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherevms.yaml b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherevms.yaml index bd51b5a9da..6d152dc748 100644 --- a/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherevms.yaml +++ b/config/default/crd/bases/infrastructure.cluster.x-k8s.io_vspherevms.yaml @@ -16,832 +16,6 @@ spec: singular: vspherevm scope: Namespaced versions: - - deprecated: true - name: v1alpha3 - schema: - openAPIV3Schema: - description: "VSphereVM is the Schema for the vspherevms API \n Deprecated: - This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereVMSpec defines the desired state of VSphereVM. - properties: - biosUUID: - description: BiosUUID is the VM's BIOS UUID that is assigned at runtime - after the VM has been created. This field is required at runtime - for other controllers that read this CRD as unstructured data. - type: string - bootstrapRef: - description: BootstrapRef is a reference to a bootstrap provider-specific - resource that holds configuration details. This field is optional - in case no bootstrap data is required to create a VM. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - cloneMode: - description: CloneMode specifies the type of clone operation. The - LinkedClone mode is only support for templates that have at least - one snapshot. If the template has no snapshots, then CloneMode defaults - to FullClone. When LinkedClone mode is enabled the DiskGiB field - is ignored as it is not possible to expand disks of linked clones. - Defaults to LinkedClone, but fails gracefully to FullClone if the - source of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX options - that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the datacenter - in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which - the virtual machine is cloned. - format: int32 - type: integer - folder: - description: Folder is the name or inventory path of the folder in - which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's memory, - in MiB. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: Devices is the list of network devices used by the - virtual machine. TODO(akutz) Make sure at least one network - matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly assign - a name to the network device as it exists in the guest - operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether or not - to use DHCP for IPv4 on this device. If true then IPAddrs - should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether or not - to use DHCP for IPv6 on this device. If true then IPAddrs - should not contain any IPv6 addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 and/or - IPv6 addresses to assign to this device. IP addresses - must also specify the segment length in CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow - a MAC address to be generated. Please note that this value - must use the VMware OUI to work with the in-tree vSphere - cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or IPv6 addresses - used as DNS nameservers. Please note that Linux allows - only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere network - to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains used - when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR for the - Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes applied - to the virtual machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in a virtual - machine. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to distribute - CPUs in this virtual machine. Defaults to the eponymous property - value in the template from which the virtual machine is cloned. - format: int32 - type: integer - resourcePool: - description: ResourcePool is the name or inventory path of the resource - pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere server - on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which to create - a linked clone. This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: Template is the name or inventory path of the template - used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate When this is set to empty, - this VirtualMachine would be created without TLS certificate validation - of the communication between Cluster API Provider vSphere and the - VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereVMStatus defines the observed state of VSphereVM - properties: - addresses: - description: Addresses is a list of the VM's IP addresses. This field - is required at runtime for other controllers that read this CRD - as unstructured data. - items: - type: string - type: array - cloneMode: - description: CloneMode is the type of clone operation used to clone - this VM. Since LinkedMode is the default but fails gracefully if - the source of the clone has no snapshots, this field may be used - to determine the actual type of clone operation used to create this - VM. - type: string - conditions: - description: Conditions defines current service state of the VSphereVM. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: "FailureMessage will be set in the event that there is - a terminal problem reconciling the vspherevm and will contain a - more verbose string suitable for logging and human consumption. - \n This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over time (like - service outages), but instead indicate that something is fundamentally - wrong with the vm. \n Any transient errors that occur during the - reconciliation of vspherevms can be added as events to the vspherevm - object and/or logged in the controller's output." - type: string - failureReason: - description: "FailureReason will be set in the event that there is - a terminal problem reconciling the vspherevm and will contain a - succinct value suitable for vm interpretation. \n This field should - not be set for transitive errors that a controller faces that are - expected to be fixed automatically over time (like service outages), - but instead indicate that something is fundamentally wrong with - the vm. \n Any transient errors that occur during the reconciliation - of vspherevms can be added as events to the vspherevm object and/or - logged in the controller's output." - type: string - network: - description: Network returns the network status for each of the machine's - configured network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: - description: Connected is a flag that indicates whether this - network is currently connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string - required: - - macAddr - type: object - type: array - ready: - description: Ready is true when the provider resource is ready. This - field is required at runtime for other controllers that read this - CRD as unstructured data. - type: boolean - retryAfter: - description: RetryAfter tracks the time we can retry queueing a task - format: date-time - type: string - snapshot: - description: Snapshot is the name of the snapshot from which the VM - was cloned if LinkedMode is enabled. - type: string - taskRef: - description: TaskRef is a managed object reference to a Task related - to the machine. This value is set automatically at runtime and should - not be set or modified by users. - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - deprecated: true - name: v1alpha4 - schema: - openAPIV3Schema: - description: "VSphereVM is the Schema for the vspherevms API \n Deprecated: - This type will be removed in one of the next releases." - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: VSphereVMSpec defines the desired state of VSphereVM. - properties: - biosUUID: - description: BiosUUID is the VM's BIOS UUID that is assigned at runtime - after the VM has been created. This field is required at runtime - for other controllers that read this CRD as unstructured data. - type: string - bootstrapRef: - description: BootstrapRef is a reference to a bootstrap provider-specific - resource that holds configuration details. This field is optional - in case no bootstrap data is required to create a VM. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - cloneMode: - description: CloneMode specifies the type of clone operation. The - LinkedClone mode is only support for templates that have at least - one snapshot. If the template has no snapshots, then CloneMode defaults - to FullClone. When LinkedClone mode is enabled the DiskGiB field - is ignored as it is not possible to expand disks of linked clones. - Defaults to LinkedClone, but fails gracefully to FullClone if the - source of the clone operation has no snapshots. - type: string - customVMXKeys: - additionalProperties: - type: string - description: CustomVMXKeys is a dictionary of advanced VMX options - that can be set on VM Defaults to empty map - type: object - datacenter: - description: Datacenter is the name or inventory path of the datacenter - in which the virtual machine is created/located. - type: string - datastore: - description: Datastore is the name or inventory path of the datastore - in which the virtual machine is created/located. - type: string - diskGiB: - description: DiskGiB is the size of a virtual machine's disk, in GiB. - Defaults to the eponymous property value in the template from which - the virtual machine is cloned. - format: int32 - type: integer - folder: - description: Folder is the name or inventory path of the folder in - which the virtual machine is created/located. - type: string - memoryMiB: - description: MemoryMiB is the size of a virtual machine's memory, - in MiB. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int64 - type: integer - network: - description: Network is the network configuration for this machine's - VM. - properties: - devices: - description: Devices is the list of network devices used by the - virtual machine. TODO(akutz) Make sure at least one network - matches the ClusterSpec.CloudProviderConfiguration.Network.Name - items: - description: NetworkDeviceSpec defines the network configuration - for a virtual machine's network device. - properties: - deviceName: - description: DeviceName may be used to explicitly assign - a name to the network device as it exists in the guest - operating system. - type: string - dhcp4: - description: DHCP4 is a flag that indicates whether or not - to use DHCP for IPv4 on this device. If true then IPAddrs - should not contain any IPv4 addresses. - type: boolean - dhcp6: - description: DHCP6 is a flag that indicates whether or not - to use DHCP for IPv6 on this device. If true then IPAddrs - should not contain any IPv6 addresses. - type: boolean - gateway4: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP4 is false. - type: string - gateway6: - description: Gateway4 is the IPv4 gateway used by this device. - Required when DHCP6 is false. - type: string - ipAddrs: - description: IPAddrs is a list of one or more IPv4 and/or - IPv6 addresses to assign to this device. IP addresses - must also specify the segment length in CIDR notation. - Required when DHCP4 and DHCP6 are both false. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address used by this device. - It is generally a good idea to omit this field and allow - a MAC address to be generated. Please note that this value - must use the VMware OUI to work with the in-tree vSphere - cloud provider. - type: string - mtu: - description: MTU is the device’s Maximum Transmission Unit - size in bytes. - format: int64 - type: integer - nameservers: - description: Nameservers is a list of IPv4 and/or IPv6 addresses - used as DNS nameservers. Please note that Linux allows - only three nameservers (https://linux.die.net/man/5/resolv.conf). - items: - type: string - type: array - networkName: - description: NetworkName is the name of the vSphere network - to which the device will be connected. - type: string - routes: - description: Routes is a list of optional, static routes - applied to the device. - items: - description: NetworkRouteSpec defines a static network - route. - properties: - metric: - description: Metric is the weight/priority of the - route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - searchDomains: - description: SearchDomains is a list of search domains used - when resolving IP addresses with DNS. - items: - type: string - type: array - required: - - networkName - type: object - type: array - preferredAPIServerCidr: - description: PreferredAPIServeCIDR is the preferred CIDR for the - Kubernetes API server endpoint on this machine - type: string - routes: - description: Routes is a list of optional, static routes applied - to the virtual machine. - items: - description: NetworkRouteSpec defines a static network route. - properties: - metric: - description: Metric is the weight/priority of the route. - format: int32 - type: integer - to: - description: To is an IPv4 or IPv6 address. - type: string - via: - description: Via is an IPv4 or IPv6 address. - type: string - required: - - metric - - to - - via - type: object - type: array - required: - - devices - type: object - numCPUs: - description: NumCPUs is the number of virtual processors in a virtual - machine. Defaults to the eponymous property value in the template - from which the virtual machine is cloned. - format: int32 - type: integer - numCoresPerSocket: - description: NumCPUs is the number of cores among which to distribute - CPUs in this virtual machine. Defaults to the eponymous property - value in the template from which the virtual machine is cloned. - format: int32 - type: integer - resourcePool: - description: ResourcePool is the name or inventory path of the resource - pool in which the virtual machine is created/located. - type: string - server: - description: Server is the IP address or FQDN of the vSphere server - on which the virtual machine is created/located. - type: string - snapshot: - description: Snapshot is the name of the snapshot from which to create - a linked clone. This field is ignored if LinkedClone is not enabled. - Defaults to the source's current snapshot. - type: string - storagePolicyName: - description: StoragePolicyName of the storage policy to use with this - Virtual Machine - type: string - template: - description: Template is the name or inventory path of the template - used to clone the virtual machine. - minLength: 1 - type: string - thumbprint: - description: Thumbprint is the colon-separated SHA-1 checksum of the - given vCenter server's host certificate When this is set to empty, - this VirtualMachine would be created without TLS certificate validation - of the communication between Cluster API Provider vSphere and the - VMware vCenter server. - type: string - required: - - network - - template - type: object - status: - description: VSphereVMStatus defines the observed state of VSphereVM - properties: - addresses: - description: Addresses is a list of the VM's IP addresses. This field - is required at runtime for other controllers that read this CRD - as unstructured data. - items: - type: string - type: array - cloneMode: - description: CloneMode is the type of clone operation used to clone - this VM. Since LinkedMode is the default but fails gracefully if - the source of the clone has no snapshots, this field may be used - to determine the actual type of clone operation used to create this - VM. - type: string - conditions: - description: Conditions defines current service state of the VSphereVM. - items: - description: Condition defines an observation of a Cluster API resource - operational state. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. - type: string - required: - - status - - type - type: object - type: array - failureMessage: - description: "FailureMessage will be set in the event that there is - a terminal problem reconciling the vspherevm and will contain a - more verbose string suitable for logging and human consumption. - \n This field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over time (like - service outages), but instead indicate that something is fundamentally - wrong with the vm. \n Any transient errors that occur during the - reconciliation of vspherevms can be added as events to the vspherevm - object and/or logged in the controller's output." - type: string - failureReason: - description: "FailureReason will be set in the event that there is - a terminal problem reconciling the vspherevm and will contain a - succinct value suitable for vm interpretation. \n This field should - not be set for transitive errors that a controller faces that are - expected to be fixed automatically over time (like service outages), - but instead indicate that something is fundamentally wrong with - the vm. \n Any transient errors that occur during the reconciliation - of vspherevms can be added as events to the vspherevm object and/or - logged in the controller's output." - type: string - network: - description: Network returns the network status for each of the machine's - configured network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. - properties: - connected: - description: Connected is a flag that indicates whether this - network is currently connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: - type: string - type: array - macAddr: - description: MACAddr is the MAC address of the network device. - type: string - networkName: - description: NetworkName is the name of the network. - type: string - required: - - macAddr - type: object - type: array - ready: - description: Ready is true when the provider resource is ready. This - field is required at runtime for other controllers that read this - CRD as unstructured data. - type: boolean - retryAfter: - description: RetryAfter tracks the time we can retry queueing a task - format: date-time - type: string - snapshot: - description: Snapshot is the name of the snapshot from which the VM - was cloned if LinkedMode is enabled. - type: string - taskRef: - description: TaskRef is a managed object reference to a Task related - to the machine. This value is set automatically at runtime and should - not be set or modified by users. - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/go.mod b/go.mod index 9a184dfcb7..d4e324a2b1 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.5.2 require ( github.com/blang/semver/v4 v4.0.0 github.com/go-logr/logr v1.2.4 - github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.3.1 github.com/onsi/ginkgo/v2 v2.13.0 github.com/onsi/gomega v1.28.0 @@ -24,7 +23,6 @@ require ( golang.org/x/mod v0.13.0 golang.org/x/text v0.13.0 golang.org/x/tools v0.14.0 - gopkg.in/gcfg.v1 v1.2.3 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.27.6 k8s.io/apiextensions-apiserver v0.27.6 @@ -48,6 +46,7 @@ require ( github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-github/v48 v48.2.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -136,7 +135,6 @@ require ( gopkg.in/fsnotify.v1 v1.4.7 gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiserver v0.27.6 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect diff --git a/go.sum b/go.sum index 921699d5dd..d4280fcb44 100644 --- a/go.sum +++ b/go.sum @@ -1072,8 +1072,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1083,8 +1081,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/metadata.yaml b/metadata.yaml index 859ac20d48..9b50dea4fa 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -6,24 +6,6 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: - - major: 0 - minor: 4 - contract: v1alpha2 - - major: 0 - minor: 5 - contract: v1alpha2 - - major: 0 - minor: 6 - contract: v1alpha3 - - major: 0 - minor: 7 - contract: v1alpha3 - - major: 0 - minor: 8 - contract: v1alpha4 - - major: 1 - minor: 0 - contract: v1beta1 - major: 1 minor: 1 contract: v1beta1 diff --git a/pkg/context/fake/constants.go b/pkg/context/fake/constants.go index 42c67ab9b4..4888325313 100644 --- a/pkg/context/fake/constants.go +++ b/pkg/context/fake/constants.go @@ -42,18 +42,14 @@ const ( // ClusterUUID is the UID of the fake CAPI cluster. ClusterUUID = "00000000-0000-0000-0000-000000000002" + //TODO:(killianmuldoon) assess whether the versioned constants e.g. Clusterv1a2Name are needed. + // Clusterv1a2Name is the name of the fake CAPI v1alpha3 Cluster resource. Clusterv1a2Name = "fake-cluster" // Clusterv1a2UUID is the UID of the fake CAPI v1alpha3 Cluster resource. Clusterv1a2UUID = "00000000-0000-0000-0000-000000000000" - // Machinev1a2Name is the name of the fake CAPI v1alpha3 Machine resource. - Machinev1a2Name = "fake-machine" - - // Machinev1a2UUID is the UID of the fake CAPI v1alpha3 Machine resource. - Machinev1a2UUID = "00000000-0000-0000-0000-000000000001" - VSphereClusterName = "fake-vsphere-cluster" // VSphereClusterUUID is the UID of the fake VSphereCluster resource. diff --git a/pkg/identity/identity_suite_test.go b/pkg/identity/identity_suite_test.go index fae6e52d46..7c93789580 100644 --- a/pkg/identity/identity_suite_test.go +++ b/pkg/identity/identity_suite_test.go @@ -35,7 +35,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3" infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" "sigs.k8s.io/cluster-api-provider-vsphere/pkg/manager" ) @@ -51,7 +50,6 @@ func getTestEnv() *envtest.Environment { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(apiextensionsv1.AddToScheme(scheme)) utilruntime.Must(infrav1.AddToScheme(scheme)) - utilruntime.Must(infrav1alpha3.AddToScheme(scheme)) _, filename, _, ok := goruntime.Caller(0) Expect(ok).To(BeTrue(), "Failed to get information for current file from runtime") diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index cf5ea1f695..85ab5bd456 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -34,8 +34,6 @@ import ( ipamv1 "sigs.k8s.io/cluster-api/exp/ipam/api/v1alpha1" ctrl "sigs.k8s.io/controller-runtime" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4" infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" vmwarev1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/vmware/v1beta1" capvcontext "sigs.k8s.io/cluster-api-provider-vsphere/pkg/context" @@ -57,8 +55,6 @@ func New(ctx context.Context, opts Options) (Manager, error) { _ = clientgoscheme.AddToScheme(opts.Scheme) _ = clusterv1.AddToScheme(opts.Scheme) - _ = infrav1alpha3.AddToScheme(opts.Scheme) - _ = infrav1alpha4.AddToScheme(opts.Scheme) _ = infrav1.AddToScheme(opts.Scheme) _ = controlplanev1.AddToScheme(opts.Scheme) _ = bootstrapv1.AddToScheme(opts.Scheme) diff --git a/test/e2e/data/shared/main/v1beta1/metadata.yaml b/test/e2e/data/shared/main/v1beta1/metadata.yaml index b7332a13a4..39e7dab881 100644 --- a/test/e2e/data/shared/main/v1beta1/metadata.yaml +++ b/test/e2e/data/shared/main/v1beta1/metadata.yaml @@ -23,13 +23,4 @@ releaseSeries: contract: v1beta1 - major: 1 minor: 0 - contract: v1beta1 - - major: 0 - minor: 4 - contract: v1alpha4 - - major: 0 - minor: 3 - contract: v1alpha3 - - major: 0 - minor: 2 - contract: v1alpha2 + contract: v1beta1 \ No newline at end of file diff --git a/test/e2e/data/shared/main/v1beta1_provider/metadata.yaml b/test/e2e/data/shared/main/v1beta1_provider/metadata.yaml index 5b352b0917..e0b9aeaf60 100644 --- a/test/e2e/data/shared/main/v1beta1_provider/metadata.yaml +++ b/test/e2e/data/shared/main/v1beta1_provider/metadata.yaml @@ -6,15 +6,6 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: - - major: 0 - minor: 5 - contract: v1alpha2 - - major: 0 - minor: 7 - contract: v1alpha3 - - major: 0 - minor: 8 - contract: v1alpha4 - major: 1 minor: 7 contract: v1beta1 diff --git a/test/helpers/envtest.go b/test/helpers/envtest.go index 8704212699..482a8a5cb0 100644 --- a/test/helpers/envtest.go +++ b/test/helpers/envtest.go @@ -45,8 +45,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" ctrlmgr "sigs.k8s.io/controller-runtime/pkg/manager" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha3" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1alpha4" infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" "sigs.k8s.io/cluster-api-provider-vsphere/internal/webhooks" capvcontext "sigs.k8s.io/cluster-api-provider-vsphere/pkg/context" @@ -71,8 +69,6 @@ func init() { utilruntime.Must(apiextensionsv1.AddToScheme(scheme)) utilruntime.Must(admissionv1.AddToScheme(scheme)) utilruntime.Must(clusterv1.AddToScheme(scheme)) - utilruntime.Must(infrav1alpha3.AddToScheme(scheme)) - utilruntime.Must(infrav1alpha4.AddToScheme(scheme)) utilruntime.Must(infrav1.AddToScheme(scheme)) // Get the root of the current file to use in CRD paths. diff --git a/test/integration/data/shared/metadata.yaml b/test/integration/data/shared/metadata.yaml index 3f731cc65b..048eacedf7 100644 --- a/test/integration/data/shared/metadata.yaml +++ b/test/integration/data/shared/metadata.yaml @@ -11,13 +11,4 @@ releaseSeries: contract: v1beta1 - major: 1 minor: 0 - contract: v1beta1 - - major: 0 - minor: 4 - contract: v1alpha4 - - major: 0 - minor: 3 - contract: v1alpha3 - - major: 0 - minor: 2 - contract: v1alpha2 + contract: v1beta1 \ No newline at end of file