diff --git a/.golangci.yml b/.golangci.yml index 9ca07cf78e4..edcbdf3aa16 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,11 +2,6 @@ run: deadline: 10m skip-files: - 'zz_generated\.(\w*)\.go$' - skip-dirs: - - 'api/v1alpha3' - - 'api/v1alpha4' - - 'exp/api/v1alpha3' - - 'exp/api/v1alpha4' build-tags: - e2e linters: @@ -79,31 +74,15 @@ linters-settings: - pkg: sigs.k8s.io/controller-runtime alias: ctrl # CAPI - - pkg: sigs.k8s.io/cluster-api/api/v1alpha3 - alias: clusterv1alpha3 - - pkg: sigs.k8s.io/cluster-api/api/v1alpha4 - alias: clusterv1alpha4 - pkg: sigs.k8s.io/cluster-api/api/v1beta1 alias: clusterv1 # CAPI exp - - pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha3 - alias: expv1alpha3 - - pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha4 - alias: expv1alpha4 - pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1 alias: expv1 # CAPZ - - pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3 - alias: infrav1alpha3 - - pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4 - alias: infrav1alpha4 - pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1beta1 alias: infrav1 # CAPZ exp - - pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha3 - alias: infrav1alpha3exp - - pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha4 - alias: infrav1alpha4exp - pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1 alias: infrav1exp - pkg: sigs.k8s.io/cluster-api-provider-azure/util/webhook @@ -147,8 +126,6 @@ issues: text: "use underscores in Go names|receiver name (.+) should be consistent|methods on the same type should have the same receiver name" - path: 'mock(\w+)/doc.go$' text: "use underscores in package names|don't use an underscore in package name" - - path: api/v1alpha3/azureclusteridentity_types.go - text: "methods on the same type should have the same receiver name" - path: ^test/ linters: - dogsled diff --git a/Makefile b/Makefile index 13fed0d4738..7b20217a34c 100644 --- a/Makefile +++ b/Makefile @@ -439,26 +439,6 @@ generate-go: $(CONTROLLER_GEN) $(MOCKGEN) $(CONVERSION_GEN) ## Runs Go related g paths=./api/... \ paths=./$(EXP_DIR)/api/... \ object:headerFile=./hack/boilerplate/boilerplate.generatego.txt - $(CONVERSION_GEN) \ - --input-dirs=./api/v1alpha3 \ - --build-tag=ignore_autogenerated_core_v1alpha3 \ - --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha3 \ - --output-file-base=zz_generated.conversion \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $(OUTPUT_BASE) - $(CONVERSION_GEN) \ - --input-dirs=./api/v1alpha4 \ - --build-tag=ignore_autogenerated_core_v1alpha4 \ - --extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \ - --output-file-base=zz_generated.conversion \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $(OUTPUT_BASE) - $(CONVERSION_GEN) \ - --input-dirs=./$(EXP_DIR)/api/v1alpha3 \ - --output-file-base=zz_generated.conversion \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $(OUTPUT_BASE) - $(CONVERSION_GEN) \ - --input-dirs=./$(EXP_DIR)/api/v1alpha4 \ - --output-file-base=zz_generated.conversion \ - --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $(OUTPUT_BASE) go generate ./... .PHONY: generate-manifests @@ -482,7 +462,7 @@ generate-flavors: $(KUSTOMIZE) generate-addons ./hack/gen-flavors.sh .PHONY: generate-e2e-templates -generate-e2e-templates: $(KUSTOMIZE) ## Generate Azure infrastructure templates for the v1alpha4 CAPI test suite. +generate-e2e-templates: $(KUSTOMIZE) ## Generate Azure infrastructure templates for the v1beta1 CAPI test suite. $(KUSTOMIZE) build $(AZURE_TEMPLATES)/v1beta1/cluster-template --load-restrictor LoadRestrictionsNone > $(AZURE_TEMPLATES)/v1beta1/cluster-template.yaml $(KUSTOMIZE) build $(AZURE_TEMPLATES)/v1beta1/cluster-template-md-remediation --load-restrictor LoadRestrictionsNone > $(AZURE_TEMPLATES)/v1beta1/cluster-template-md-remediation.yaml $(KUSTOMIZE) build $(AZURE_TEMPLATES)/v1beta1/cluster-template-kcp-remediation --load-restrictor LoadRestrictionsNone > $(AZURE_TEMPLATES)/v1beta1/cluster-template-kcp-remediation.yaml diff --git a/PROJECT b/PROJECT index ec61982168c..24d9517c670 100644 --- a/PROJECT +++ b/PROJECT @@ -2,23 +2,6 @@ version: "3" domain: x-k8s.io repo: sigs.k8s.io/cluster-api-provider-azure resources: -- group: infrastructure - version: v1alpha3 - kind: AzureMachine -- group: infrastructure - version: v1alpha3 - kind: AzureCluster -- group: infrastructure - version: v1alpha3 - kind: AzureMachineTemplate -- group: infrastructure - version: v1alpha4 - kind: AzureMachine -- group: infrastructure - version: v1alpha4 - kind: AzureCluster -- group: infrastructure - version: v1alpha4 kind: AzureMachineTemplate - group: infrastructure version: v1beta1 diff --git a/README.md b/README.md index 6e0cea30951..40a54cba604 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,7 @@ If you need help with CAPZ, please visit the [#cluster-api-azure][slack] channel ### Cluster API Versions -This provider's versions are compatible with the following versions of Cluster API: - -| | Cluster API `v1alpha3` (`v0.3.x`) | Cluster API `v1alpha4` (`v0.4.x`) | Cluster API `v1beta1` (`v1.0.x`) | -|---|---|---|---| -|Azure Provider `v0.4.x` | ✓ | | | -|Azure Provider `v0.5.x` | | ✓ | | -|Azure Provider `v1.0.x` | | | ✓ | +Currently, CAPZ is compatible only with the `v1beta1` version of CAPI (v1.0.x). Support for `v1alpha3` (v0.3.x) and `v1alpha4` (v0.4.x) is deprecated and has been removed. ### Kubernetes Versions diff --git a/api/v1alpha3/azurecluster_conversion.go b/api/v1alpha3/azurecluster_conversion.go deleted file mode 100644 index 8142382027f..00000000000 --- a/api/v1alpha3/azurecluster_conversion.go +++ /dev/null @@ -1,436 +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 ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - "k8s.io/utils/pointer" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -const ( - azureEnvironmentAnnotation = "azurecluster.infrastructure.cluster.x-k8s.io/azureEnvironment" -) - -// ConvertTo converts this AzureCluster to the Hub version (v1beta1). -func (src *AzureCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureCluster) - if err := Convert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster(src, dst, nil); err != nil { - return err - } - - if azureEnvironment, ok := src.Annotations[azureEnvironmentAnnotation]; ok { - dst.Spec.AzureEnvironment = azureEnvironment - delete(dst.Annotations, azureEnvironmentAnnotation) - if len(dst.Annotations) == 0 { - dst.Annotations = nil - } - } - - // set default control plane outbound lb for private v1alpha3 clusters. - if src.Spec.NetworkSpec.APIServerLB.Type == Internal { - dst.Spec.NetworkSpec.ControlPlaneOutboundLB = &infrav1.LoadBalancerSpec{ - FrontendIPsCount: pointer.Int32(1), - } - // We also need to set the defaults here because "get" won't set defaults, and hence there is no mismatch when a client - // gets a v1alpha3 cluster. - dst.SetControlPlaneOutboundLBDefaults() - } - - // set default node plane outbound lb for all v1alpha3 clusters. - dst.Spec.NetworkSpec.NodeOutboundLB = &infrav1.LoadBalancerSpec{ - FrontendIPsCount: pointer.Int32(1), - } - // We also need to set the defaults here because "get" won't set defaults, and hence there is no mismatch when a client - // gets a v1alpha3 cluster. - dst.SetNodeOutboundLBDefaults() - - // Manually restore data. - restored := &infrav1.AzureCluster{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - // override outbound lb if it's present in restored. - dst.Spec.NetworkSpec.ControlPlaneOutboundLB = restored.Spec.NetworkSpec.ControlPlaneOutboundLB - dst.Spec.NetworkSpec.NodeOutboundLB = restored.Spec.NetworkSpec.NodeOutboundLB - - dst.Spec.NetworkSpec.PrivateDNSZoneName = restored.Spec.NetworkSpec.PrivateDNSZoneName - - dst.Spec.NetworkSpec.APIServerLB.FrontendIPsCount = restored.Spec.NetworkSpec.APIServerLB.FrontendIPsCount - dst.Spec.NetworkSpec.APIServerLB.IdleTimeoutInMinutes = restored.Spec.NetworkSpec.APIServerLB.IdleTimeoutInMinutes - - for _, restoredFrontendIP := range restored.Spec.NetworkSpec.APIServerLB.FrontendIPs { - for i, dstFrontendIP := range dst.Spec.NetworkSpec.APIServerLB.FrontendIPs { - if restoredFrontendIP.Name == dstFrontendIP.Name && restoredFrontendIP.PublicIP != nil { - dst.Spec.NetworkSpec.APIServerLB.FrontendIPs[i].PublicIP.IPTags = restoredFrontendIP.PublicIP.IPTags - } - } - } - - dst.Spec.CloudProviderConfigOverrides = restored.Spec.CloudProviderConfigOverrides - dst.Spec.BastionSpec = restored.Spec.BastionSpec - - // Here we manually restore outbound security rules. Since v1alpha3 only supports ingress ("Inbound") rules, all v1alpha4/v1beta1 outbound rules are dropped when an AzureCluster - // is converted to v1alpha3. We loop through all security group rules. For all previously existing outbound rules we restore the full rule. - // Also restores ServiceEndpoints - for _, restoredSubnet := range restored.Spec.NetworkSpec.Subnets { - for i, dstSubnet := range dst.Spec.NetworkSpec.Subnets { - if dstSubnet.Name != restoredSubnet.Name { - continue - } - var restoredOutboundRules []infrav1.SecurityRule - for _, restoredSecurityRule := range restoredSubnet.SecurityGroup.SecurityRules { - if restoredSecurityRule.Direction != infrav1.SecurityRuleDirectionInbound { - // For non-inbound rules which are only supported starting in v1alpha4/v1beta1, we restore the entire rule. - restoredOutboundRules = append(restoredOutboundRules, restoredSecurityRule) - } - } - dst.Spec.NetworkSpec.Subnets[i].SecurityGroup.SecurityRules = append(dst.Spec.NetworkSpec.Subnets[i].SecurityGroup.SecurityRules, restoredOutboundRules...) - dst.Spec.NetworkSpec.Subnets[i].NatGateway = restoredSubnet.NatGateway - dst.Spec.NetworkSpec.Subnets[i].ServiceEndpoints = restoredSubnet.ServiceEndpoints - dst.Spec.NetworkSpec.Subnets[i].PrivateEndpoints = restoredSubnet.PrivateEndpoints - - break - } - } - - dst.Status.LongRunningOperationStates = restored.Status.LongRunningOperationStates - - // Restore list of virtual network peerings - dst.Spec.NetworkSpec.Vnet.Peerings = restored.Spec.NetworkSpec.Vnet.Peerings - - // Restore ExtendedLocation properties - dst.Spec.ExtendedLocation = restored.Spec.ExtendedLocation - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureCluster) - if err := Convert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster(src, dst, nil); err != nil { - return err - } - - // Preserve Spec.AzureEnvironment in annotation `azurecluster.infrastructure.cluster.x-k8s.io/azureEnvironment` - if src.Spec.AzureEnvironment != "" { - if dst.Annotations == nil { - dst.Annotations = make(map[string]string) - } - dst.Annotations[azureEnvironmentAnnotation] = src.Spec.AzureEnvironment - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureClusterList to the Hub version (v1beta1). -func (src *AzureClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureClusterList) - return Convert_v1alpha3_AzureClusterList_To_v1beta1_AzureClusterList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureClusterList) - return Convert_v1beta1_AzureClusterList_To_v1alpha3_AzureClusterList(src, dst, nil) -} - -// Convert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus converts AzureCluster.Status from v1alpha3 to v1beta1. -func Convert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus(in *AzureClusterStatus, out *infrav1.AzureClusterStatus, s apiconversion.Scope) error { - return autoConvert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus(in, out, s) -} - -// Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec converts AzureCluster.Spec from v1alpha3 to v1beta1. -func Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec(in *AzureClusterSpec, out *infrav1.AzureClusterSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec(in, out, s); err != nil { - return err - } - - // copy AzureClusterClassSpec fields - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - out.AdditionalTags = *(*infrav1.Tags)(&in.AdditionalTags) - out.IdentityRef = in.IdentityRef - - return nil -} - -// Convert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec converts from the Hub version (v1beta1) of the AzureClusterSpec to this version. -func Convert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec(in *infrav1.AzureClusterSpec, out *AzureClusterSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec(in, out, s); err != nil { - return err - } - - // copy AzureClusterClassSpec fields - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - out.AdditionalTags = Tags(in.AdditionalTags) - out.IdentityRef = in.IdentityRef - - return nil -} - -// Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus converts an Azure cluster status from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus(in *infrav1.AzureClusterStatus, out *AzureClusterStatus, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus(in, out, s) -} - -// Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec converts a network spec from v1alpha3 to v1beta1. -func Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *infrav1.NetworkSpec, s apiconversion.Scope) error { - if err := Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - - out.Subnets = make(infrav1.Subnets, len(in.Subnets)) - for i := range in.Subnets { - out.Subnets[i] = infrav1.SubnetSpec{} - if err := Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(&in.Subnets[i], &out.Subnets[i], s); err != nil { - return err - } - } - - return Convert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(&in.APIServerLB, &out.APIServerLB, s) -} - -// Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec converts a network spec from v1beta1 to v1alpha3. -func Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *infrav1.NetworkSpec, out *NetworkSpec, s apiconversion.Scope) error { - if err := Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - - out.Subnets = make(Subnets, len(in.Subnets)) - for i := range in.Subnets { - out.Subnets[i] = SubnetSpec{} - if err := Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(&in.Subnets[i], &out.Subnets[i], s); err != nil { - return err - } - } - - return Convert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec(&in.APIServerLB, &out.APIServerLB, s) -} - -// Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec converts a virtual network spec from v1beta1 to v1alpha3. -func Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(in *infrav1.VnetSpec, out *VnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(in, out, s); err != nil { - return err - } - - // copy VnetClassSpec fields - out.CIDRBlocks = in.CIDRBlocks - out.Tags = Tags(in.Tags) - - return nil -} - -// Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec converts a subnet spec from v1alpha3 to v1beta1. -func Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *infrav1.SubnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(in, out, s); err != nil { - return err - } - - // Convert SubnetClassSpec fields - out.Name = in.Name - out.Role = infrav1.SubnetRole(in.Role) - out.CIDRBlocks = in.CIDRBlocks - - return nil -} - -// Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec converts a subnet spec from v1beta1 to v1alpha3. -func Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(in *infrav1.SubnetSpec, out *SubnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(in, out, s); err != nil { - return err - } - - // Convert SubnetClassSpec fields - out.Name = in.Name - out.Role = SubnetRole(in.Role) - out.CIDRBlocks = in.CIDRBlocks - - return nil -} - -// Convert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup converts a security group from v1beta1 to v1alpha3. -func Convert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup(in *infrav1.SecurityGroup, out *SecurityGroup, s apiconversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - - out.IngressRules = make(IngressRules, 0) - for _, rule := range in.SecurityRules { - rule := rule - if rule.Direction == infrav1.SecurityRuleDirectionInbound { // only inbound rules are supported in v1alpha3. - ingressRule := IngressRule{} - if err := Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule(&rule, &ingressRule, s); err != nil { - return err - } - out.IngressRules = append(out.IngressRules, ingressRule) - } - } - - out.Tags = *(*Tags)(&in.Tags) - return nil -} - -// Convert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup converts a security group from v1alpha3 to v1beta1. -func Convert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup(in *SecurityGroup, out *infrav1.SecurityGroup, s apiconversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - - out.SecurityRules = make(infrav1.SecurityRules, len(in.IngressRules)) - for i := range in.IngressRules { - out.SecurityRules[i] = infrav1.SecurityRule{} - if err := Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule(&in.IngressRules[i], &out.SecurityRules[i], s); err != nil { - return err - } - } - - out.Tags = *(*infrav1.Tags)(&in.Tags) - return nil -} - -// Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule converts from a v1alpha3 IngressRule to a v1beta1 SecurityRule. -func Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule(in *IngressRule, out *infrav1.SecurityRule, _ apiconversion.Scope) error { - out.Name = in.Name - out.Description = in.Description - out.Protocol = infrav1.SecurityGroupProtocol(in.Protocol) - out.Priority = in.Priority - out.SourcePorts = in.SourcePorts - out.DestinationPorts = in.DestinationPorts - out.Source = in.Source - out.Destination = in.Destination - out.Direction = infrav1.SecurityRuleDirectionInbound // all v1alpha3 rules are inbound. - return nil -} - -// Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule converts from a v1beta1 SecurityRule to a v1alpha3 IngressRule. -func Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule(in *infrav1.SecurityRule, out *IngressRule, _ apiconversion.Scope) error { - out.Name = in.Name - out.Description = in.Description - out.Protocol = SecurityGroupProtocol(in.Protocol) - out.Priority = in.Priority - out.SourcePorts = in.SourcePorts - out.DestinationPorts = in.DestinationPorts - out.Source = in.Source - out.Destination = in.Destination - return nil -} - -// Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec is an autogenerated conversion function. -func Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *infrav1.VnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(in, out, s); err != nil { - return err - } - - // copy VnetClassSpec fields - out.CIDRBlocks = in.CIDRBlocks - out.Tags = *(*infrav1.Tags)(&in.Tags) - - return nil -} - -// Convert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec is an autogenerated conversion function. -func Convert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec(in *infrav1.LoadBalancerSpec, out *LoadBalancerSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec(in, out, s); err != nil { - return err - } - - // Convert LoadBalancerClassSpec fields - out.SKU = SKU(in.SKU) - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - out.Type = LBType(in.Type) - - return nil -} - -// Convert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec converts an LB spec from v1alpha3 to v1beta1. -func Convert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(in *LoadBalancerSpec, out *infrav1.LoadBalancerSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(in, out, s); err != nil { - return err - } - - // Convert LoadBalancerClassSpec fields - out.SKU = infrav1.SKU(in.SKU) - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]infrav1.FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - out.Type = infrav1.LBType(in.Type) - - return nil -} - -// Convert_v1alpha3_Future_To_v1beta1_Future is an autogenerated conversion function. -func Convert_v1alpha3_Future_To_v1beta1_Future(in *Future, out *infrav1.Future, s apiconversion.Scope) error { - out.Data = in.FutureData - return autoConvert_v1alpha3_Future_To_v1beta1_Future(in, out, s) -} - -// Convert_v1beta1_Future_To_v1alpha3_Future is an autogenerated conversion function. -func Convert_v1beta1_Future_To_v1alpha3_Future(in *infrav1.Future, out *Future, s apiconversion.Scope) error { - out.FutureData = in.Data - return autoConvert_v1beta1_Future_To_v1alpha3_Future(in, out, s) -} - -// Convert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP is an autogenerated conversion function. -func Convert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP(in *FrontendIP, out *infrav1.FrontendIP, s apiconversion.Scope) error { - if err := autoConvert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP(in, out, s); err != nil { - return err - } - - // Convert FrontendIPClass fields - out.PrivateIPAddress = in.PrivateIPAddress - - return nil -} - -// Convert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP is an autogenerated conversion function. -func Convert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP(in *infrav1.FrontendIP, out *FrontendIP, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP(in, out, s); err != nil { - return err - } - - // Convert FrontendIPClass fields - out.PrivateIPAddress = in.PrivateIPAddress - - return nil -} - -// Convert_v1beta1_PublicIPSpec_To_v1alpha3_PublicIPSpec is an autogenerated conversion function. -func Convert_v1beta1_PublicIPSpec_To_v1alpha3_PublicIPSpec(in *infrav1.PublicIPSpec, out *PublicIPSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_PublicIPSpec_To_v1alpha3_PublicIPSpec(in, out, s) -} diff --git a/api/v1alpha3/azurecluster_types.go b/api/v1alpha3/azurecluster_types.go deleted file mode 100644 index 5694938a7d8..00000000000 --- a/api/v1alpha3/azurecluster_types.go +++ /dev/null @@ -1,120 +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 ( - 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 ReconcileAzureCluster to clean up Azure resources associated with AzureCluster before - // removing it from the apiserver. - ClusterFinalizer = "azurecluster.infrastructure.cluster.x-k8s.io" - - // ClusterLabelNamespace indicates the namespace of the cluster. - ClusterLabelNamespace = "azurecluster.infrastructure.cluster.x-k8s.io/cluster-namespace" -) - -// AzureClusterSpec defines the desired state of AzureCluster. -type AzureClusterSpec struct { - // NetworkSpec encapsulates all things related to Azure network. - NetworkSpec NetworkSpec `json:"networkSpec,omitempty"` - - // +optional - ResourceGroup string `json:"resourceGroup,omitempty"` - - // +optional - SubscriptionID string `json:"subscriptionID,omitempty"` - - Location string `json:"location"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1alpha3.APIEndpoint `json:"controlPlaneEndpoint"` - - // AdditionalTags is an optional set of tags to add to Azure resources managed by the Azure provider, in addition to the - // ones added by default. - // +optional - AdditionalTags Tags `json:"additionalTags,omitempty"` - - // IdentityRef is a reference to a AzureIdentity to be used when reconciling this cluster - // +optional - IdentityRef *corev1.ObjectReference `json:"identityRef,omitempty"` -} - -// AzureClusterStatus defines the observed state of AzureCluster. -type AzureClusterStatus struct { - // FailureDomains specifies the list of unique failure domains for the location/region of the cluster. - // A FailureDomain maps to Availability Zone with an Azure Region (if the region support them). An - // Availability Zone is a separate data center within a region and they can be used to ensure - // the cluster is more resilient to failure. - // See: https://learn.microsoft.com/azure/reliability/availability-zones-overview - // This list will be used by Cluster API to try and spread the machines across the failure domains. - FailureDomains clusterv1alpha3.FailureDomains `json:"failureDomains,omitempty"` - - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Conditions defines current service state of the AzureCluster. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureCluster belongs" -// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready" -// +kubebuilder:printcolumn:name="Resource Group",type="string",priority=1,JSONPath=".spec.resourceGroup" -// +kubebuilder:printcolumn:name="SubscriptionID",type="string",priority=1,JSONPath=".spec.subscriptionID" -// +kubebuilder:printcolumn:name="Location",type="string",priority=1,JSONPath=".spec.location" -// +kubebuilder:printcolumn:name="Endpoint",type="string",priority=1,JSONPath=".spec.controlPlaneEndpoint.host",description="Control Plane Endpoint" -// +kubebuilder:resource:path=azureclusters,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureCluster is the Schema for the azureclusters API. -type AzureCluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureClusterSpec `json:"spec,omitempty"` - Status AzureClusterStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureClusterList contains a list of AzureClusters. -type AzureClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureCluster `json:"items"` -} - -// GetConditions returns the list of conditions for an AzureCluster API object. -func (c *AzureCluster) GetConditions() clusterv1alpha3.Conditions { - return c.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureCluster object. -func (c *AzureCluster) SetConditions(conditions clusterv1alpha3.Conditions) { - c.Status.Conditions = conditions -} - -func init() { - SchemeBuilder.Register(&AzureCluster{}, &AzureClusterList{}) -} diff --git a/api/v1alpha3/azureclusteridentity_conversion.go b/api/v1alpha3/azureclusteridentity_conversion.go deleted file mode 100644 index 61cd304688c..00000000000 --- a/api/v1alpha3/azureclusteridentity_conversion.go +++ /dev/null @@ -1,112 +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" - apiconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -const ( - // AzureClusterKind is the Kubernetes Kind for AzureCluster. - AzureClusterKind = "AzureCluster" -) - -// ConvertTo converts this AzureCluster to the Hub version (v1beta1). -func (src *AzureClusterIdentity) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureClusterIdentity) - if err := Convert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureClusterIdentity{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - if len(dst.Annotations) == 0 { - dst.Annotations = nil - } - - if len(src.Spec.AllowedNamespaces) > 0 { - dst.Spec.AllowedNamespaces = &infrav1.AllowedNamespaces{} - dst.Spec.AllowedNamespaces.NamespaceList = append(dst.Spec.AllowedNamespaces.NamespaceList, src.Spec.AllowedNamespaces...) - } - - if restored.Spec.AllowedNamespaces != nil && restored.Spec.AllowedNamespaces.Selector != nil { - if dst.Spec.AllowedNamespaces == nil { - dst.Spec.AllowedNamespaces = &infrav1.AllowedNamespaces{} - } - dst.Spec.AllowedNamespaces.Selector = restored.Spec.AllowedNamespaces.Selector - } - - // removing ownerReference for AzureCluster as ownerReference is not required from v1alpha4/v1beta1 onwards. - var restoredOwnerReferences []metav1.OwnerReference - for _, ownerRef := range dst.OwnerReferences { - if ownerRef.Kind != AzureClusterKind { - restoredOwnerReferences = append(restoredOwnerReferences, ownerRef) - } - } - dst.OwnerReferences = restoredOwnerReferences - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureClusterIdentity) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureClusterIdentity) - if err := Convert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - if src.Spec.AllowedNamespaces != nil { - dst.Spec.AllowedNamespaces = append(dst.Spec.AllowedNamespaces, src.Spec.AllowedNamespaces.NamespaceList...) - } - - return nil -} - -// Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec converts an Azure cluster identity spec from v1alpha3 to v1beta1. -func Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(in *AzureClusterIdentitySpec, out *infrav1.AzureClusterIdentitySpec, s apiconversion.Scope) error { - return autoConvert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(in, out, s) -} - -// Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec converts an Azure cluster identity spec from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec(in *infrav1.AzureClusterIdentitySpec, out *AzureClusterIdentitySpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec(in, out, s) -} - -// ConvertTo converts this AzureClusterIdentityList to the Hub version (v1beta1). -func (src *AzureClusterIdentityList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureClusterIdentityList) - return Convert_v1alpha3_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureClusterIdentityList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureClusterIdentityList) - return Convert_v1beta1_AzureClusterIdentityList_To_v1alpha3_AzureClusterIdentityList(src, dst, nil) -} diff --git a/api/v1alpha3/azureclusteridentity_types.go b/api/v1alpha3/azureclusteridentity_types.go deleted file mode 100644 index fbeba3b65a0..00000000000 --- a/api/v1alpha3/azureclusteridentity_types.go +++ /dev/null @@ -1,104 +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 ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -// AzureClusterIdentitySpec defines the parameters that are used to create an AzureIdentity. -type AzureClusterIdentitySpec struct { - // UserAssignedMSI or Service Principal - Type IdentityType `json:"type"` - // User assigned MSI resource id. - // +optional - ResourceID string `json:"resourceID,omitempty"` - // Both User Assigned MSI and SP can use this field. - ClientID string `json:"clientID"` - // ClientSecret is a secret reference which should contain either a Service Principal password or certificate secret. - // +optional - ClientSecret corev1.SecretReference `json:"clientSecret,omitempty"` - // Service principal primary tenant id. - TenantID string `json:"tenantID"` - // AllowedNamespaces is an array of namespaces that AzureClusters can - // use this Identity from. - // - // An empty list (default) indicates that AzureClusters can use this - // Identity from any namespace. This field is intentionally not a - // pointer because the nil behavior (no namespaces) is undesirable here. - // +optional - AllowedNamespaces []string `json:"allowedNamespaces"` -} - -// AzureClusterIdentityStatus defines the observed state of AzureClusterIdentity. -type AzureClusterIdentityStatus struct { - // Conditions defines current service state of the AzureClusterIdentity. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azureclusteridentities,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureClusterIdentity is the Schema for the azureclustersidentities API. -type AzureClusterIdentity struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureClusterIdentitySpec `json:"spec,omitempty"` - Status AzureClusterIdentityStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureClusterIdentityList contains a list of AzureClusterIdentities. -type AzureClusterIdentityList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureClusterIdentity `json:"items"` -} - -// GetConditions returns the list of conditions for an AzureClusterIdentity API object. -func (c *AzureClusterIdentity) GetConditions() clusterv1alpha3.Conditions { - return c.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureClusterIdentity object. -func (c *AzureClusterIdentity) SetConditions(conditions clusterv1alpha3.Conditions) { - c.Status.Conditions = conditions -} - -// ClusterNamespaceAllowed indicates if the cluster namespace is allowed. -func (c *AzureClusterIdentity) ClusterNamespaceAllowed(namespace string) bool { - if len(c.Spec.AllowedNamespaces) == 0 { - return true - } - for _, v := range c.Spec.AllowedNamespaces { - if v == namespace { - return true - } - } - - return false -} - -func init() { - SchemeBuilder.Register(&AzureClusterIdentity{}, &AzureClusterIdentityList{}) -} diff --git a/api/v1alpha3/azuremachine_conversion.go b/api/v1alpha3/azuremachine_conversion.go deleted file mode 100644 index 8920037cb71..00000000000 --- a/api/v1alpha3/azuremachine_conversion.go +++ /dev/null @@ -1,208 +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 ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachine to the Hub version (v1beta1). -func (src *AzureMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachine) - if err := Convert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine(src, dst, nil); err != nil { - return err - } - - // Manually restore data from annotations - restored := &infrav1.AzureMachine{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - // Handle special case for conversion of ManagedDisk to pointer. - if restored.Spec.OSDisk.ManagedDisk == nil && dst.Spec.OSDisk.ManagedDisk != nil { - if *dst.Spec.OSDisk.ManagedDisk == (infrav1.ManagedDiskParameters{}) { - // restore nil value if nothing has changed since conversion - dst.Spec.OSDisk.ManagedDisk = nil - } - } - - if restored.Spec.Image != nil && restored.Spec.Image.SharedGallery != nil { - dst.Spec.Image.SharedGallery.Offer = restored.Spec.Image.SharedGallery.Offer - dst.Spec.Image.SharedGallery.Publisher = restored.Spec.Image.SharedGallery.Publisher - dst.Spec.Image.SharedGallery.SKU = restored.Spec.Image.SharedGallery.SKU - } - - if dst.Spec.Image != nil && restored.Spec.Image.ComputeGallery != nil { - dst.Spec.Image.ComputeGallery = restored.Spec.Image.ComputeGallery - } - - if restored.Spec.AdditionalCapabilities != nil { - dst.Spec.AdditionalCapabilities = restored.Spec.AdditionalCapabilities - } - - if len(restored.Spec.DNSServers) > 0 { - dst.Spec.DNSServers = restored.Spec.DNSServers - } - - if len(restored.Spec.VMExtensions) > 0 { - dst.Spec.VMExtensions = restored.Spec.VMExtensions - } - - if restored.Spec.SpotVMOptions != nil && restored.Spec.SpotVMOptions.EvictionPolicy != nil { - dst.Spec.SpotVMOptions.EvictionPolicy = restored.Spec.SpotVMOptions.EvictionPolicy - } - - if restored.Spec.Diagnostics != nil { - dst.Spec.Diagnostics = restored.Spec.Diagnostics - } - - if restored.Spec.NetworkInterfaces != nil { - dst.Spec.NetworkInterfaces = restored.Spec.NetworkInterfaces - } - - if restored.Spec.SystemAssignedIdentityRole != nil { - dst.Spec.SystemAssignedIdentityRole = restored.Spec.SystemAssignedIdentityRole - } - - //nolint:staticcheck // SubnetName is now deprecated, but the v1beta1 defaulting webhook will migrate it to the networkInterfaces field - dst.Spec.SubnetName = restored.Spec.SubnetName - - dst.Status.LongRunningOperationStates = restored.Status.LongRunningOperationStates - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachine) - if err := Convert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureMachineList to the Hub version (v1beta1). -func (src *AzureMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachineList) - return Convert_v1alpha3_AzureMachineList_To_v1beta1_AzureMachineList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachineList) - return Convert_v1beta1_AzureMachineList_To_v1alpha3_AzureMachineList(src, dst, nil) -} - -// Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec converts this AzureMachineSpec to the Hub version (v1beta1). -func Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec(in *AzureMachineSpec, out *infrav1.AzureMachineSpec, s apiconversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec(in, out, s) -} - -// Convert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec converts from the Hub version (v1beta1) of the AzureMachineSpec to this version. -func Convert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec(in *infrav1.AzureMachineSpec, out *AzureMachineSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec(in, out, s) -} - -// Convert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus converts this AzureMachineStatus to the Hub version (v1beta1). -func Convert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus(in *AzureMachineStatus, out *infrav1.AzureMachineStatus, s apiconversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus(in, out, s) -} - -// Convert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus converts from the Hub version (v1beta1) of the AzureMachineStatus to this version. -func Convert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus(in *infrav1.AzureMachineStatus, out *AzureMachineStatus, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus(in, out, s) -} - -// Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk converts this OSDisk to the Hub version (v1beta1). -func Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(in *OSDisk, out *infrav1.OSDisk, s apiconversion.Scope) error { - out.OSType = in.OSType - if in.DiskSizeGB != 0 { - out.DiskSizeGB = &in.DiskSizeGB - } - out.DiffDiskSettings = (*infrav1.DiffDiskSettings)(in.DiffDiskSettings) - out.CachingType = in.CachingType - out.ManagedDisk = &infrav1.ManagedDiskParameters{} - - return Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDiskParameters(&in.ManagedDisk, out.ManagedDisk, s) -} - -// Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk converts from the Hub version (v1beta1) of the AzureMachineStatus to this version. -func Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(in *infrav1.OSDisk, out *OSDisk, s apiconversion.Scope) error { - out.OSType = in.OSType - if in.DiskSizeGB != nil { - out.DiskSizeGB = *in.DiskSizeGB - } - out.DiffDiskSettings = (*DiffDiskSettings)(in.DiffDiskSettings) - out.CachingType = in.CachingType - - if in.ManagedDisk != nil { - out.ManagedDisk = ManagedDisk{} - if err := Convert_v1beta1_ManagedDiskParameters_To_v1alpha3_ManagedDisk(in.ManagedDisk, &out.ManagedDisk, s); err != nil { - return err - } - } - - return nil -} - -// Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDiskParameters converts this ManagedDisk to the Hub version (v1beta1). -func Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDiskParameters(in *ManagedDisk, out *infrav1.ManagedDiskParameters, s apiconversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - out.DiskEncryptionSet = (*infrav1.DiskEncryptionSetParameters)(in.DiskEncryptionSet) - return nil -} - -// Convert_v1beta1_ManagedDiskParameters_To_v1alpha3_ManagedDisk converts from the Hub version (v1beta1) of the ManagedDiskParameters to this version. -func Convert_v1beta1_ManagedDiskParameters_To_v1alpha3_ManagedDisk(in *infrav1.ManagedDiskParameters, out *ManagedDisk, s apiconversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - out.DiskEncryptionSet = (*DiskEncryptionSetParameters)(in.DiskEncryptionSet) - return nil -} - -// Convert_v1beta1_AzureMarketplaceImage_To_v1alpha3_AzureMarketplaceImage converts an Azure Marketplace image from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureMarketplaceImage_To_v1alpha3_AzureMarketplaceImage(in *infrav1.AzureMarketplaceImage, out *AzureMarketplaceImage, s apiconversion.Scope) error { - out.Offer = in.ImagePlan.Offer - out.Publisher = in.ImagePlan.Publisher - out.SKU = in.ImagePlan.SKU - - return autoConvert_v1beta1_AzureMarketplaceImage_To_v1alpha3_AzureMarketplaceImage(in, out, s) -} - -// Convert_v1alpha3_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage converts an Azure Marketplace image from v1alpha3 to v1beta1. -func Convert_v1alpha3_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(in *AzureMarketplaceImage, out *infrav1.AzureMarketplaceImage, s apiconversion.Scope) error { - out.ImagePlan.Offer = in.Offer - out.ImagePlan.Publisher = in.Publisher - out.ImagePlan.SKU = in.SKU - - return autoConvert_v1alpha3_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(in, out, s) -} - -// Convert_v1beta1_Image_To_v1alpha3_Image converts an image from v1beta1 to v1alpha3. -func Convert_v1beta1_Image_To_v1alpha3_Image(in *infrav1.Image, out *Image, s apiconversion.Scope) error { - return autoConvert_v1beta1_Image_To_v1alpha3_Image(in, out, s) -} - -// Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions converts SpotVMOptions from v1beta1 to v1alpha3. -func Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(in *infrav1.SpotVMOptions, out *SpotVMOptions, s apiconversion.Scope) error { - return autoConvert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(in, out, s) -} diff --git a/api/v1alpha3/azuremachine_types.go b/api/v1alpha3/azuremachine_types.go deleted file mode 100644 index 0cd1a3f6302..00000000000 --- a/api/v1alpha3/azuremachine_types.go +++ /dev/null @@ -1,222 +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" - "k8s.io/apimachinery/pkg/api/resource" - 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 ReconcileAzureMachine to clean up Azure resources associated with AzureMachine before - // removing it from the apiserver. - MachineFinalizer = "azuremachine.infrastructure.cluster.x-k8s.io" -) - -// AzureMachineSpec defines the desired state of AzureMachine. -type AzureMachineSpec struct { - // ProviderID is the unique identifier as specified by the cloud provider. - // +optional - ProviderID *string `json:"providerID,omitempty"` - - VMSize string `json:"vmSize"` - - // FailureDomain is the failure domain unique identifier this Machine should be attached to, - // as defined in Cluster API. This relates to an Azure Availability Zone - FailureDomain *string `json:"failureDomain,omitempty"` - - // Deprecated: use FailureDomain instead - AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` - - // Image is used to provide details of an image to use during VM creation. - // If image details are omitted the image will default the Azure Marketplace "capi" offer, - // which is based on Ubuntu. - // +kubebuilder:validation:nullable - // +optional - Image *Image `json:"image,omitempty"` - - // Identity is the type of identity used for the virtual machine. - // The type 'SystemAssigned' is an implicitly created identity. - // The generated identity will be assigned a Subscription contributor role. - // The type 'UserAssigned' is a standalone Azure resource provided by the user - // and assigned to the VM - // +kubebuilder:default=None - // +optional - Identity VMIdentity `json:"identity,omitempty"` - - // UserAssignedIdentities is a list of standalone Azure identities provided by the user - // The lifecycle of a user-assigned identity is managed separately from the lifecycle of - // the AzureMachine. - // See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - // +optional - UserAssignedIdentities []UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - - // RoleAssignmentName is the name of the role assignment to create for a system assigned identity. It can be any valid GUID. - // If not specified, a random GUID will be generated. - // +optional - RoleAssignmentName string `json:"roleAssignmentName,omitempty"` - - // OSDisk specifies the parameters for the operating system disk of the machine - OSDisk OSDisk `json:"osDisk"` - - // DataDisk specifies the parameters that are used to add one or more data disks to the machine - DataDisks []DataDisk `json:"dataDisks,omitempty"` - - // Deprecated: to support old clients, will be removed in v1alpha4/v1beta1 - Location string `json:"location"` - - SSHPublicKey string `json:"sshPublicKey"` - - // AdditionalTags is an optional set of tags to add to an instance, in addition to the ones added by default by the - // Azure provider. If both the AzureCluster and the AzureMachine specify the same tag name with different values, the - // AzureMachine's value takes precedence. - // +optional - AdditionalTags Tags `json:"additionalTags,omitempty"` - - // AllocatePublicIP allows the ability to create dynamic public ips for machines where this value is true. - // +optional - AllocatePublicIP bool `json:"allocatePublicIP,omitempty"` - - // EnableIPForwarding enables IP Forwarding in Azure which is required for some CNI's to send traffic from a pods on one machine - // to another. This is required for IpV6 with Calico in combination with User Defined Routes (set by the Azure Cloud Controller - // manager). Default is false for disabled. - // +optional - EnableIPForwarding bool `json:"enableIPForwarding,omitempty"` - - // AcceleratedNetworking enables or disables Azure accelerated networking. If omitted, it will be set based on - // whether the requested VMSize supports accelerated networking. - // If AcceleratedNetworking is set to true with a VMSize that does not support it, Azure will return an error. - // +kubebuilder:validation:nullable - // +optional - AcceleratedNetworking *bool `json:"acceleratedNetworking,omitempty"` - - // SpotVMOptions allows the ability to specify the Machine should use a Spot VM. - // +optional - SpotVMOptions *SpotVMOptions `json:"spotVMOptions,omitempty"` - - // SecurityProfile specifies the Security profile settings for a virtual machine. - // +optional - SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` -} - -// SpotVMOptions defines the options relevant to running the Machine on Spot VMs. -type SpotVMOptions struct { - // MaxPrice defines the maximum price the user is willing to pay for Spot VM instances - // +optional - MaxPrice *resource.Quantity `json:"maxPrice,omitempty"` -} - -// AzureMachineStatus defines the observed state of AzureMachine. -type AzureMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the Azure instance associated addresses. - Addresses []corev1.NodeAddress `json:"addresses,omitempty"` - - // VMState is the provisioning state of the Azure virtual machine. - // +optional - VMState *VMState `json:"vmState,omitempty"` - - // ErrorReason 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"` - - // ErrorMessage 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 AzureMachine. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="AzureMachine ready status" -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.vmState",description="Azure VM provisioning state" -// +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureMachine belongs" -// +kubebuilder:printcolumn:name="Machine",type="string",priority=1,JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object to which this AzureMachine belongs" -// +kubebuilder:printcolumn:name="VM ID",type="string",priority=1,JSONPath=".spec.providerID",description="Azure VM ID" -// +kubebuilder:printcolumn:name="VM Size",type="string",priority=1,JSONPath=".spec.vmSize",description="Azure VM Size" -// +kubebuilder:resource:path=azuremachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureMachine is the Schema for the azuremachines API. -type AzureMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachineSpec `json:"spec,omitempty"` - Status AzureMachineStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureMachineList contains a list of AzureMachines. -type AzureMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachine `json:"items"` -} - -// GetConditions returns the list of conditions for an AzureMachine API object. -func (m *AzureMachine) GetConditions() clusterv1alpha3.Conditions { - return m.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureMachine object. -func (m *AzureMachine) SetConditions(conditions clusterv1alpha3.Conditions) { - m.Status.Conditions = conditions -} - -func init() { - SchemeBuilder.Register(&AzureMachine{}, &AzureMachineList{}) -} diff --git a/api/v1alpha3/azuremachinetemplate_conversion.go b/api/v1alpha3/azuremachinetemplate_conversion.go deleted file mode 100644 index a182eb2e2c7..00000000000 --- a/api/v1alpha3/azuremachinetemplate_conversion.go +++ /dev/null @@ -1,123 +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 ( - apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachineTemplate to the Hub version (v1beta1). -func (src *AzureMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachineTemplate) - if err := Convert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Manually restore data from annotations - restored := &infrav1.AzureMachineTemplate{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - // Handle special case for conversion of ManagedDisk to pointer. - if restored.Spec.Template.Spec.OSDisk.ManagedDisk == nil && dst.Spec.Template.Spec.OSDisk.ManagedDisk != nil { - if *dst.Spec.Template.Spec.OSDisk.ManagedDisk == (infrav1.ManagedDiskParameters{}) { - // restore nil value if nothing has changed since conversion - dst.Spec.Template.Spec.OSDisk.ManagedDisk = nil - } - } - - if restored.Spec.Template.Spec.Image != nil && restored.Spec.Template.Spec.Image.SharedGallery != nil { - dst.Spec.Template.Spec.Image.SharedGallery.Offer = restored.Spec.Template.Spec.Image.SharedGallery.Offer - dst.Spec.Template.Spec.Image.SharedGallery.Publisher = restored.Spec.Template.Spec.Image.SharedGallery.Publisher - dst.Spec.Template.Spec.Image.SharedGallery.SKU = restored.Spec.Template.Spec.Image.SharedGallery.SKU - } - - if dst.Spec.Template.Spec.Image != nil && restored.Spec.Template.Spec.Image.ComputeGallery != nil { - dst.Spec.Template.Spec.Image.ComputeGallery = restored.Spec.Template.Spec.Image.ComputeGallery - } - - if restored.Spec.Template.Spec.AdditionalCapabilities != nil { - dst.Spec.Template.Spec.AdditionalCapabilities = restored.Spec.Template.Spec.AdditionalCapabilities - } - - if restored.Spec.Template.Spec.Diagnostics != nil { - dst.Spec.Template.Spec.Diagnostics = restored.Spec.Template.Spec.Diagnostics - } - - //nolint:staticcheck // SubnetName is now deprecated, but the v1beta1 defaulting webhook will migrate it to the networkInterfaces field - dst.Spec.Template.Spec.SubnetName = restored.Spec.Template.Spec.SubnetName - dst.Spec.Template.ObjectMeta = restored.Spec.Template.ObjectMeta - - if len(restored.Spec.Template.Spec.DNSServers) > 0 { - dst.Spec.Template.Spec.DNSServers = restored.Spec.Template.Spec.DNSServers - } - - if len(restored.Spec.Template.Spec.VMExtensions) > 0 { - dst.Spec.Template.Spec.VMExtensions = restored.Spec.Template.Spec.VMExtensions - } - - if restored.Spec.Template.Spec.SpotVMOptions != nil && restored.Spec.Template.Spec.SpotVMOptions.EvictionPolicy != nil { - dst.Spec.Template.Spec.SpotVMOptions.EvictionPolicy = restored.Spec.Template.Spec.SpotVMOptions.EvictionPolicy - } - - if restored.Spec.Template.Spec.NetworkInterfaces != nil { - dst.Spec.Template.Spec.NetworkInterfaces = restored.Spec.Template.Spec.NetworkInterfaces - } - - if restored.Spec.Template.Spec.SystemAssignedIdentityRole != nil { - dst.Spec.Template.Spec.SystemAssignedIdentityRole = restored.Spec.Template.Spec.SystemAssignedIdentityRole - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachineTemplate) - if err := Convert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureMachineTemplateList to the Hub version (v1beta1). -func (src *AzureMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachineTemplateList) - return Convert_v1alpha3_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachineTemplateList) - return Convert_v1beta1_AzureMachineTemplateList_To_v1alpha3_AzureMachineTemplateList(src, dst, nil) -} - -// Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage converts an Azure shared gallery image from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage(in *infrav1.AzureSharedGalleryImage, out *AzureSharedGalleryImage, s apimachineryconversion.Scope) error { - return autoConvert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage(in, out, s) -} - -// Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource converts an Azure machine template resource from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource(in *infrav1.AzureMachineTemplateResource, out *AzureMachineTemplateResource, s apimachineryconversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource(in, out, s) -} diff --git a/api/v1alpha3/azuremachinetemplate_types.go b/api/v1alpha3/azuremachinetemplate_types.go deleted file mode 100644 index 675be93dbfa..00000000000 --- a/api/v1alpha3/azuremachinetemplate_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. -*/ - -package v1alpha3 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// AzureMachineTemplateSpec defines the desired state of AzureMachineTemplate. -type AzureMachineTemplateSpec struct { - Template AzureMachineTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremachinetemplates,scope=Namespaced,categories=cluster-api - -// AzureMachineTemplate is the Schema for the azuremachinetemplates API. -type AzureMachineTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachineTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureMachineTemplateList contains a list of AzureMachineTemplate. -type AzureMachineTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachineTemplate `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureMachineTemplate{}, &AzureMachineTemplateList{}) -} - -// AzureMachineTemplateResource describes the data needed to create an AzureMachine from a template. -type AzureMachineTemplateResource struct { - // Spec is the specification of the desired behavior of the machine. - Spec AzureMachineSpec `json:"spec"` -} diff --git a/api/v1alpha3/azuremanagedcluster_conversion.go b/api/v1alpha3/azuremanagedcluster_conversion.go deleted file mode 100644 index eaecbf00ec6..00000000000 --- a/api/v1alpha3/azuremanagedcluster_conversion.go +++ /dev/null @@ -1,63 +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 ( - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureManagedCluster to the Hub version (v1beta1). -func (src *AzureManagedCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedCluster) - if err := Convert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureManagedCluster{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedCluster) - - if err := Convert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureManagedClusterList to the Hub version (v1beta1). -func (src *AzureManagedClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedClusterList) - return Convert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedClusterList) - return Convert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList(src, dst, nil) -} diff --git a/api/v1alpha3/azuremanagedcluster_types.go b/api/v1alpha3/azuremanagedcluster_types.go deleted file mode 100644 index 88b3e8b1112..00000000000 --- a/api/v1alpha3/azuremanagedcluster_types.go +++ /dev/null @@ -1,62 +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 ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -// AzureManagedClusterSpec defines the desired state of AzureManagedCluster. -type AzureManagedClusterSpec struct { - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1alpha3.APIEndpoint `json:"controlPlaneEndpoint"` -} - -// AzureManagedClusterStatus defines the observed state of AzureManagedCluster. -type AzureManagedClusterStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremanagedclusters,scope=Namespaced,categories=cluster-api,shortName=amc -// +kubebuilder:subresource:status - -// AzureManagedCluster is the Schema for the azuremanagedclusters API. -type AzureManagedCluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureManagedClusterSpec `json:"spec,omitempty"` - Status AzureManagedClusterStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureManagedClusterList contains a list of AzureManagedClusters. -type AzureManagedClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureManagedCluster `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureManagedCluster{}, &AzureManagedClusterList{}) -} diff --git a/api/v1alpha3/azuremanagedcontrolplane_conversion.go b/api/v1alpha3/azuremanagedcontrolplane_conversion.go deleted file mode 100644 index 8365f660751..00000000000 --- a/api/v1alpha3/azuremanagedcontrolplane_conversion.go +++ /dev/null @@ -1,103 +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 ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureManagedControlPlane to the Hub version (v1beta1). -func (src *AzureManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedControlPlane) - if err := Convert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureManagedControlPlane{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.IdentityRef = restored.Spec.IdentityRef - dst.Spec.SKU = restored.Spec.SKU - dst.Spec.LoadBalancerProfile = restored.Spec.LoadBalancerProfile - dst.Spec.APIServerAccessProfile = restored.Spec.APIServerAccessProfile - dst.Spec.AddonProfiles = restored.Spec.AddonProfiles - dst.Spec.VirtualNetwork.ResourceGroup = restored.Spec.VirtualNetwork.ResourceGroup - dst.Spec.VirtualNetwork.Subnet.ServiceEndpoints = restored.Spec.VirtualNetwork.Subnet.ServiceEndpoints - dst.Spec.VirtualNetwork.Subnet.PrivateEndpoints = restored.Spec.VirtualNetwork.Subnet.PrivateEndpoints - dst.Spec.AutoScalerProfile = restored.Spec.AutoScalerProfile - dst.Spec.OutboundType = restored.Spec.OutboundType - - dst.Status.LongRunningOperationStates = restored.Status.LongRunningOperationStates - dst.Status.Conditions = restored.Status.Conditions - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedControlPlane) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedControlPlane) - - if err := Convert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(in *infrav1.AzureManagedControlPlaneSpec, out *AzureManagedControlPlaneSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(in, out, s) -} - -// Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(in *infrav1.AzureManagedControlPlaneStatus, out *AzureManagedControlPlaneStatus, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(in, out, s) -} - -// ConvertTo converts this AzureManagedControlPlane to the Hub version (v1beta1). -func (src *AzureManagedControlPlaneList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedControlPlaneList) - return Convert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedControlPlaneList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedControlPlaneList) - return Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList(src, dst, nil) -} - -// Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork converts v1beta1 ManagedControlPlaneVirtualNetwork to v1alpha3 ManagedControlPlaneVirtualNetwork. -func Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork(in *infrav1.ManagedControlPlaneVirtualNetwork, out *ManagedControlPlaneVirtualNetwork, s apiconversion.Scope) error { - out.Name = in.Name - out.Subnet.Name = in.Subnet.Name - out.Subnet.CIDRBlock = in.Subnet.CIDRBlock - out.CIDRBlock = in.CIDRBlock - - return nil -} - -// Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet is a conversion function. -func Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(in *infrav1.ManagedControlPlaneSubnet, out *ManagedControlPlaneSubnet, s apiconversion.Scope) error { - return autoConvert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(in, out, s) -} diff --git a/api/v1alpha3/azuremanagedcontrolplane_types.go b/api/v1alpha3/azuremanagedcontrolplane_types.go deleted file mode 100644 index 2cfe68ec7b9..00000000000 --- a/api/v1alpha3/azuremanagedcontrolplane_types.go +++ /dev/null @@ -1,145 +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 ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -// AzureManagedControlPlaneSpec defines the desired state of AzureManagedControlPlane. -type AzureManagedControlPlaneSpec struct { - // Version defines the desired Kubernetes version. - // +kubebuilder:validation:MinLength:=2 - Version string `json:"version"` - - // ResourceGroupName is the name of the Azure resource group for this AKS Cluster. - ResourceGroupName string `json:"resourceGroupName"` - - // NodeResourceGroupName is the name of the resource group - // containing cluster IaaS resources. Will be populated to default - // in webhook. - NodeResourceGroupName string `json:"nodeResourceGroupName"` - - // VirtualNetwork describes the vnet for the AKS cluster. Will be created if it does not exist. - VirtualNetwork ManagedControlPlaneVirtualNetwork `json:"virtualNetwork,omitempty"` - - // SubscriotionID is the GUID of the Azure subscription to hold this cluster. - SubscriptionID string `json:"subscriptionID,omitempty"` - - // Location is a string matching one of the canonical Azure region names. Examples: "westus2", "eastus". - Location string `json:"location"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1alpha3.APIEndpoint `json:"controlPlaneEndpoint"` - - // AdditionalTags is an optional set of tags to add to Azure resources managed by the Azure provider, in addition to the - // ones added by default. - // +optional - AdditionalTags Tags `json:"additionalTags,omitempty"` - - // NetworkPlugin used for building Kubernetes network. - // +kubebuilder:validation:Enum=azure;kubenet - // +optional - NetworkPlugin *string `json:"networkPlugin,omitempty"` - - // NetworkPolicy used for building Kubernetes network. - // +kubebuilder:validation:Enum=azure;calico - // +optional - NetworkPolicy *string `json:"networkPolicy,omitempty"` - - // SSHPublicKey is a string literal containing an ssh public key base64 encoded. - SSHPublicKey string `json:"sshPublicKey"` - - // DNSServiceIP is an IP address assigned to the Kubernetes DNS service. - // It must be within the Kubernetes service address range specified in serviceCidr. - // +optional - DNSServiceIP *string `json:"dnsServiceIP,omitempty"` - - // LoadBalancerSKU is the SKU of the loadBalancer to be provisioned. - // +kubebuilder:validation:Enum=Basic;Standard - // +optional - LoadBalancerSKU *string `json:"loadBalancerSKU,omitempty"` - - // AadProfile is Azure Active Directory configuration to integrate with AKS for aad authentication. - // +optional - AADProfile *AADProfile `json:"aadProfile,omitempty"` -} - -// AADProfile - AAD integration managed by AKS. -type AADProfile struct { - // Managed - Whether to enable managed AAD. - // +kubebuilder:validation:Required - Managed bool `json:"managed"` - - // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster. - // +kubebuilder:validation:Required - AdminGroupObjectIDs []string `json:"adminGroupObjectIDs"` -} - -// ManagedControlPlaneVirtualNetwork describes a virtual network required to provision AKS clusters. -type ManagedControlPlaneVirtualNetwork struct { - Name string `json:"name"` - CIDRBlock string `json:"cidrBlock"` - Subnet ManagedControlPlaneSubnet `json:"subnet,omitempty"` -} - -// ManagedControlPlaneSubnet describes a subnet for an AKS cluster. -type ManagedControlPlaneSubnet struct { - Name string `json:"name"` - CIDRBlock string `json:"cidrBlock"` -} - -// AzureManagedControlPlaneStatus defines the observed state of AzureManagedControlPlane. -type AzureManagedControlPlaneStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready,omitempty"` - - // Initialized is true when the the control plane is available for initial contact. - // This may occur before the control plane is fully ready. - // In the AzureManagedControlPlane implementation, these are identical. - // +optional - Initialized bool `json:"initialized,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremanagedcontrolplanes,scope=Namespaced,categories=cluster-api,shortName=amcp -// +kubebuilder:subresource:status - -// AzureManagedControlPlane is the Schema for the azuremanagedcontrolplanes API. -type AzureManagedControlPlane struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureManagedControlPlaneSpec `json:"spec,omitempty"` - Status AzureManagedControlPlaneStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureManagedControlPlaneList contains a list of AzureManagedControlPlanes. -type AzureManagedControlPlaneList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureManagedControlPlane `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureManagedControlPlane{}, &AzureManagedControlPlaneList{}) -} diff --git a/api/v1alpha3/azuremanagedmachinepool_conversion.go b/api/v1alpha3/azuremanagedmachinepool_conversion.go deleted file mode 100644 index 3b192262091..00000000000 --- a/api/v1alpha3/azuremanagedmachinepool_conversion.go +++ /dev/null @@ -1,97 +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 ( - apiconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureManagedMachinePool to the Hub version (v1beta1). -func (src *AzureManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedMachinePool) - if err := Convert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureManagedMachinePool{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.Name = restored.Spec.Name - dst.Spec.Scaling = restored.Spec.Scaling - dst.Spec.Taints = restored.Spec.Taints - dst.Spec.AvailabilityZones = restored.Spec.AvailabilityZones - dst.Spec.MaxPods = restored.Spec.MaxPods - dst.Spec.OsDiskType = restored.Spec.OsDiskType - dst.Spec.OSType = restored.Spec.OSType - dst.Spec.NodeLabels = restored.Spec.NodeLabels - dst.Spec.EnableUltraSSD = restored.Spec.EnableUltraSSD - dst.Spec.EnableNodePublicIP = restored.Spec.EnableNodePublicIP - dst.Spec.NodePublicIPPrefixID = restored.Spec.NodePublicIPPrefixID - dst.Spec.ScaleSetPriority = restored.Spec.ScaleSetPriority - dst.Spec.AdditionalTags = restored.Spec.AdditionalTags - dst.Spec.KubeletDiskType = restored.Spec.KubeletDiskType - dst.Spec.LinuxOSConfig = restored.Spec.LinuxOSConfig - - if restored.Spec.KubeletConfig != nil { - dst.Spec.KubeletConfig = restored.Spec.KubeletConfig - } - dst.Spec.SubnetName = restored.Spec.SubnetName - - dst.Status.LongRunningOperationStates = restored.Status.LongRunningOperationStates - dst.Status.Conditions = restored.Status.Conditions - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedMachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedMachinePool) - if err := Convert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(in *infrav1.AzureManagedMachinePoolSpec, out *AzureManagedMachinePoolSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(in, out, s) -} - -// Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(in *infrav1.AzureManagedMachinePoolStatus, out *AzureManagedMachinePoolStatus, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(in, out, s) -} - -// ConvertTo converts this AzureManagedMachinePoolList to the Hub version (v1beta1). -func (src *AzureManagedMachinePoolList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedMachinePoolList) - return Convert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedMachinePoolList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedMachinePoolList) - return Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList(src, dst, nil) -} diff --git a/api/v1alpha3/azuremanagedmachinepool_types.go b/api/v1alpha3/azuremanagedmachinepool_types.go deleted file mode 100644 index cfdd986a31f..00000000000 --- a/api/v1alpha3/azuremanagedmachinepool_types.go +++ /dev/null @@ -1,89 +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 ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - capierrors "sigs.k8s.io/cluster-api/errors" -) - -// AzureManagedMachinePoolSpec defines the desired state of AzureManagedMachinePool. -type AzureManagedMachinePoolSpec struct { - // Mode - represents mode of an agent pool. Possible values include: System, User. - // +kubebuilder:validation:Enum=System;User - Mode string `json:"mode"` - - // SKU is the size of the VMs in the node pool. - SKU string `json:"sku"` - - // OSDiskSizeGB is the disk size for every machine in this agent pool. - // If you specify 0, it will apply the default osDisk size according to the vmSize specified. - OSDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` - - // ProviderIDList is the unique identifier as specified by the cloud provider. - // +optional - ProviderIDList []string `json:"providerIDList,omitempty"` -} - -// AzureManagedMachinePoolStatus defines the observed state of AzureManagedMachinePool. -type AzureManagedMachinePoolStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Replicas is the most recently observed number of replicas. - // +optional - Replicas int32 `json:"replicas"` - - // 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 - ErrorReason *capierrors.MachineStatusError `json:"errorReason,omitempty"` - - // 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 - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremanagedmachinepools,scope=Namespaced,categories=cluster-api,shortName=ammp -// +kubebuilder:subresource:status - -// AzureManagedMachinePool is the Schema for the azuremanagedmachinepools API. -type AzureManagedMachinePool struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureManagedMachinePoolSpec `json:"spec,omitempty"` - Status AzureManagedMachinePoolStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureManagedMachinePoolList contains a list of AzureManagedMachinePools. -type AzureManagedMachinePoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureManagedMachinePool `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureManagedMachinePool{}, &AzureManagedMachinePoolList{}) -} diff --git a/api/v1alpha3/conditions_consts.go b/api/v1alpha3/conditions_consts.go deleted file mode 100644 index f03d8a5e8a7..00000000000 --- a/api/v1alpha3/conditions_consts.go +++ /dev/null @@ -1,53 +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 clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - -// AzureCluster Conditions and Reasons. -const ( - // NetworkInfrastructureReadyCondition reports of current status of cluster infrastructure. - NetworkInfrastructureReadyCondition = "NetworkInfrastructureReady" - // LoadBalancerProvisioningReason API Server endpoint for the loadbalancer. - LoadBalancerProvisioningReason = "LoadBalancerProvisioning" - // LoadBalancerProvisioningFailedReason used for failure during provisioning of loadbalancer. - LoadBalancerProvisioningFailedReason = "LoadBalancerProvisioningFailed" - // NamespaceNotAllowedByIdentity used to indicate cluster in a namespace not allowed by identity. - NamespaceNotAllowedByIdentity = "NamespaceNotAllowedByIdentity" -) - -// AzureMachine Conditions and Reasons. -const ( - // VMRunningCondition reports on current status of the Azure VM. - VMRunningCondition clusterv1alpha3.ConditionType = "VMRunning" - // VMNCreatingReason used when the vm creation is in progress. - VMNCreatingReason = "VMCreating" - // VMNUpdatingReason used when the vm updating is in progress. - VMNUpdatingReason = "VMUpdating" - // VMNotFoundReason used when the vm couldn't be retrieved. - VMNotFoundReason = "VMNotFound" - // VMDeletingReason used when the vm is in a deleting state. - VMDDeletingReason = "VMDeleting" - // VMStoppedReason vm is in a stopped state. - VMStoppedReason = "VMStopped" - // VMProvisionFailedReason used for failures during vm provisioning. - VMProvisionFailedReason = "VMProvisionFailed" - // WaitingForClusterInfrastructureReason used when machine is waiting for cluster infrastructure to be ready before proceeding. - WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" - // WaitingForBootstrapDataReason used when machine is waiting for bootstrap data to be ready before proceeding. - WaitingForBootstrapDataReason = "WaitingForBootstrapData" -) diff --git a/api/v1alpha3/conversion_test.go b/api/v1alpha3/conversion_test.go deleted file mode 100644 index 063086a5f26..00000000000 --- a/api/v1alpha3/conversion_test.go +++ /dev/null @@ -1,113 +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 ( - "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" - "k8s.io/utils/pointer" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -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 AzureCluster", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureCluster{}, - Spoke: &AzureCluster{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{overrideDeprecatedAndRemovedFieldsFuncs, overrideOutboundLBFunc}, - })) - - t.Run("for AzureMachine", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureMachine{}, - Spoke: &AzureMachine{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{overrideDeprecatedAndRemovedFieldsFuncs}, - })) - - t.Run("for AzureMachineTemplate", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureMachineTemplate{}, - Spoke: &AzureMachineTemplate{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{overrideDeprecatedAndRemovedFieldsFuncs}, - })) - - t.Run("for AzureClusterIdentity", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureClusterIdentity{}, - Spoke: &AzureClusterIdentity{}, - FuzzerFuncs: []fuzzer.FuzzerFuncs{overrideDeprecatedAndRemovedFieldsFuncs}, - })) - - t.Run("for AzureManagedCluster", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureManagedCluster{}, - Spoke: &AzureManagedCluster{}, - })) - - t.Run("for AzureManagedControlPlane", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureManagedControlPlane{}, - Spoke: &AzureManagedControlPlane{}, - })) - - t.Run("for AzureManagedMachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureManagedMachinePool{}, - Spoke: &AzureManagedMachinePool{}, - })) -} - -func overrideDeprecatedAndRemovedFieldsFuncs(codecs runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - func(azureMachineSpec *AzureMachineSpec, c fuzz.Continue) { - azureMachineSpec.Location = "" - }, - func(subnetSpec *SubnetSpec, c fuzz.Continue) { - subnetSpec.InternalLBIPAddress = "" - }, - func(vnetSpec *VnetSpec, c fuzz.Continue) { - vnetSpec.CidrBlock = "" - }, - func(azureClusterIdentity *AzureClusterIdentity, c fuzz.Continue) { - azureClusterIdentity.Spec.AllowedNamespaces = nil - }, - } -} - -func overrideOutboundLBFunc(codecs runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - func(networkSpec *infrav1.NetworkSpec, c fuzz.Continue) { - networkSpec.ControlPlaneOutboundLB = &infrav1.LoadBalancerSpec{ - FrontendIPsCount: pointer.Int32(1), - } - networkSpec.NodeOutboundLB = &infrav1.LoadBalancerSpec{ - FrontendIPsCount: pointer.Int32(1), - } - }, - } -} diff --git a/api/v1alpha3/doc.go b/api/v1alpha3/doc.go deleted file mode 100644 index 16d0c345b95..00000000000 --- a/api/v1alpha3/doc.go +++ /dev/null @@ -1,19 +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 - -// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-azure/api/v1beta1 diff --git a/api/v1alpha3/groupversion_info.go b/api/v1alpha3/groupversion_info.go deleted file mode 100644 index f1bfe5aa121..00000000000 --- a/api/v1alpha3/groupversion_info.go +++ /dev/null @@ -1,39 +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 -package v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha3"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = SchemeBuilder.SchemeBuilder -) diff --git a/api/v1alpha3/tags.go b/api/v1alpha3/tags.go deleted file mode 100644 index 3f730bcfdb9..00000000000 --- a/api/v1alpha3/tags.go +++ /dev/null @@ -1,197 +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 ( - "fmt" - "reflect" -) - -// Tags defines a map of tags. -type Tags map[string]string - -// Equals returns true if the tags are equal. -func (t Tags) Equals(other Tags) bool { - return reflect.DeepEqual(t, other) -} - -// HasMatchingSpecVersionHash returns true if the resource has been tagged with a matching resource spec hash value. -func (t Tags) HasMatchingSpecVersionHash(hash string) bool { - value, ok := t[SpecVersionHashTagKey()] - return ok && value == hash -} - -// HasOwned returns true if the tags contains a tag that marks the resource as owned by the cluster from the perspective of this management tooling. -func (t Tags) HasOwned(cluster string) bool { - value, ok := t[ClusterTagKey(cluster)] - return ok && ResourceLifecycle(value) == ResourceLifecycleOwned -} - -// HasAzureCloudProviderOwned returns true if the tags contains a tag that marks the resource as owned by the cluster from the perspective of the in-tree cloud provider. -func (t Tags) HasAzureCloudProviderOwned(cluster string) bool { - value, ok := t[ClusterAzureCloudProviderTagKey(cluster)] - return ok && ResourceLifecycle(value) == ResourceLifecycleOwned -} - -// GetRole returns the Cluster API role for the tagged resource. -func (t Tags) GetRole() string { - return t[NameAzureClusterAPIRole] -} - -// Difference returns the difference between this map of tags and the other map of tags. -// Items are considered equals if key and value are equals. -func (t Tags) Difference(other Tags) Tags { - res := make(Tags, len(t)) - - for key, value := range t { - if otherValue, ok := other[key]; ok && value == otherValue { - continue - } - res[key] = value - } - - return res -} - -// Merge merges in tags from other. If a tag already exists, it is replaced by the tag in other. -func (t Tags) Merge(other Tags) { - for k, v := range other { - t[k] = v - } -} - -// AddSpecVersionHashTag adds a spec version hash to the Azure resource tags to determine if state has changed quickly. -func (t Tags) AddSpecVersionHashTag(hash string) Tags { - t[SpecVersionHashTagKey()] = hash - return t -} - -// ResourceLifecycle configures the lifecycle of a resource. -type ResourceLifecycle string - -const ( - // ResourceLifecycleOwned is the value we use when tagging resources to indicate - // that the resource is considered owned and managed by the cluster, - // and in particular that the lifecycle is tied to the lifecycle of the cluster. - ResourceLifecycleOwned = ResourceLifecycle("owned") - - // ResourceLifecycleShared is the value we use when tagging resources to indicate - // that the resource is shared between multiple clusters, and should not be destroyed - // if the cluster is destroyed. - ResourceLifecycleShared = ResourceLifecycle("shared") - - // NameKubernetesAzureCloudProviderPrefix is the tag name used by the cloud provider to logically - // separate independent cluster resources. We use it to identify which resources we expect - // to be permissive about state changes. - // logically independent clusters running in the same AZ. - // The tag key = NameKubernetesAzureCloudProviderPrefix + clusterID - // The tag value is an ownership value. - NameKubernetesAzureCloudProviderPrefix = "kubernetes.io_cluster_" - - // NameAzureProviderPrefix is the tag prefix we use to differentiate - // cluster-api-provider-azure owned components from other tooling that - // uses NameKubernetesClusterPrefix. - NameAzureProviderPrefix = "sigs.k8s.io_cluster-api-provider-azure_" - - // NameAzureProviderOwned is the tag name we use to differentiate - // cluster-api-provider-azure owned components from other tooling that - // uses NameKubernetesClusterPrefix. - NameAzureProviderOwned = NameAzureProviderPrefix + "cluster_" - - // NameAzureClusterAPIRole is the tag name we use to mark roles for resources - // dedicated to this cluster api provider implementation. - NameAzureClusterAPIRole = NameAzureProviderPrefix + "role" - - // APIServerRole describes the value for the apiserver role. - APIServerRole = "apiserver" - - // NodeOutboundRole describes the value for the node outbound LB role. - NodeOutboundRole = "nodeOutbound" - - // ControlPlaneOutboundRole describes the value for the control plane outbound LB role. - ControlPlaneOutboundRole = "controlPlaneOutbound" - - // BastionRole describes the value for the bastion role. - BastionRole = "bastion" - - // CommonRole describes the value for the common role. - CommonRole = "common" - - // VMTagsLastAppliedAnnotation is the key for the machine object annotation - // which tracks the AdditionalTags in the Machine Provider Config. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - // for annotation formatting rules. - VMTagsLastAppliedAnnotation = "sigs.k8s.io/cluster-api-provider-azure-last-applied-tags-vm" -) - -// SpecVersionHashTagKey is the key for the spec version hash used to enable quick spec difference comparison. -func SpecVersionHashTagKey() string { - return fmt.Sprintf("%s%s", NameAzureProviderPrefix, "spec-version-hash") -} - -// ClusterTagKey generates the key for resources associated with a cluster. -func ClusterTagKey(name string) string { - return fmt.Sprintf("%s%s", NameAzureProviderOwned, name) -} - -// ClusterAzureCloudProviderTagKey generates the key for resources associated a cluster's Azure cloud provider. -func ClusterAzureCloudProviderTagKey(name string) string { - return fmt.Sprintf("%s%s", NameKubernetesAzureCloudProviderPrefix, name) -} - -// BuildParams is used to build tags around an azure resource. -type BuildParams struct { - // Lifecycle determines the resource lifecycle. - Lifecycle ResourceLifecycle - - // ClusterName is the cluster associated with the resource. - ClusterName string - - // ResourceID is the unique identifier of the resource to be tagged. - ResourceID string - - // Name is the name of the resource, it's applied as the tag "Name" on Azure. - // +optional - Name *string - - // Role is the role associated to the resource. - // +optional - Role *string - - // Any additional tags to be added to the resource. - // +optional - Additional Tags -} - -// Build builds tags including the cluster tag and returns them in map form. -func Build(params BuildParams) Tags { - tags := make(Tags) - for k, v := range params.Additional { - tags[k] = v - } - - tags[ClusterTagKey(params.ClusterName)] = string(params.Lifecycle) - if params.Role != nil { - tags[NameAzureClusterAPIRole] = *params.Role - } - - if params.Name != nil { - tags["Name"] = *params.Name - } - - return tags -} diff --git a/api/v1alpha3/tags_test.go b/api/v1alpha3/tags_test.go deleted file mode 100644 index ad126b46575..00000000000 --- a/api/v1alpha3/tags_test.go +++ /dev/null @@ -1,90 +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 ( - "testing" - - . "github.com/onsi/gomega" -) - -func TestTags_Merge(t *testing.T) { - g := NewWithT(t) - - tests := []struct { - name string - other Tags - expected Tags - }{ - { - name: "nil other", - other: nil, - expected: Tags{ - "a": "b", - "c": "d", - }, - }, - { - name: "empty other", - other: Tags{}, - expected: Tags{ - "a": "b", - "c": "d", - }, - }, - { - name: "disjoint", - other: Tags{ - "1": "2", - "3": "4", - }, - expected: Tags{ - "a": "b", - "c": "d", - "1": "2", - "3": "4", - }, - }, - { - name: "overlapping, other wins", - other: Tags{ - "1": "2", - "3": "4", - "a": "hello", - }, - expected: Tags{ - "a": "hello", - "c": "d", - "1": "2", - "3": "4", - }, - }, - } - for _, tc := range tests { - tc := tc - t.Run(tc.name, func(t *testing.T) { - t.Parallel() - tags := Tags{ - "a": "b", - "c": "d", - } - - tags.Merge(tc.other) - g.Expect(tags).To(Equal(tc.expected)) - }) - } -} diff --git a/api/v1alpha3/types.go b/api/v1alpha3/types.go deleted file mode 100644 index 5549f02a4ea..00000000000 --- a/api/v1alpha3/types.go +++ /dev/null @@ -1,491 +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 ( - corev1 "k8s.io/api/core/v1" -) - -const ( - // ControlPlane machine label. - ControlPlane string = "control-plane" - // Node machine label. - Node string = "node" -) - -// Future contains the data needed for an Azure long-running operation to continue across reconcile loops. -type Future struct { - // Type describes the type of future, update, create, delete, etc. - Type string `json:"type"` - - // ResourceGroup is the Azure resource group for the resource. - // +optional - ResourceGroup string `json:"resourceGroup,omitempty"` - - // Name is the name of the Azure resource. - // +optional - Name string `json:"name,omitempty"` - - // FutureData is the base64 url encoded json Azure AutoRest Future. - FutureData string `json:"futureData,omitempty"` -} - -// NetworkSpec specifies what the Azure networking resources should look like. -type NetworkSpec struct { - // Vnet is the configuration for the Azure virtual network. - // +optional - Vnet VnetSpec `json:"vnet,omitempty"` - - // Subnets is the configuration for the control-plane subnet and the node subnet. - // +optional - Subnets Subnets `json:"subnets,omitempty"` - - // APIServerLB is the configuration for the control-plane load balancer. - // +optional - APIServerLB LoadBalancerSpec `json:"apiServerLB,omitempty"` -} - -// VnetSpec configures an Azure virtual network. -type VnetSpec struct { - // ResourceGroup is the name of the resource group of the existing virtual network - // or the resource group where a managed virtual network should be created. - ResourceGroup string `json:"resourceGroup,omitempty"` - - // ID is the identifier of the virtual network this provider should use to create resources. - ID string `json:"id,omitempty"` - - // Name defines a name for the virtual network resource. - Name string `json:"name"` - - // CidrBlock is the CIDR block to be used when the provider creates a managed virtual network. - // Deprecated: Use CIDRBlocks instead - // +optional - CidrBlock string `json:"cidrBlock,omitempty"` - - // CIDRBlocks defines the virtual network's address space, specified as one or more address prefixes in CIDR notation. - // +optional - CIDRBlocks []string `json:"cidrBlocks,omitempty"` - - // Tags is a collection of tags describing the resource. - // +optional - Tags Tags `json:"tags,omitempty"` -} - -// IsManaged returns true if the vnet is managed. -func (v *VnetSpec) IsManaged(clusterName string) bool { - return v.ID == "" || v.Tags.HasOwned(clusterName) -} - -// Subnets is a slice of Subnet. -type Subnets []SubnetSpec - -// SecurityGroupRole defines the unique role of a security group. -type SecurityGroupRole string - -const ( - // SecurityGroupNode defines a Kubernetes workload node role. - SecurityGroupNode = SecurityGroupRole(Node) - - // SecurityGroupControlPlane defines a Kubernetes control plane node role. - SecurityGroupControlPlane = SecurityGroupRole(ControlPlane) -) - -// SecurityGroup defines an Azure security group. -type SecurityGroup struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - IngressRules IngressRules `json:"ingressRule,omitempty"` - Tags Tags `json:"tags,omitempty"` -} - -// RouteTable defines an Azure route table. -type RouteTable struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` -} - -// SecurityGroupProtocol defines the protocol type for a security group rule. -type SecurityGroupProtocol string - -const ( - // SecurityGroupProtocolAll is a wildcard for all IP protocols. - SecurityGroupProtocolAll = SecurityGroupProtocol("*") - - // SecurityGroupProtocolTCP represents the TCP protocol in ingress rules. - SecurityGroupProtocolTCP = SecurityGroupProtocol("Tcp") - - // SecurityGroupProtocolUDP represents the UDP protocol in ingress rules. - SecurityGroupProtocolUDP = SecurityGroupProtocol("Udp") -) - -// IngressRule defines an Azure ingress rule for security groups. -type IngressRule struct { - Name string `json:"name"` - Description string `json:"description"` - Protocol SecurityGroupProtocol `json:"protocol"` - - // Priority - A number between 100 and 4096. Each rule should have a unique value for priority. Rules are processed in priority order, with lower numbers processed before higher numbers. Once traffic matches a rule, processing stops. - Priority int32 `json:"priority,omitempty"` - - // SourcePorts - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. - SourcePorts *string `json:"sourcePorts,omitempty"` - - // DestinationPorts - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. - DestinationPorts *string `json:"destinationPorts,omitempty"` - - // Source - The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. - Source *string `json:"source,omitempty"` - - // Destination - The destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - Destination *string `json:"destination,omitempty"` -} - -// IngressRules is a slice of Azure ingress rules for security groups. -type IngressRules []IngressRule - -// LoadBalancerSpec defines an Azure load balancer. -type LoadBalancerSpec struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - SKU SKU `json:"sku,omitempty"` - FrontendIPs []FrontendIP `json:"frontendIPs,omitempty"` - Type LBType `json:"type,omitempty"` -} - -// SKU defines an Azure load balancer SKU. -type SKU string - -const ( - // SKUStandard is the value for the Azure load balancer Standard SKU. - SKUStandard = SKU("Standard") -) - -// LBType defines an Azure load balancer Type. -type LBType string - -const ( - // Internal is the value for the Azure load balancer internal type. - Internal = LBType("Internal") - // Public is the value for the Azure load balancer public type. - Public = LBType("Public") -) - -// FrontendIP defines a load balancer frontend IP configuration. -type FrontendIP struct { - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` - // +optional - PrivateIPAddress string `json:"privateIP,omitempty"` - // +optional - PublicIP *PublicIPSpec `json:"publicIP,omitempty"` -} - -// PublicIPSpec defines the inputs to create an Azure public IP address. -type PublicIPSpec struct { - Name string `json:"name"` - // +optional - DNSName string `json:"dnsName,omitempty"` -} - -// VMState describes the state of an Azure virtual machine. -type VMState string - -const ( - // VMStateCreating ... - VMStateCreating VMState = "Creating" - // VMStateDeleting ... - VMStateDeleting VMState = "Deleting" - // VMStateFailed ... - VMStateFailed VMState = "Failed" - // VMStateMigrating ... - VMStateMigrating VMState = "Migrating" - // VMStateSucceeded ... - VMStateSucceeded VMState = "Succeeded" - // VMStateUpdating ... - VMStateUpdating VMState = "Updating" - // VMStateDeleted represents a deleted VM - // NOTE: This state is specific to capz, and does not have corresponding mapping in Azure API (https://docs.microsoft.com/en-us/azure/virtual-machines/states-lifecycle#provisioning-states) - VMStateDeleted VMState = "Deleted" -) - -// VM describes an Azure virtual machine. -type VM struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - AvailabilityZone string `json:"availabilityZone,omitempty"` - // Hardware profile - VMSize string `json:"vmSize,omitempty"` - // Storage profile - Image Image `json:"image,omitempty"` - OSDisk OSDisk `json:"osDisk,omitempty"` - StartupScript string `json:"startupScript,omitempty"` - // State - The provisioning state, which only appears in the response. - State VMState `json:"vmState,omitempty"` - Identity VMIdentity `json:"identity,omitempty"` - Tags Tags `json:"tags,omitempty"` - - // Addresses contains the addresses associated with the Azure VM. - Addresses []corev1.NodeAddress `json:"addresses,omitempty"` -} - -// Image defines information about the image to use for VM creation. -// There are three ways to specify an image: by ID, Marketplace Image or SharedImageGallery -// One of ID, SharedImage or Marketplace should be set. -type Image struct { - // ID specifies an image to use by ID - // +optional - ID *string `json:"id,omitempty"` - - // SharedGallery specifies an image to use from an Azure Shared Image Gallery - // +optional - SharedGallery *AzureSharedGalleryImage `json:"sharedGallery,omitempty"` - - // Marketplace specifies an image to use from the Azure Marketplace - // +optional - Marketplace *AzureMarketplaceImage `json:"marketplace,omitempty"` -} - -// AzureMarketplaceImage defines an image in the Azure Marketplace to use for VM creation. -type AzureMarketplaceImage struct { - // Publisher is the name of the organization that created the image - // +kubebuilder:validation:MinLength=1 - Publisher string `json:"publisher"` - // Offer specifies the name of a group of related images created by the publisher. - // For example, UbuntuServer, WindowsServer - // +kubebuilder:validation:MinLength=1 - Offer string `json:"offer"` - // SKU specifies an instance of an offer, such as a major release of a distribution. - // For example, 18.04-LTS, 2019-Datacenter - // +kubebuilder:validation:MinLength=1 - SKU string `json:"sku"` - // Version specifies the version of an image sku. The allowed formats - // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. - // Specify 'latest' to use the latest version of an image available at deploy time. - // Even if you use 'latest', the VM image will not automatically update after deploy - // time even if a new version becomes available. - // +kubebuilder:validation:MinLength=1 - Version string `json:"version"` - // ThirdPartyImage indicates the image is published by a third party publisher and a Plan - // will be generated for it. - // +kubebuilder:default=false - // +optional - ThirdPartyImage bool `json:"thirdPartyImage"` -} - -// AzureSharedGalleryImage defines an image in a Shared Image Gallery to use for VM creation. -type AzureSharedGalleryImage struct { - // SubscriptionID is the identifier of the subscription that contains the shared image gallery - // +kubebuilder:validation:MinLength=1 - SubscriptionID string `json:"subscriptionID"` - // ResourceGroup specifies the resource group containing the shared image gallery - // +kubebuilder:validation:MinLength=1 - ResourceGroup string `json:"resourceGroup"` - // Gallery specifies the name of the shared image gallery that contains the image - // +kubebuilder:validation:MinLength=1 - Gallery string `json:"gallery"` - // Name is the name of the image - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` - // Version specifies the version of the marketplace image. The allowed formats - // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. - // Specify 'latest' to use the latest version of an image available at deploy time. - // Even if you use 'latest', the VM image will not automatically update after deploy - // time even if a new version becomes available. - // +kubebuilder:validation:MinLength=1 - Version string `json:"version"` -} - -// AvailabilityZone specifies an Azure Availability Zone. -// -// Deprecated: Use FailureDomain instead. -type AvailabilityZone struct { - ID *string `json:"id,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} - -// VMIdentity defines the identity of the virtual machine, if configured. -// +kubebuilder:validation:Enum=None;SystemAssigned;UserAssigned -type VMIdentity string - -const ( - // VMIdentityNone ... - VMIdentityNone VMIdentity = "None" - // VMIdentitySystemAssigned ... - VMIdentitySystemAssigned VMIdentity = "SystemAssigned" - // VMIdentityUserAssigned ... - VMIdentityUserAssigned VMIdentity = "UserAssigned" -) - -// UserAssignedIdentity defines the user-assigned identities provided -// by the user to be assigned to Azure resources. -type UserAssignedIdentity struct { - // ProviderID is the identification ID of the user-assigned Identity, the format of an identity is: - // 'azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}' - ProviderID string `json:"providerID"` -} - -const ( - // AzureIdentityBindingSelector is the label used to match with the AzureIdentityBinding - // For the controller to match an identity binding, it needs a [label] with the key `aadpodidbinding` - // whose value is that of the `selector:` field in the `AzureIdentityBinding`. - AzureIdentityBindingSelector = "capz-controller-aadpodidentity-selector" -) - -// IdentityType represents different types of identities. -// +kubebuilder:validation:Enum=ServicePrincipal;UserAssignedMSI -type IdentityType string - -const ( - // UserAssignedMSI represents a user-assigned identity. - UserAssignedMSI IdentityType = "UserAssignedMSI" - - // ServicePrincipal represents a service principal. - ServicePrincipal IdentityType = "ServicePrincipal" -) - -// OSDisk defines the operating system disk for a VM. -// -// WARNING: this requires any updates to ManagedDisk to be manually converted. This is due to the odd issue with -// conversion-gen where the warning message generated uses a relative directory import rather than the fully -// qualified import when generating outside of the GOPATH. -// +k8s:conversion-gen=false -type OSDisk struct { - OSType string `json:"osType"` - DiskSizeGB int32 `json:"diskSizeGB"` - ManagedDisk ManagedDisk `json:"managedDisk"` - DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` - // +optional - CachingType string `json:"cachingType,omitempty"` -} - -// DataDisk specifies the parameters that are used to add one or more data disks to the machine. -type DataDisk struct { - // NameSuffix is the suffix to be appended to the machine name to generate the disk name. - // Each disk name will be in format _. - NameSuffix string `json:"nameSuffix"` - // DiskSizeGB is the size in GB to assign to the data disk. - DiskSizeGB int32 `json:"diskSizeGB"` - // +optional - ManagedDisk *ManagedDisk `json:"managedDisk,omitempty"` - // Lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - // The value must be between 0 and 63. - Lun *int32 `json:"lun,omitempty"` - // +optional - CachingType string `json:"cachingType,omitempty"` -} - -// ManagedDisk defines the managed disk options for a VM. -type ManagedDisk struct { - StorageAccountType string `json:"storageAccountType"` - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// DiskEncryptionSetParameters defines disk encryption options. -type DiskEncryptionSetParameters struct { - // ID defines resourceID for diskEncryptionSet resource. It must be in the same subscription - ID string `json:"id,omitempty"` -} - -// DiffDiskSettings describe ephemeral disk settings for the os disk. -type DiffDiskSettings struct { - // Option enables ephemeral OS when set to "Local" - // See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details - // +kubebuilder:validation:Enum=Local - Option string `json:"option"` -} - -// SubnetRole defines the unique role of a subnet. -type SubnetRole string - -const ( - // SubnetNode defines a Kubernetes workload node role. - SubnetNode = SubnetRole(Node) - - // SubnetControlPlane defines a Kubernetes control plane node role. - SubnetControlPlane = SubnetRole(ControlPlane) -) - -// SubnetSpec configures an Azure subnet. -type SubnetSpec struct { - // Role defines the subnet role (eg. Node, ControlPlane) - Role SubnetRole `json:"role,omitempty"` - - // ID defines a unique identifier to reference this resource. - // +optional - ID string `json:"id,omitempty"` - - // Name defines a name for the subnet resource. - Name string `json:"name"` - - // CidrBlock is the CIDR block to be used when the provider creates a managed Vnet. - // Deprecated: Use CIDRBlocks instead - // +optional - CidrBlock string `json:"cidrBlock,omitempty"` - - // CIDRBlocks defines the subnet's address space, specified as one or more address prefixes in CIDR notation. - // +optional - CIDRBlocks []string `json:"cidrBlocks,omitempty"` - - // InternalLBIPAddress is the IP address that will be used as the internal LB private IP. - // For the control plane subnet only. - // +optional - // Deprecated: Use LoadBalancer private IP instead - InternalLBIPAddress string `json:"internalLBIPAddress,omitempty"` - - // SecurityGroup defines the NSG (network security group) that should be attached to this subnet. - // +optional - SecurityGroup SecurityGroup `json:"securityGroup,omitempty"` - - // RouteTable defines the route table that should be attached to this subnet. - // +optional - RouteTable RouteTable `json:"routeTable,omitempty"` -} - -// GetControlPlaneSubnet returns the cluster control plane subnet. -func (n *NetworkSpec) GetControlPlaneSubnet() *SubnetSpec { - for _, sn := range n.Subnets { - if sn.Role == SubnetControlPlane { - return &sn - } - } - return nil -} - -// GetNodeSubnet returns the cluster node subnet. -func (n *NetworkSpec) GetNodeSubnet() *SubnetSpec { - for _, sn := range n.Subnets { - if sn.Role == SubnetNode { - return &sn - } - } - return nil -} - -// SecurityProfile specifies the Security profile settings for a -// virtual machine or virtual machine scale set. -type SecurityProfile struct { - // This field indicates whether Host Encryption should be enabled - // or disabled for a virtual machine or virtual machine scale - // set. Default is disabled. - EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"` -} - -// AddressRecord specifies a DNS record mapping a hostname to an IPV4 or IPv6 address. -type AddressRecord struct { - Hostname string - IP string -} diff --git a/api/v1alpha3/zz_generated.conversion.go b/api/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index 90dfaff119f..00000000000 --- a/api/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,2199 +0,0 @@ -//go:build !ignore_autogenerated_core_v1alpha3 -// +build !ignore_autogenerated_core_v1alpha3 - -/* -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-v0.23.1. DO NOT EDIT. - -package v1alpha3 - -import ( - unsafe "unsafe" - - v1 "k8s.io/api/core/v1" - resource "k8s.io/apimachinery/pkg/api/resource" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/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((*AADProfile)(nil), (*v1beta1.AADProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AADProfile_To_v1beta1_AADProfile(a.(*AADProfile), b.(*v1beta1.AADProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AADProfile)(nil), (*AADProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AADProfile_To_v1alpha3_AADProfile(a.(*v1beta1.AADProfile), b.(*AADProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AddressRecord)(nil), (*v1beta1.AddressRecord)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AddressRecord_To_v1beta1_AddressRecord(a.(*AddressRecord), b.(*v1beta1.AddressRecord), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AddressRecord)(nil), (*AddressRecord)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AddressRecord_To_v1alpha3_AddressRecord(a.(*v1beta1.AddressRecord), b.(*AddressRecord), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureCluster)(nil), (*v1beta1.AzureCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster(a.(*AzureCluster), b.(*v1beta1.AzureCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureCluster)(nil), (*AzureCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster(a.(*v1beta1.AzureCluster), b.(*AzureCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentity)(nil), (*v1beta1.AzureClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(a.(*AzureClusterIdentity), b.(*v1beta1.AzureClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentity)(nil), (*AzureClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity(a.(*v1beta1.AzureClusterIdentity), b.(*AzureClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentityList)(nil), (*v1beta1.AzureClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(a.(*AzureClusterIdentityList), b.(*v1beta1.AzureClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentityList)(nil), (*AzureClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentityList_To_v1alpha3_AzureClusterIdentityList(a.(*v1beta1.AzureClusterIdentityList), b.(*AzureClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentityStatus)(nil), (*v1beta1.AzureClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(a.(*AzureClusterIdentityStatus), b.(*v1beta1.AzureClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentityStatus)(nil), (*AzureClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha3_AzureClusterIdentityStatus(a.(*v1beta1.AzureClusterIdentityStatus), b.(*AzureClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterList)(nil), (*v1beta1.AzureClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterList_To_v1beta1_AzureClusterList(a.(*AzureClusterList), b.(*v1beta1.AzureClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterList)(nil), (*AzureClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterList_To_v1alpha3_AzureClusterList(a.(*v1beta1.AzureClusterList), b.(*AzureClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachine)(nil), (*v1beta1.AzureMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine(a.(*AzureMachine), b.(*v1beta1.AzureMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachine)(nil), (*AzureMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine(a.(*v1beta1.AzureMachine), b.(*AzureMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineList)(nil), (*v1beta1.AzureMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineList_To_v1beta1_AzureMachineList(a.(*AzureMachineList), b.(*v1beta1.AzureMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineList)(nil), (*AzureMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineList_To_v1alpha3_AzureMachineList(a.(*v1beta1.AzureMachineList), b.(*AzureMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplate)(nil), (*v1beta1.AzureMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(a.(*AzureMachineTemplate), b.(*v1beta1.AzureMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineTemplate)(nil), (*AzureMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate(a.(*v1beta1.AzureMachineTemplate), b.(*AzureMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplateList)(nil), (*v1beta1.AzureMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(a.(*AzureMachineTemplateList), b.(*v1beta1.AzureMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineTemplateList)(nil), (*AzureMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplateList_To_v1alpha3_AzureMachineTemplateList(a.(*v1beta1.AzureMachineTemplateList), b.(*AzureMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplateResource)(nil), (*v1beta1.AzureMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(a.(*AzureMachineTemplateResource), b.(*v1beta1.AzureMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplateSpec)(nil), (*v1beta1.AzureMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(a.(*AzureMachineTemplateSpec), b.(*v1beta1.AzureMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineTemplateSpec)(nil), (*AzureMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha3_AzureMachineTemplateSpec(a.(*v1beta1.AzureMachineTemplateSpec), b.(*AzureMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedCluster)(nil), (*v1beta1.AzureManagedCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(a.(*AzureManagedCluster), b.(*v1beta1.AzureManagedCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedCluster)(nil), (*AzureManagedCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(a.(*v1beta1.AzureManagedCluster), b.(*AzureManagedCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedClusterList)(nil), (*v1beta1.AzureManagedClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(a.(*AzureManagedClusterList), b.(*v1beta1.AzureManagedClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedClusterList)(nil), (*AzureManagedClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList(a.(*v1beta1.AzureManagedClusterList), b.(*AzureManagedClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedClusterSpec)(nil), (*v1beta1.AzureManagedClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(a.(*AzureManagedClusterSpec), b.(*v1beta1.AzureManagedClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedClusterSpec)(nil), (*AzureManagedClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha3_AzureManagedClusterSpec(a.(*v1beta1.AzureManagedClusterSpec), b.(*AzureManagedClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedClusterStatus)(nil), (*v1beta1.AzureManagedClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(a.(*AzureManagedClusterStatus), b.(*v1beta1.AzureManagedClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedClusterStatus)(nil), (*AzureManagedClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha3_AzureManagedClusterStatus(a.(*v1beta1.AzureManagedClusterStatus), b.(*AzureManagedClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlane)(nil), (*v1beta1.AzureManagedControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(a.(*AzureManagedControlPlane), b.(*v1beta1.AzureManagedControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedControlPlane)(nil), (*AzureManagedControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(a.(*v1beta1.AzureManagedControlPlane), b.(*AzureManagedControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlaneList)(nil), (*v1beta1.AzureManagedControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(a.(*AzureManagedControlPlaneList), b.(*v1beta1.AzureManagedControlPlaneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedControlPlaneList)(nil), (*AzureManagedControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList(a.(*v1beta1.AzureManagedControlPlaneList), b.(*AzureManagedControlPlaneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlaneSpec)(nil), (*v1beta1.AzureManagedControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(a.(*AzureManagedControlPlaneSpec), b.(*v1beta1.AzureManagedControlPlaneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlaneStatus)(nil), (*v1beta1.AzureManagedControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(a.(*AzureManagedControlPlaneStatus), b.(*v1beta1.AzureManagedControlPlaneStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePool)(nil), (*v1beta1.AzureManagedMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(a.(*AzureManagedMachinePool), b.(*v1beta1.AzureManagedMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedMachinePool)(nil), (*AzureManagedMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(a.(*v1beta1.AzureManagedMachinePool), b.(*AzureManagedMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePoolList)(nil), (*v1beta1.AzureManagedMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(a.(*AzureManagedMachinePoolList), b.(*v1beta1.AzureManagedMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedMachinePoolList)(nil), (*AzureManagedMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList(a.(*v1beta1.AzureManagedMachinePoolList), b.(*AzureManagedMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePoolSpec)(nil), (*v1beta1.AzureManagedMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(a.(*AzureManagedMachinePoolSpec), b.(*v1beta1.AzureManagedMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePoolStatus)(nil), (*v1beta1.AzureManagedMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(a.(*AzureManagedMachinePoolStatus), b.(*v1beta1.AzureManagedMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureSharedGalleryImage)(nil), (*v1beta1.AzureSharedGalleryImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(a.(*AzureSharedGalleryImage), b.(*v1beta1.AzureSharedGalleryImage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BuildParams)(nil), (*v1beta1.BuildParams)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_BuildParams_To_v1beta1_BuildParams(a.(*BuildParams), b.(*v1beta1.BuildParams), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.BuildParams)(nil), (*BuildParams)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BuildParams_To_v1alpha3_BuildParams(a.(*v1beta1.BuildParams), b.(*BuildParams), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DataDisk)(nil), (*v1beta1.DataDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DataDisk_To_v1beta1_DataDisk(a.(*DataDisk), b.(*v1beta1.DataDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.DataDisk)(nil), (*DataDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DataDisk_To_v1alpha3_DataDisk(a.(*v1beta1.DataDisk), b.(*DataDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DiffDiskSettings)(nil), (*v1beta1.DiffDiskSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DiffDiskSettings_To_v1beta1_DiffDiskSettings(a.(*DiffDiskSettings), b.(*v1beta1.DiffDiskSettings), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.DiffDiskSettings)(nil), (*DiffDiskSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DiffDiskSettings_To_v1alpha3_DiffDiskSettings(a.(*v1beta1.DiffDiskSettings), b.(*DiffDiskSettings), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DiskEncryptionSetParameters)(nil), (*v1beta1.DiskEncryptionSetParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(a.(*DiskEncryptionSetParameters), b.(*v1beta1.DiskEncryptionSetParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.DiskEncryptionSetParameters)(nil), (*DiskEncryptionSetParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DiskEncryptionSetParameters_To_v1alpha3_DiskEncryptionSetParameters(a.(*v1beta1.DiskEncryptionSetParameters), b.(*DiskEncryptionSetParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Image)(nil), (*v1beta1.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Image_To_v1beta1_Image(a.(*Image), b.(*v1beta1.Image), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ManagedControlPlaneSubnet)(nil), (*v1beta1.ManagedControlPlaneSubnet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(a.(*ManagedControlPlaneSubnet), b.(*v1beta1.ManagedControlPlaneSubnet), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ManagedControlPlaneVirtualNetwork)(nil), (*v1beta1.ManagedControlPlaneVirtualNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(a.(*ManagedControlPlaneVirtualNetwork), b.(*v1beta1.ManagedControlPlaneVirtualNetwork), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PublicIPSpec)(nil), (*v1beta1.PublicIPSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_PublicIPSpec_To_v1beta1_PublicIPSpec(a.(*PublicIPSpec), b.(*v1beta1.PublicIPSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*RouteTable)(nil), (*v1beta1.RouteTable)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_RouteTable_To_v1beta1_RouteTable(a.(*RouteTable), b.(*v1beta1.RouteTable), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.RouteTable)(nil), (*RouteTable)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_RouteTable_To_v1alpha3_RouteTable(a.(*v1beta1.RouteTable), b.(*RouteTable), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SecurityProfile)(nil), (*v1beta1.SecurityProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SecurityProfile_To_v1beta1_SecurityProfile(a.(*SecurityProfile), b.(*v1beta1.SecurityProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.SecurityProfile)(nil), (*SecurityProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SecurityProfile_To_v1alpha3_SecurityProfile(a.(*v1beta1.SecurityProfile), b.(*SecurityProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SpotVMOptions)(nil), (*v1beta1.SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(a.(*SpotVMOptions), b.(*v1beta1.SpotVMOptions), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*UserAssignedIdentity)(nil), (*v1beta1.UserAssignedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(a.(*UserAssignedIdentity), b.(*v1beta1.UserAssignedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.UserAssignedIdentity)(nil), (*UserAssignedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_UserAssignedIdentity_To_v1alpha3_UserAssignedIdentity(a.(*v1beta1.UserAssignedIdentity), b.(*UserAssignedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureClusterIdentitySpec)(nil), (*v1beta1.AzureClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(a.(*AzureClusterIdentitySpec), b.(*v1beta1.AzureClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureClusterSpec)(nil), (*v1beta1.AzureClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec(a.(*AzureClusterSpec), b.(*v1beta1.AzureClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureClusterStatus)(nil), (*v1beta1.AzureClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus(a.(*AzureClusterStatus), b.(*v1beta1.AzureClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureMachineSpec)(nil), (*v1beta1.AzureMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec(a.(*AzureMachineSpec), b.(*v1beta1.AzureMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureMachineStatus)(nil), (*v1beta1.AzureMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus(a.(*AzureMachineStatus), b.(*v1beta1.AzureMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureMarketplaceImage)(nil), (*v1beta1.AzureMarketplaceImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(a.(*AzureMarketplaceImage), b.(*v1beta1.AzureMarketplaceImage), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*FrontendIP)(nil), (*v1beta1.FrontendIP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP(a.(*FrontendIP), b.(*v1beta1.FrontendIP), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*Future)(nil), (*v1beta1.Future)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Future_To_v1beta1_Future(a.(*Future), b.(*v1beta1.Future), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*IngressRule)(nil), (*v1beta1.SecurityRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule(a.(*IngressRule), b.(*v1beta1.SecurityRule), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*LoadBalancerSpec)(nil), (*v1beta1.LoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(a.(*LoadBalancerSpec), b.(*v1beta1.LoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*ManagedDisk)(nil), (*v1beta1.ManagedDiskParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDiskParameters(a.(*ManagedDisk), b.(*v1beta1.ManagedDiskParameters), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*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.AddConversionFunc((*OSDisk)(nil), (*v1beta1.OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(a.(*OSDisk), b.(*v1beta1.OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*SecurityGroup)(nil), (*v1beta1.SecurityGroup)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup(a.(*SecurityGroup), b.(*v1beta1.SecurityGroup), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*SubnetSpec)(nil), (*v1beta1.SubnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(a.(*SubnetSpec), b.(*v1beta1.SubnetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*VnetSpec)(nil), (*v1beta1.VnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(a.(*VnetSpec), b.(*v1beta1.VnetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureClusterIdentitySpec)(nil), (*AzureClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec(a.(*v1beta1.AzureClusterIdentitySpec), b.(*AzureClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureClusterSpec)(nil), (*AzureClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec(a.(*v1beta1.AzureClusterSpec), b.(*AzureClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureClusterStatus)(nil), (*AzureClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus(a.(*v1beta1.AzureClusterStatus), b.(*AzureClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachineSpec)(nil), (*AzureMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec(a.(*v1beta1.AzureMachineSpec), b.(*AzureMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachineStatus)(nil), (*AzureMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus(a.(*v1beta1.AzureMachineStatus), b.(*AzureMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachineTemplateResource)(nil), (*AzureMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource(a.(*v1beta1.AzureMachineTemplateResource), b.(*AzureMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedControlPlaneSpec)(nil), (*AzureManagedControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(a.(*v1beta1.AzureManagedControlPlaneSpec), b.(*AzureManagedControlPlaneSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedControlPlaneStatus)(nil), (*AzureManagedControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(a.(*v1beta1.AzureManagedControlPlaneStatus), b.(*AzureManagedControlPlaneStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedMachinePoolSpec)(nil), (*AzureManagedMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(a.(*v1beta1.AzureManagedMachinePoolSpec), b.(*AzureManagedMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedMachinePoolStatus)(nil), (*AzureManagedMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(a.(*v1beta1.AzureManagedMachinePoolStatus), b.(*AzureManagedMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMarketplaceImage)(nil), (*AzureMarketplaceImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMarketplaceImage_To_v1alpha3_AzureMarketplaceImage(a.(*v1beta1.AzureMarketplaceImage), b.(*AzureMarketplaceImage), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureSharedGalleryImage)(nil), (*AzureSharedGalleryImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage(a.(*v1beta1.AzureSharedGalleryImage), b.(*AzureSharedGalleryImage), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.FrontendIP)(nil), (*FrontendIP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP(a.(*v1beta1.FrontendIP), b.(*FrontendIP), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.Future)(nil), (*Future)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Future_To_v1alpha3_Future(a.(*v1beta1.Future), b.(*Future), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.Image)(nil), (*Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Image_To_v1alpha3_Image(a.(*v1beta1.Image), b.(*Image), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.LoadBalancerSpec)(nil), (*LoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec(a.(*v1beta1.LoadBalancerSpec), b.(*LoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.ManagedControlPlaneSubnet)(nil), (*ManagedControlPlaneSubnet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(a.(*v1beta1.ManagedControlPlaneSubnet), b.(*ManagedControlPlaneSubnet), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.ManagedControlPlaneVirtualNetwork)(nil), (*ManagedControlPlaneVirtualNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork(a.(*v1beta1.ManagedControlPlaneVirtualNetwork), b.(*ManagedControlPlaneVirtualNetwork), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.ManagedDiskParameters)(nil), (*ManagedDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedDiskParameters_To_v1alpha3_ManagedDisk(a.(*v1beta1.ManagedDiskParameters), b.(*ManagedDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*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.AddConversionFunc((*v1beta1.OSDisk)(nil), (*OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(a.(*v1beta1.OSDisk), b.(*OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.PublicIPSpec)(nil), (*PublicIPSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PublicIPSpec_To_v1alpha3_PublicIPSpec(a.(*v1beta1.PublicIPSpec), b.(*PublicIPSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SecurityGroup)(nil), (*SecurityGroup)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup(a.(*v1beta1.SecurityGroup), b.(*SecurityGroup), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SecurityRule)(nil), (*IngressRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule(a.(*v1beta1.SecurityRule), b.(*IngressRule), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SpotVMOptions)(nil), (*SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(a.(*v1beta1.SpotVMOptions), b.(*SpotVMOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SubnetSpec)(nil), (*SubnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(a.(*v1beta1.SubnetSpec), b.(*SubnetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VnetSpec)(nil), (*VnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(a.(*v1beta1.VnetSpec), b.(*VnetSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_AADProfile_To_v1beta1_AADProfile(in *AADProfile, out *v1beta1.AADProfile, s conversion.Scope) error { - out.Managed = in.Managed - out.AdminGroupObjectIDs = *(*[]string)(unsafe.Pointer(&in.AdminGroupObjectIDs)) - return nil -} - -// Convert_v1alpha3_AADProfile_To_v1beta1_AADProfile is an autogenerated conversion function. -func Convert_v1alpha3_AADProfile_To_v1beta1_AADProfile(in *AADProfile, out *v1beta1.AADProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_AADProfile_To_v1beta1_AADProfile(in, out, s) -} - -func autoConvert_v1beta1_AADProfile_To_v1alpha3_AADProfile(in *v1beta1.AADProfile, out *AADProfile, s conversion.Scope) error { - out.Managed = in.Managed - out.AdminGroupObjectIDs = *(*[]string)(unsafe.Pointer(&in.AdminGroupObjectIDs)) - return nil -} - -// Convert_v1beta1_AADProfile_To_v1alpha3_AADProfile is an autogenerated conversion function. -func Convert_v1beta1_AADProfile_To_v1alpha3_AADProfile(in *v1beta1.AADProfile, out *AADProfile, s conversion.Scope) error { - return autoConvert_v1beta1_AADProfile_To_v1alpha3_AADProfile(in, out, s) -} - -func autoConvert_v1alpha3_AddressRecord_To_v1beta1_AddressRecord(in *AddressRecord, out *v1beta1.AddressRecord, s conversion.Scope) error { - out.Hostname = in.Hostname - out.IP = in.IP - return nil -} - -// Convert_v1alpha3_AddressRecord_To_v1beta1_AddressRecord is an autogenerated conversion function. -func Convert_v1alpha3_AddressRecord_To_v1beta1_AddressRecord(in *AddressRecord, out *v1beta1.AddressRecord, s conversion.Scope) error { - return autoConvert_v1alpha3_AddressRecord_To_v1beta1_AddressRecord(in, out, s) -} - -func autoConvert_v1beta1_AddressRecord_To_v1alpha3_AddressRecord(in *v1beta1.AddressRecord, out *AddressRecord, s conversion.Scope) error { - out.Hostname = in.Hostname - out.IP = in.IP - return nil -} - -// Convert_v1beta1_AddressRecord_To_v1alpha3_AddressRecord is an autogenerated conversion function. -func Convert_v1beta1_AddressRecord_To_v1alpha3_AddressRecord(in *v1beta1.AddressRecord, out *AddressRecord, s conversion.Scope) error { - return autoConvert_v1beta1_AddressRecord_To_v1alpha3_AddressRecord(in, out, s) -} - -func autoConvert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster(in *AzureCluster, out *v1beta1.AzureCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster is an autogenerated conversion function. -func Convert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster(in *AzureCluster, out *v1beta1.AzureCluster, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster(in, out, s) -} - -func autoConvert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster(in *v1beta1.AzureCluster, out *AzureCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster is an autogenerated conversion function. -func Convert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster(in *v1beta1.AzureCluster, out *AzureCluster, s conversion.Scope) error { - return autoConvert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster(in, out, s) -} - -func autoConvert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(in *AzureClusterIdentity, out *v1beta1.AzureClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity is an autogenerated conversion function. -func Convert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(in *AzureClusterIdentity, out *v1beta1.AzureClusterIdentity, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity(in *v1beta1.AzureClusterIdentity, out *AzureClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha3_AzureClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity(in *v1beta1.AzureClusterIdentity, out *AzureClusterIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity(in, out, s) -} - -func autoConvert_v1alpha3_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(in *AzureClusterIdentityList, out *v1beta1.AzureClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureClusterIdentity, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList is an autogenerated conversion function. -func Convert_v1alpha3_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(in *AzureClusterIdentityList, out *v1beta1.AzureClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentityList_To_v1alpha3_AzureClusterIdentityList(in *v1beta1.AzureClusterIdentityList, out *AzureClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureClusterIdentity, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureClusterIdentity_To_v1alpha3_AzureClusterIdentity(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureClusterIdentityList_To_v1alpha3_AzureClusterIdentityList is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentityList_To_v1alpha3_AzureClusterIdentityList(in *v1beta1.AzureClusterIdentityList, out *AzureClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentityList_To_v1alpha3_AzureClusterIdentityList(in, out, s) -} - -func autoConvert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(in *AzureClusterIdentitySpec, out *v1beta1.AzureClusterIdentitySpec, s conversion.Scope) error { - out.Type = v1beta1.IdentityType(in.Type) - out.ResourceID = in.ResourceID - out.ClientID = in.ClientID - out.ClientSecret = in.ClientSecret - out.TenantID = in.TenantID - // WARNING: in.AllowedNamespaces requires manual conversion: inconvertible types ([]string vs *sigs.k8s.io/cluster-api-provider-azure/api/v1beta1.AllowedNamespaces) - return nil -} - -func autoConvert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec(in *v1beta1.AzureClusterIdentitySpec, out *AzureClusterIdentitySpec, s conversion.Scope) error { - out.Type = IdentityType(in.Type) - out.ResourceID = in.ResourceID - out.ClientID = in.ClientID - out.ClientSecret = in.ClientSecret - out.TenantID = in.TenantID - // WARNING: in.AllowedNamespaces requires manual conversion: inconvertible types (*sigs.k8s.io/cluster-api-provider-azure/api/v1beta1.AllowedNamespaces vs []string) - return nil -} - -func autoConvert_v1alpha3_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(in *AzureClusterIdentityStatus, out *v1beta1.AzureClusterIdentityStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -// Convert_v1alpha3_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(in *AzureClusterIdentityStatus, out *v1beta1.AzureClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentityStatus_To_v1alpha3_AzureClusterIdentityStatus(in *v1beta1.AzureClusterIdentityStatus, out *AzureClusterIdentityStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -// Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha3_AzureClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha3_AzureClusterIdentityStatus(in *v1beta1.AzureClusterIdentityStatus, out *AzureClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentityStatus_To_v1alpha3_AzureClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureClusterList_To_v1beta1_AzureClusterList(in *AzureClusterList, out *v1beta1.AzureClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureCluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureCluster_To_v1beta1_AzureCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureClusterList_To_v1beta1_AzureClusterList is an autogenerated conversion function. -func Convert_v1alpha3_AzureClusterList_To_v1beta1_AzureClusterList(in *AzureClusterList, out *v1beta1.AzureClusterList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureClusterList_To_v1beta1_AzureClusterList(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterList_To_v1alpha3_AzureClusterList(in *v1beta1.AzureClusterList, out *AzureClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureCluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureCluster_To_v1alpha3_AzureCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureClusterList_To_v1alpha3_AzureClusterList is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterList_To_v1alpha3_AzureClusterList(in *v1beta1.AzureClusterList, out *AzureClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterList_To_v1alpha3_AzureClusterList(in, out, s) -} - -func autoConvert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec(in *AzureClusterSpec, out *v1beta1.AzureClusterSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(&in.NetworkSpec, &out.NetworkSpec, s); err != nil { - return err - } - out.ResourceGroup = in.ResourceGroup - // WARNING: in.SubscriptionID requires manual conversion: does not exist in peer-type - // WARNING: in.Location requires manual conversion: does not exist in peer-type - if err := apiv1alpha3.Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - // WARNING: in.AdditionalTags requires manual conversion: does not exist in peer-type - // WARNING: in.IdentityRef requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec(in *v1beta1.AzureClusterSpec, out *AzureClusterSpec, s conversion.Scope) error { - // WARNING: in.AzureClusterClassSpec requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(&in.NetworkSpec, &out.NetworkSpec, s); err != nil { - return err - } - out.ResourceGroup = in.ResourceGroup - // WARNING: in.BastionSpec requires manual conversion: does not exist in peer-type - if err := apiv1alpha3.Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus(in *AzureClusterStatus, out *v1beta1.AzureClusterStatus, s conversion.Scope) error { - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1beta1.FailureDomains, len(*in)) - for key, val := range *in { - newVal := new(apiv1beta1.FailureDomainSpec) - if err := apiv1alpha3.Convert_v1alpha3_FailureDomainSpec_To_v1beta1_FailureDomainSpec(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.FailureDomains = nil - } - out.Ready = in.Ready - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -func autoConvert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus(in *v1beta1.AzureClusterStatus, out *AzureClusterStatus, s conversion.Scope) error { - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1alpha3.FailureDomains, len(*in)) - for key, val := range *in { - newVal := new(apiv1alpha3.FailureDomainSpec) - if err := apiv1alpha3.Convert_v1beta1_FailureDomainSpec_To_v1alpha3_FailureDomainSpec(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.FailureDomains = nil - } - out.Ready = in.Ready - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - // WARNING: in.LongRunningOperationStates requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine(in *AzureMachine, out *v1beta1.AzureMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine(in *AzureMachine, out *v1beta1.AzureMachine, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine(in *v1beta1.AzureMachine, out *AzureMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine(in *v1beta1.AzureMachine, out *AzureMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachineList_To_v1beta1_AzureMachineList(in *AzureMachineList, out *v1beta1.AzureMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureMachine, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureMachine_To_v1beta1_AzureMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureMachineList_To_v1beta1_AzureMachineList is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachineList_To_v1beta1_AzureMachineList(in *AzureMachineList, out *v1beta1.AzureMachineList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineList_To_v1beta1_AzureMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineList_To_v1alpha3_AzureMachineList(in *v1beta1.AzureMachineList, out *AzureMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachine, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureMachine_To_v1alpha3_AzureMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureMachineList_To_v1alpha3_AzureMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineList_To_v1alpha3_AzureMachineList(in *v1beta1.AzureMachineList, out *AzureMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineList_To_v1alpha3_AzureMachineList(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec(in *AzureMachineSpec, out *v1beta1.AzureMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - // WARNING: in.AvailabilityZone requires manual conversion: does not exist in peer-type - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(v1beta1.Image) - if err := Convert_v1alpha3_Image_To_v1beta1_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - out.Identity = v1beta1.VMIdentity(in.Identity) - out.UserAssignedIdentities = *(*[]v1beta1.UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - out.RoleAssignmentName = in.RoleAssignmentName - if err := Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]v1beta1.DataDisk, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_DataDisk_To_v1beta1_DataDisk(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.DataDisks = nil - } - // WARNING: in.Location requires manual conversion: does not exist in peer-type - out.SSHPublicKey = in.SSHPublicKey - out.AdditionalTags = *(*v1beta1.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.AllocatePublicIP = in.AllocatePublicIP - out.EnableIPForwarding = in.EnableIPForwarding - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(v1beta1.SpotVMOptions) - if err := Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - out.SecurityProfile = (*v1beta1.SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - return nil -} - -func autoConvert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec(in *v1beta1.AzureMachineSpec, out *AzureMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(Image) - if err := Convert_v1beta1_Image_To_v1alpha3_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - out.Identity = VMIdentity(in.Identity) - out.UserAssignedIdentities = *(*[]UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - // WARNING: in.SystemAssignedIdentityRole requires manual conversion: does not exist in peer-type - out.RoleAssignmentName = in.RoleAssignmentName - if err := Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]DataDisk, len(*in)) - for i := range *in { - if err := Convert_v1beta1_DataDisk_To_v1alpha3_DataDisk(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.DataDisks = nil - } - out.SSHPublicKey = in.SSHPublicKey - out.AdditionalTags = *(*Tags)(unsafe.Pointer(&in.AdditionalTags)) - // WARNING: in.AdditionalCapabilities requires manual conversion: does not exist in peer-type - out.AllocatePublicIP = in.AllocatePublicIP - out.EnableIPForwarding = in.EnableIPForwarding - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - // WARNING: in.Diagnostics requires manual conversion: does not exist in peer-type - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(SpotVMOptions) - if err := Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - out.SecurityProfile = (*SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - // WARNING: in.SubnetName requires manual conversion: does not exist in peer-type - // WARNING: in.DNSServers requires manual conversion: does not exist in peer-type - // WARNING: in.VMExtensions requires manual conversion: does not exist in peer-type - // WARNING: in.NetworkInterfaces requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus(in *AzureMachineStatus, out *v1beta1.AzureMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*v1beta1.ProvisioningState)(unsafe.Pointer(in.VMState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha3.Convert_v1alpha3_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -func autoConvert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus(in *v1beta1.AzureMachineStatus, out *AzureMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*VMState)(unsafe.Pointer(in.VMState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha3.Convert_v1beta1_Condition_To_v1alpha3_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - // WARNING: in.LongRunningOperationStates requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(in *AzureMachineTemplate, out *v1beta1.AzureMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(in *AzureMachineTemplate, out *v1beta1.AzureMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate(in *v1beta1.AzureMachineTemplate, out *AzureMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha3_AzureMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate(in *v1beta1.AzureMachineTemplate, out *AzureMachineTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(in *AzureMachineTemplateList, out *v1beta1.AzureMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(in *AzureMachineTemplateList, out *v1beta1.AzureMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplateList_To_v1alpha3_AzureMachineTemplateList(in *v1beta1.AzureMachineTemplateList, out *AzureMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureMachineTemplate_To_v1alpha3_AzureMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureMachineTemplateList_To_v1alpha3_AzureMachineTemplateList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineTemplateList_To_v1alpha3_AzureMachineTemplateList(in *v1beta1.AzureMachineTemplateList, out *AzureMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplateList_To_v1alpha3_AzureMachineTemplateList(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(in *AzureMachineTemplateResource, out *v1beta1.AzureMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(in *AzureMachineTemplateResource, out *v1beta1.AzureMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource(in *v1beta1.AzureMachineTemplateResource, out *AzureMachineTemplateResource, s conversion.Scope) error { - // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(in *AzureMachineTemplateSpec, out *v1beta1.AzureMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(in *AzureMachineTemplateSpec, out *v1beta1.AzureMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplateSpec_To_v1alpha3_AzureMachineTemplateSpec(in *v1beta1.AzureMachineTemplateSpec, out *AzureMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha3_AzureMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha3_AzureMachineTemplateSpec(in *v1beta1.AzureMachineTemplateSpec, out *AzureMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplateSpec_To_v1alpha3_AzureMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(in *AzureManagedCluster, out *v1beta1.AzureManagedCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(in *AzureManagedCluster, out *v1beta1.AzureManagedCluster, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(in *v1beta1.AzureManagedCluster, out *AzureManagedCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha3_AzureManagedClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha3_AzureManagedClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(in *v1beta1.AzureManagedCluster, out *AzureManagedCluster, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(in *AzureManagedClusterList, out *v1beta1.AzureManagedClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureManagedCluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(in *AzureManagedClusterList, out *v1beta1.AzureManagedClusterList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList(in *v1beta1.AzureManagedClusterList, out *AzureManagedClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedCluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList(in *v1beta1.AzureManagedClusterList, out *AzureManagedClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(in *AzureManagedClusterSpec, out *v1beta1.AzureManagedClusterSpec, s conversion.Scope) error { - if err := apiv1alpha3.Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(in *AzureManagedClusterSpec, out *v1beta1.AzureManagedClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedClusterSpec_To_v1alpha3_AzureManagedClusterSpec(in *v1beta1.AzureManagedClusterSpec, out *AzureManagedClusterSpec, s conversion.Scope) error { - if err := apiv1alpha3.Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha3_AzureManagedClusterSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha3_AzureManagedClusterSpec(in *v1beta1.AzureManagedClusterSpec, out *AzureManagedClusterSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedClusterSpec_To_v1alpha3_AzureManagedClusterSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(in *AzureManagedClusterStatus, out *v1beta1.AzureManagedClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha3_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(in *AzureManagedClusterStatus, out *v1beta1.AzureManagedClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedClusterStatus_To_v1alpha3_AzureManagedClusterStatus(in *v1beta1.AzureManagedClusterStatus, out *AzureManagedClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - return nil -} - -// Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha3_AzureManagedClusterStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha3_AzureManagedClusterStatus(in *v1beta1.AzureManagedClusterStatus, out *AzureManagedClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedClusterStatus_To_v1alpha3_AzureManagedClusterStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(in *AzureManagedControlPlane, out *v1beta1.AzureManagedControlPlane, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(in *AzureManagedControlPlane, out *v1beta1.AzureManagedControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(in *v1beta1.AzureManagedControlPlane, out *AzureManagedControlPlane, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(in *v1beta1.AzureManagedControlPlane, out *AzureManagedControlPlane, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(in *AzureManagedControlPlaneList, out *v1beta1.AzureManagedControlPlaneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureManagedControlPlane, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(in *AzureManagedControlPlaneList, out *v1beta1.AzureManagedControlPlaneList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList(in *v1beta1.AzureManagedControlPlaneList, out *AzureManagedControlPlaneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedControlPlane, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList(in *v1beta1.AzureManagedControlPlaneList, out *AzureManagedControlPlaneList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(in *AzureManagedControlPlaneSpec, out *v1beta1.AzureManagedControlPlaneSpec, s conversion.Scope) error { - out.Version = in.Version - out.ResourceGroupName = in.ResourceGroupName - out.NodeResourceGroupName = in.NodeResourceGroupName - if err := Convert_v1alpha3_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(&in.VirtualNetwork, &out.VirtualNetwork, s); err != nil { - return err - } - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - if err := apiv1alpha3.Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.AdditionalTags = *(*v1beta1.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.NetworkPlugin = (*string)(unsafe.Pointer(in.NetworkPlugin)) - out.NetworkPolicy = (*string)(unsafe.Pointer(in.NetworkPolicy)) - out.SSHPublicKey = in.SSHPublicKey - out.DNSServiceIP = (*string)(unsafe.Pointer(in.DNSServiceIP)) - out.LoadBalancerSKU = (*string)(unsafe.Pointer(in.LoadBalancerSKU)) - out.AADProfile = (*v1beta1.AADProfile)(unsafe.Pointer(in.AADProfile)) - return nil -} - -// Convert_v1alpha3_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(in *AzureManagedControlPlaneSpec, out *v1beta1.AzureManagedControlPlaneSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(in *v1beta1.AzureManagedControlPlaneSpec, out *AzureManagedControlPlaneSpec, s conversion.Scope) error { - out.Version = in.Version - out.ResourceGroupName = in.ResourceGroupName - out.NodeResourceGroupName = in.NodeResourceGroupName - if err := Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork(&in.VirtualNetwork, &out.VirtualNetwork, s); err != nil { - return err - } - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - if err := apiv1alpha3.Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.AdditionalTags = *(*Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.NetworkPlugin = (*string)(unsafe.Pointer(in.NetworkPlugin)) - out.NetworkPolicy = (*string)(unsafe.Pointer(in.NetworkPolicy)) - // WARNING: in.OutboundType requires manual conversion: does not exist in peer-type - out.SSHPublicKey = in.SSHPublicKey - out.DNSServiceIP = (*string)(unsafe.Pointer(in.DNSServiceIP)) - out.LoadBalancerSKU = (*string)(unsafe.Pointer(in.LoadBalancerSKU)) - // WARNING: in.IdentityRef requires manual conversion: does not exist in peer-type - out.AADProfile = (*AADProfile)(unsafe.Pointer(in.AADProfile)) - // WARNING: in.AddonProfiles requires manual conversion: does not exist in peer-type - // WARNING: in.SKU requires manual conversion: does not exist in peer-type - // WARNING: in.LoadBalancerProfile requires manual conversion: does not exist in peer-type - // WARNING: in.APIServerAccessProfile requires manual conversion: does not exist in peer-type - // WARNING: in.AutoScalerProfile requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(in *AzureManagedControlPlaneStatus, out *v1beta1.AzureManagedControlPlaneStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Initialized = in.Initialized - return nil -} - -// Convert_v1alpha3_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(in *AzureManagedControlPlaneStatus, out *v1beta1.AzureManagedControlPlaneStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(in *v1beta1.AzureManagedControlPlaneStatus, out *AzureManagedControlPlaneStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Initialized = in.Initialized - // WARNING: in.Conditions requires manual conversion: does not exist in peer-type - // WARNING: in.LongRunningOperationStates requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(in *AzureManagedMachinePool, out *v1beta1.AzureManagedMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(in *AzureManagedMachinePool, out *v1beta1.AzureManagedMachinePool, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(in *v1beta1.AzureManagedMachinePool, out *AzureManagedMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(in *v1beta1.AzureManagedMachinePool, out *AzureManagedMachinePool, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(in *AzureManagedMachinePoolList, out *v1beta1.AzureManagedMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureManagedMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(in *AzureManagedMachinePoolList, out *v1beta1.AzureManagedMachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList(in *v1beta1.AzureManagedMachinePoolList, out *AzureManagedMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList(in *v1beta1.AzureManagedMachinePoolList, out *AzureManagedMachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList(in, out, s) -} - -func autoConvert_v1alpha3_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(in *AzureManagedMachinePoolSpec, out *v1beta1.AzureManagedMachinePoolSpec, s conversion.Scope) error { - out.Mode = in.Mode - out.SKU = in.SKU - out.OSDiskSizeGB = (*int32)(unsafe.Pointer(in.OSDiskSizeGB)) - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - return nil -} - -// Convert_v1alpha3_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(in *AzureManagedMachinePoolSpec, out *v1beta1.AzureManagedMachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(in *v1beta1.AzureManagedMachinePoolSpec, out *AzureManagedMachinePoolSpec, s conversion.Scope) error { - // WARNING: in.AdditionalTags requires manual conversion: does not exist in peer-type - // WARNING: in.Name requires manual conversion: does not exist in peer-type - out.Mode = in.Mode - out.SKU = in.SKU - out.OSDiskSizeGB = (*int32)(unsafe.Pointer(in.OSDiskSizeGB)) - // WARNING: in.AvailabilityZones requires manual conversion: does not exist in peer-type - // WARNING: in.NodeLabels requires manual conversion: does not exist in peer-type - // WARNING: in.Taints requires manual conversion: does not exist in peer-type - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - // WARNING: in.Scaling requires manual conversion: does not exist in peer-type - // WARNING: in.MaxPods requires manual conversion: does not exist in peer-type - // WARNING: in.OsDiskType requires manual conversion: does not exist in peer-type - // WARNING: in.EnableUltraSSD requires manual conversion: does not exist in peer-type - // WARNING: in.OSType requires manual conversion: does not exist in peer-type - // WARNING: in.EnableNodePublicIP requires manual conversion: does not exist in peer-type - // WARNING: in.NodePublicIPPrefixID requires manual conversion: does not exist in peer-type - // WARNING: in.ScaleSetPriority requires manual conversion: does not exist in peer-type - // WARNING: in.KubeletConfig requires manual conversion: does not exist in peer-type - // WARNING: in.KubeletDiskType requires manual conversion: does not exist in peer-type - // WARNING: in.LinuxOSConfig requires manual conversion: does not exist in peer-type - // WARNING: in.SubnetName requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(in *AzureManagedMachinePoolStatus, out *v1beta1.AzureManagedMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - return nil -} - -// Convert_v1alpha3_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(in *AzureManagedMachinePoolStatus, out *v1beta1.AzureManagedMachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(in *v1beta1.AzureManagedMachinePoolStatus, out *AzureManagedMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - // WARNING: in.Conditions requires manual conversion: does not exist in peer-type - // WARNING: in.LongRunningOperationStates requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(in *AzureMarketplaceImage, out *v1beta1.AzureMarketplaceImage, s conversion.Scope) error { - // WARNING: in.Publisher requires manual conversion: does not exist in peer-type - // WARNING: in.Offer requires manual conversion: does not exist in peer-type - // WARNING: in.SKU requires manual conversion: does not exist in peer-type - out.Version = in.Version - out.ThirdPartyImage = in.ThirdPartyImage - return nil -} - -func autoConvert_v1beta1_AzureMarketplaceImage_To_v1alpha3_AzureMarketplaceImage(in *v1beta1.AzureMarketplaceImage, out *AzureMarketplaceImage, s conversion.Scope) error { - // WARNING: in.ImagePlan requires manual conversion: does not exist in peer-type - out.Version = in.Version - out.ThirdPartyImage = in.ThirdPartyImage - return nil -} - -func autoConvert_v1alpha3_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(in *AzureSharedGalleryImage, out *v1beta1.AzureSharedGalleryImage, s conversion.Scope) error { - out.SubscriptionID = in.SubscriptionID - out.ResourceGroup = in.ResourceGroup - out.Gallery = in.Gallery - out.Name = in.Name - out.Version = in.Version - return nil -} - -// Convert_v1alpha3_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage is an autogenerated conversion function. -func Convert_v1alpha3_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(in *AzureSharedGalleryImage, out *v1beta1.AzureSharedGalleryImage, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(in, out, s) -} - -func autoConvert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage(in *v1beta1.AzureSharedGalleryImage, out *AzureSharedGalleryImage, s conversion.Scope) error { - out.SubscriptionID = in.SubscriptionID - out.ResourceGroup = in.ResourceGroup - out.Gallery = in.Gallery - out.Name = in.Name - out.Version = in.Version - // WARNING: in.Publisher requires manual conversion: does not exist in peer-type - // WARNING: in.Offer requires manual conversion: does not exist in peer-type - // WARNING: in.SKU requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_BuildParams_To_v1beta1_BuildParams(in *BuildParams, out *v1beta1.BuildParams, s conversion.Scope) error { - out.Lifecycle = v1beta1.ResourceLifecycle(in.Lifecycle) - out.ClusterName = in.ClusterName - out.ResourceID = in.ResourceID - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Role = (*string)(unsafe.Pointer(in.Role)) - out.Additional = *(*v1beta1.Tags)(unsafe.Pointer(&in.Additional)) - return nil -} - -// Convert_v1alpha3_BuildParams_To_v1beta1_BuildParams is an autogenerated conversion function. -func Convert_v1alpha3_BuildParams_To_v1beta1_BuildParams(in *BuildParams, out *v1beta1.BuildParams, s conversion.Scope) error { - return autoConvert_v1alpha3_BuildParams_To_v1beta1_BuildParams(in, out, s) -} - -func autoConvert_v1beta1_BuildParams_To_v1alpha3_BuildParams(in *v1beta1.BuildParams, out *BuildParams, s conversion.Scope) error { - out.Lifecycle = ResourceLifecycle(in.Lifecycle) - out.ClusterName = in.ClusterName - out.ResourceID = in.ResourceID - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Role = (*string)(unsafe.Pointer(in.Role)) - out.Additional = *(*Tags)(unsafe.Pointer(&in.Additional)) - return nil -} - -// Convert_v1beta1_BuildParams_To_v1alpha3_BuildParams is an autogenerated conversion function. -func Convert_v1beta1_BuildParams_To_v1alpha3_BuildParams(in *v1beta1.BuildParams, out *BuildParams, s conversion.Scope) error { - return autoConvert_v1beta1_BuildParams_To_v1alpha3_BuildParams(in, out, s) -} - -func autoConvert_v1alpha3_DataDisk_To_v1beta1_DataDisk(in *DataDisk, out *v1beta1.DataDisk, s conversion.Scope) error { - out.NameSuffix = in.NameSuffix - out.DiskSizeGB = in.DiskSizeGB - if in.ManagedDisk != nil { - in, out := &in.ManagedDisk, &out.ManagedDisk - *out = new(v1beta1.ManagedDiskParameters) - if err := Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDiskParameters(*in, *out, s); err != nil { - return err - } - } else { - out.ManagedDisk = nil - } - out.Lun = (*int32)(unsafe.Pointer(in.Lun)) - out.CachingType = in.CachingType - return nil -} - -// Convert_v1alpha3_DataDisk_To_v1beta1_DataDisk is an autogenerated conversion function. -func Convert_v1alpha3_DataDisk_To_v1beta1_DataDisk(in *DataDisk, out *v1beta1.DataDisk, s conversion.Scope) error { - return autoConvert_v1alpha3_DataDisk_To_v1beta1_DataDisk(in, out, s) -} - -func autoConvert_v1beta1_DataDisk_To_v1alpha3_DataDisk(in *v1beta1.DataDisk, out *DataDisk, s conversion.Scope) error { - out.NameSuffix = in.NameSuffix - out.DiskSizeGB = in.DiskSizeGB - if in.ManagedDisk != nil { - in, out := &in.ManagedDisk, &out.ManagedDisk - *out = new(ManagedDisk) - if err := Convert_v1beta1_ManagedDiskParameters_To_v1alpha3_ManagedDisk(*in, *out, s); err != nil { - return err - } - } else { - out.ManagedDisk = nil - } - out.Lun = (*int32)(unsafe.Pointer(in.Lun)) - out.CachingType = in.CachingType - return nil -} - -// Convert_v1beta1_DataDisk_To_v1alpha3_DataDisk is an autogenerated conversion function. -func Convert_v1beta1_DataDisk_To_v1alpha3_DataDisk(in *v1beta1.DataDisk, out *DataDisk, s conversion.Scope) error { - return autoConvert_v1beta1_DataDisk_To_v1alpha3_DataDisk(in, out, s) -} - -func autoConvert_v1alpha3_DiffDiskSettings_To_v1beta1_DiffDiskSettings(in *DiffDiskSettings, out *v1beta1.DiffDiskSettings, s conversion.Scope) error { - out.Option = in.Option - return nil -} - -// Convert_v1alpha3_DiffDiskSettings_To_v1beta1_DiffDiskSettings is an autogenerated conversion function. -func Convert_v1alpha3_DiffDiskSettings_To_v1beta1_DiffDiskSettings(in *DiffDiskSettings, out *v1beta1.DiffDiskSettings, s conversion.Scope) error { - return autoConvert_v1alpha3_DiffDiskSettings_To_v1beta1_DiffDiskSettings(in, out, s) -} - -func autoConvert_v1beta1_DiffDiskSettings_To_v1alpha3_DiffDiskSettings(in *v1beta1.DiffDiskSettings, out *DiffDiskSettings, s conversion.Scope) error { - out.Option = in.Option - return nil -} - -// Convert_v1beta1_DiffDiskSettings_To_v1alpha3_DiffDiskSettings is an autogenerated conversion function. -func Convert_v1beta1_DiffDiskSettings_To_v1alpha3_DiffDiskSettings(in *v1beta1.DiffDiskSettings, out *DiffDiskSettings, s conversion.Scope) error { - return autoConvert_v1beta1_DiffDiskSettings_To_v1alpha3_DiffDiskSettings(in, out, s) -} - -func autoConvert_v1alpha3_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(in *DiskEncryptionSetParameters, out *v1beta1.DiskEncryptionSetParameters, s conversion.Scope) error { - out.ID = in.ID - return nil -} - -// Convert_v1alpha3_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters is an autogenerated conversion function. -func Convert_v1alpha3_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(in *DiskEncryptionSetParameters, out *v1beta1.DiskEncryptionSetParameters, s conversion.Scope) error { - return autoConvert_v1alpha3_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(in, out, s) -} - -func autoConvert_v1beta1_DiskEncryptionSetParameters_To_v1alpha3_DiskEncryptionSetParameters(in *v1beta1.DiskEncryptionSetParameters, out *DiskEncryptionSetParameters, s conversion.Scope) error { - out.ID = in.ID - return nil -} - -// Convert_v1beta1_DiskEncryptionSetParameters_To_v1alpha3_DiskEncryptionSetParameters is an autogenerated conversion function. -func Convert_v1beta1_DiskEncryptionSetParameters_To_v1alpha3_DiskEncryptionSetParameters(in *v1beta1.DiskEncryptionSetParameters, out *DiskEncryptionSetParameters, s conversion.Scope) error { - return autoConvert_v1beta1_DiskEncryptionSetParameters_To_v1alpha3_DiskEncryptionSetParameters(in, out, s) -} - -func autoConvert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP(in *FrontendIP, out *v1beta1.FrontendIP, s conversion.Scope) error { - out.Name = in.Name - // WARNING: in.PrivateIPAddress requires manual conversion: does not exist in peer-type - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(v1beta1.PublicIPSpec) - if err := Convert_v1alpha3_PublicIPSpec_To_v1beta1_PublicIPSpec(*in, *out, s); err != nil { - return err - } - } else { - out.PublicIP = nil - } - return nil -} - -func autoConvert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP(in *v1beta1.FrontendIP, out *FrontendIP, s conversion.Scope) error { - out.Name = in.Name - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(PublicIPSpec) - if err := Convert_v1beta1_PublicIPSpec_To_v1alpha3_PublicIPSpec(*in, *out, s); err != nil { - return err - } - } else { - out.PublicIP = nil - } - // WARNING: in.FrontendIPClass requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_Future_To_v1beta1_Future(in *Future, out *v1beta1.Future, s conversion.Scope) error { - out.Type = in.Type - out.ResourceGroup = in.ResourceGroup - out.Name = in.Name - // WARNING: in.FutureData requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_Future_To_v1alpha3_Future(in *v1beta1.Future, out *Future, s conversion.Scope) error { - out.Type = in.Type - out.ResourceGroup = in.ResourceGroup - // WARNING: in.ServiceName requires manual conversion: does not exist in peer-type - out.Name = in.Name - // WARNING: in.Data requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_Image_To_v1beta1_Image(in *Image, out *v1beta1.Image, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - if in.SharedGallery != nil { - in, out := &in.SharedGallery, &out.SharedGallery - *out = new(v1beta1.AzureSharedGalleryImage) - if err := Convert_v1alpha3_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(*in, *out, s); err != nil { - return err - } - } else { - out.SharedGallery = nil - } - if in.Marketplace != nil { - in, out := &in.Marketplace, &out.Marketplace - *out = new(v1beta1.AzureMarketplaceImage) - if err := Convert_v1alpha3_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(*in, *out, s); err != nil { - return err - } - } else { - out.Marketplace = nil - } - return nil -} - -// Convert_v1alpha3_Image_To_v1beta1_Image is an autogenerated conversion function. -func Convert_v1alpha3_Image_To_v1beta1_Image(in *Image, out *v1beta1.Image, s conversion.Scope) error { - return autoConvert_v1alpha3_Image_To_v1beta1_Image(in, out, s) -} - -func autoConvert_v1beta1_Image_To_v1alpha3_Image(in *v1beta1.Image, out *Image, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - if in.SharedGallery != nil { - in, out := &in.SharedGallery, &out.SharedGallery - *out = new(AzureSharedGalleryImage) - if err := Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage(*in, *out, s); err != nil { - return err - } - } else { - out.SharedGallery = nil - } - if in.Marketplace != nil { - in, out := &in.Marketplace, &out.Marketplace - *out = new(AzureMarketplaceImage) - if err := Convert_v1beta1_AzureMarketplaceImage_To_v1alpha3_AzureMarketplaceImage(*in, *out, s); err != nil { - return err - } - } else { - out.Marketplace = nil - } - // WARNING: in.ComputeGallery requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(in *LoadBalancerSpec, out *v1beta1.LoadBalancerSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - // WARNING: in.SKU requires manual conversion: does not exist in peer-type - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]v1beta1.FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_FrontendIP_To_v1beta1_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - // WARNING: in.Type requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec(in *v1beta1.LoadBalancerSpec, out *LoadBalancerSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1beta1_FrontendIP_To_v1alpha3_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - // WARNING: in.FrontendIPsCount requires manual conversion: does not exist in peer-type - // WARNING: in.BackendPool requires manual conversion: does not exist in peer-type - // WARNING: in.LoadBalancerClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(in *ManagedControlPlaneSubnet, out *v1beta1.ManagedControlPlaneSubnet, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - return nil -} - -// Convert_v1alpha3_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet is an autogenerated conversion function. -func Convert_v1alpha3_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(in *ManagedControlPlaneSubnet, out *v1beta1.ManagedControlPlaneSubnet, s conversion.Scope) error { - return autoConvert_v1alpha3_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(in, out, s) -} - -func autoConvert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(in *v1beta1.ManagedControlPlaneSubnet, out *ManagedControlPlaneSubnet, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - // WARNING: in.ServiceEndpoints requires manual conversion: does not exist in peer-type - // WARNING: in.PrivateEndpoints requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(in *ManagedControlPlaneVirtualNetwork, out *v1beta1.ManagedControlPlaneVirtualNetwork, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - if err := Convert_v1alpha3_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(&in.Subnet, &out.Subnet, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork is an autogenerated conversion function. -func Convert_v1alpha3_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(in *ManagedControlPlaneVirtualNetwork, out *v1beta1.ManagedControlPlaneVirtualNetwork, s conversion.Scope) error { - return autoConvert_v1alpha3_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(in, out, s) -} - -func autoConvert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork(in *v1beta1.ManagedControlPlaneVirtualNetwork, out *ManagedControlPlaneVirtualNetwork, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - if err := Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(&in.Subnet, &out.Subnet, s); err != nil { - return err - } - // WARNING: in.ResourceGroup requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(v1beta1.Subnets, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Subnets = nil - } - if err := Convert_v1alpha3_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(&in.APIServerLB, &out.APIServerLB, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(Subnets, len(*in)) - for i := range *in { - if err := Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Subnets = nil - } - if err := Convert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec(&in.APIServerLB, &out.APIServerLB, s); err != nil { - return err - } - // WARNING: in.NodeOutboundLB requires manual conversion: does not exist in peer-type - // WARNING: in.ControlPlaneOutboundLB requires manual conversion: does not exist in peer-type - // WARNING: in.NetworkClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_PublicIPSpec_To_v1beta1_PublicIPSpec(in *PublicIPSpec, out *v1beta1.PublicIPSpec, s conversion.Scope) error { - out.Name = in.Name - out.DNSName = in.DNSName - return nil -} - -// Convert_v1alpha3_PublicIPSpec_To_v1beta1_PublicIPSpec is an autogenerated conversion function. -func Convert_v1alpha3_PublicIPSpec_To_v1beta1_PublicIPSpec(in *PublicIPSpec, out *v1beta1.PublicIPSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_PublicIPSpec_To_v1beta1_PublicIPSpec(in, out, s) -} - -func autoConvert_v1beta1_PublicIPSpec_To_v1alpha3_PublicIPSpec(in *v1beta1.PublicIPSpec, out *PublicIPSpec, s conversion.Scope) error { - out.Name = in.Name - out.DNSName = in.DNSName - // WARNING: in.IPTags requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_RouteTable_To_v1beta1_RouteTable(in *RouteTable, out *v1beta1.RouteTable, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - return nil -} - -// Convert_v1alpha3_RouteTable_To_v1beta1_RouteTable is an autogenerated conversion function. -func Convert_v1alpha3_RouteTable_To_v1beta1_RouteTable(in *RouteTable, out *v1beta1.RouteTable, s conversion.Scope) error { - return autoConvert_v1alpha3_RouteTable_To_v1beta1_RouteTable(in, out, s) -} - -func autoConvert_v1beta1_RouteTable_To_v1alpha3_RouteTable(in *v1beta1.RouteTable, out *RouteTable, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - return nil -} - -// Convert_v1beta1_RouteTable_To_v1alpha3_RouteTable is an autogenerated conversion function. -func Convert_v1beta1_RouteTable_To_v1alpha3_RouteTable(in *v1beta1.RouteTable, out *RouteTable, s conversion.Scope) error { - return autoConvert_v1beta1_RouteTable_To_v1alpha3_RouteTable(in, out, s) -} - -func autoConvert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup(in *SecurityGroup, out *v1beta1.SecurityGroup, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - // WARNING: in.IngressRules requires manual conversion: does not exist in peer-type - // WARNING: in.Tags requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup(in *v1beta1.SecurityGroup, out *SecurityGroup, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - // WARNING: in.SecurityGroupClass requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_SecurityProfile_To_v1beta1_SecurityProfile(in *SecurityProfile, out *v1beta1.SecurityProfile, s conversion.Scope) error { - out.EncryptionAtHost = (*bool)(unsafe.Pointer(in.EncryptionAtHost)) - return nil -} - -// Convert_v1alpha3_SecurityProfile_To_v1beta1_SecurityProfile is an autogenerated conversion function. -func Convert_v1alpha3_SecurityProfile_To_v1beta1_SecurityProfile(in *SecurityProfile, out *v1beta1.SecurityProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_SecurityProfile_To_v1beta1_SecurityProfile(in, out, s) -} - -func autoConvert_v1beta1_SecurityProfile_To_v1alpha3_SecurityProfile(in *v1beta1.SecurityProfile, out *SecurityProfile, s conversion.Scope) error { - out.EncryptionAtHost = (*bool)(unsafe.Pointer(in.EncryptionAtHost)) - return nil -} - -// Convert_v1beta1_SecurityProfile_To_v1alpha3_SecurityProfile is an autogenerated conversion function. -func Convert_v1beta1_SecurityProfile_To_v1alpha3_SecurityProfile(in *v1beta1.SecurityProfile, out *SecurityProfile, s conversion.Scope) error { - return autoConvert_v1beta1_SecurityProfile_To_v1alpha3_SecurityProfile(in, out, s) -} - -func autoConvert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(in *SpotVMOptions, out *v1beta1.SpotVMOptions, s conversion.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - return nil -} - -// Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions is an autogenerated conversion function. -func Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(in *SpotVMOptions, out *v1beta1.SpotVMOptions, s conversion.Scope) error { - return autoConvert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(in, out, s) -} - -func autoConvert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(in *v1beta1.SpotVMOptions, out *SpotVMOptions, s conversion.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - // WARNING: in.EvictionPolicy requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *v1beta1.SubnetSpec, s conversion.Scope) error { - // WARNING: in.Role requires manual conversion: does not exist in peer-type - out.ID = in.ID - // WARNING: in.Name requires manual conversion: does not exist in peer-type - // WARNING: in.CidrBlock requires manual conversion: does not exist in peer-type - // WARNING: in.CIDRBlocks requires manual conversion: does not exist in peer-type - // WARNING: in.InternalLBIPAddress requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup(&in.SecurityGroup, &out.SecurityGroup, s); err != nil { - return err - } - if err := Convert_v1alpha3_RouteTable_To_v1beta1_RouteTable(&in.RouteTable, &out.RouteTable, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(in *v1beta1.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { - out.ID = in.ID - if err := Convert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup(&in.SecurityGroup, &out.SecurityGroup, s); err != nil { - return err - } - if err := Convert_v1beta1_RouteTable_To_v1alpha3_RouteTable(&in.RouteTable, &out.RouteTable, s); err != nil { - return err - } - // WARNING: in.NatGateway requires manual conversion: does not exist in peer-type - // WARNING: in.SubnetClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(in *UserAssignedIdentity, out *v1beta1.UserAssignedIdentity, s conversion.Scope) error { - out.ProviderID = in.ProviderID - return nil -} - -// Convert_v1alpha3_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity is an autogenerated conversion function. -func Convert_v1alpha3_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(in *UserAssignedIdentity, out *v1beta1.UserAssignedIdentity, s conversion.Scope) error { - return autoConvert_v1alpha3_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(in, out, s) -} - -func autoConvert_v1beta1_UserAssignedIdentity_To_v1alpha3_UserAssignedIdentity(in *v1beta1.UserAssignedIdentity, out *UserAssignedIdentity, s conversion.Scope) error { - out.ProviderID = in.ProviderID - return nil -} - -// Convert_v1beta1_UserAssignedIdentity_To_v1alpha3_UserAssignedIdentity is an autogenerated conversion function. -func Convert_v1beta1_UserAssignedIdentity_To_v1alpha3_UserAssignedIdentity(in *v1beta1.UserAssignedIdentity, out *UserAssignedIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_UserAssignedIdentity_To_v1alpha3_UserAssignedIdentity(in, out, s) -} - -func autoConvert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *v1beta1.VnetSpec, s conversion.Scope) error { - out.ResourceGroup = in.ResourceGroup - out.ID = in.ID - out.Name = in.Name - // WARNING: in.CidrBlock requires manual conversion: does not exist in peer-type - // WARNING: in.CIDRBlocks requires manual conversion: does not exist in peer-type - // WARNING: in.Tags requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(in *v1beta1.VnetSpec, out *VnetSpec, s conversion.Scope) error { - out.ResourceGroup = in.ResourceGroup - out.ID = in.ID - out.Name = in.Name - // WARNING: in.Peerings requires manual conversion: does not exist in peer-type - // WARNING: in.VnetClassSpec requires manual conversion: does not exist in peer-type - return nil -} diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index ea5533c632f..00000000000 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,1477 +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 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 *AADProfile) DeepCopyInto(out *AADProfile) { - *out = *in - if in.AdminGroupObjectIDs != nil { - in, out := &in.AdminGroupObjectIDs, &out.AdminGroupObjectIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AADProfile. -func (in *AADProfile) DeepCopy() *AADProfile { - if in == nil { - return nil - } - out := new(AADProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressRecord) DeepCopyInto(out *AddressRecord) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressRecord. -func (in *AddressRecord) DeepCopy() *AddressRecord { - if in == nil { - return nil - } - out := new(AddressRecord) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AvailabilityZone) DeepCopyInto(out *AvailabilityZone) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AvailabilityZone. -func (in *AvailabilityZone) DeepCopy() *AvailabilityZone { - if in == nil { - return nil - } - out := new(AvailabilityZone) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureCluster) DeepCopyInto(out *AzureCluster) { - *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 AzureCluster. -func (in *AzureCluster) DeepCopy() *AzureCluster { - if in == nil { - return nil - } - out := new(AzureCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureCluster) 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 *AzureClusterIdentity) DeepCopyInto(out *AzureClusterIdentity) { - *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 AzureClusterIdentity. -func (in *AzureClusterIdentity) DeepCopy() *AzureClusterIdentity { - if in == nil { - return nil - } - out := new(AzureClusterIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureClusterIdentity) 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 *AzureClusterIdentityList) DeepCopyInto(out *AzureClusterIdentityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureClusterIdentity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterIdentityList. -func (in *AzureClusterIdentityList) DeepCopy() *AzureClusterIdentityList { - if in == nil { - return nil - } - out := new(AzureClusterIdentityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureClusterIdentityList) 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 *AzureClusterIdentitySpec) DeepCopyInto(out *AzureClusterIdentitySpec) { - *out = *in - out.ClientSecret = in.ClientSecret - if in.AllowedNamespaces != nil { - in, out := &in.AllowedNamespaces, &out.AllowedNamespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterIdentitySpec. -func (in *AzureClusterIdentitySpec) DeepCopy() *AzureClusterIdentitySpec { - if in == nil { - return nil - } - out := new(AzureClusterIdentitySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureClusterIdentityStatus) DeepCopyInto(out *AzureClusterIdentityStatus) { - *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 AzureClusterIdentityStatus. -func (in *AzureClusterIdentityStatus) DeepCopy() *AzureClusterIdentityStatus { - if in == nil { - return nil - } - out := new(AzureClusterIdentityStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureClusterList) DeepCopyInto(out *AzureClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterList. -func (in *AzureClusterList) DeepCopy() *AzureClusterList { - if in == nil { - return nil - } - out := new(AzureClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureClusterList) 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 *AzureClusterSpec) DeepCopyInto(out *AzureClusterSpec) { - *out = *in - in.NetworkSpec.DeepCopyInto(&out.NetworkSpec) - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.IdentityRef != nil { - in, out := &in.IdentityRef, &out.IdentityRef - *out = new(v1.ObjectReference) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterSpec. -func (in *AzureClusterSpec) DeepCopy() *AzureClusterSpec { - if in == nil { - return nil - } - out := new(AzureClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureClusterStatus) DeepCopyInto(out *AzureClusterStatus) { - *out = *in - 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() - } - } - 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 AzureClusterStatus. -func (in *AzureClusterStatus) DeepCopy() *AzureClusterStatus { - if in == nil { - return nil - } - out := new(AzureClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachine) DeepCopyInto(out *AzureMachine) { - *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 AzureMachine. -func (in *AzureMachine) DeepCopy() *AzureMachine { - if in == nil { - return nil - } - out := new(AzureMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachine) 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 *AzureMachineList) DeepCopyInto(out *AzureMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineList. -func (in *AzureMachineList) DeepCopy() *AzureMachineList { - if in == nil { - return nil - } - out := new(AzureMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineList) 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 *AzureMachineSpec) DeepCopyInto(out *AzureMachineSpec) { - *out = *in - 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 - } - in.AvailabilityZone.DeepCopyInto(&out.AvailabilityZone) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(Image) - (*in).DeepCopyInto(*out) - } - if in.UserAssignedIdentities != nil { - in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities - *out = make([]UserAssignedIdentity, len(*in)) - copy(*out, *in) - } - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]DataDisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AcceleratedNetworking != nil { - in, out := &in.AcceleratedNetworking, &out.AcceleratedNetworking - *out = new(bool) - **out = **in - } - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(SpotVMOptions) - (*in).DeepCopyInto(*out) - } - if in.SecurityProfile != nil { - in, out := &in.SecurityProfile, &out.SecurityProfile - *out = new(SecurityProfile) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineSpec. -func (in *AzureMachineSpec) DeepCopy() *AzureMachineSpec { - if in == nil { - return nil - } - out := new(AzureMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineStatus) DeepCopyInto(out *AzureMachineStatus) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]v1.NodeAddress, len(*in)) - copy(*out, *in) - } - if in.VMState != nil { - in, out := &in.VMState, &out.VMState - *out = new(VMState) - **out = **in - } - 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 AzureMachineStatus. -func (in *AzureMachineStatus) DeepCopy() *AzureMachineStatus { - if in == nil { - return nil - } - out := new(AzureMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineTemplate) DeepCopyInto(out *AzureMachineTemplate) { - *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 AzureMachineTemplate. -func (in *AzureMachineTemplate) DeepCopy() *AzureMachineTemplate { - if in == nil { - return nil - } - out := new(AzureMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineTemplate) 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 *AzureMachineTemplateList) DeepCopyInto(out *AzureMachineTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachineTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineTemplateList. -func (in *AzureMachineTemplateList) DeepCopy() *AzureMachineTemplateList { - if in == nil { - return nil - } - out := new(AzureMachineTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineTemplateList) 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 *AzureMachineTemplateResource) DeepCopyInto(out *AzureMachineTemplateResource) { - *out = *in - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineTemplateResource. -func (in *AzureMachineTemplateResource) DeepCopy() *AzureMachineTemplateResource { - if in == nil { - return nil - } - out := new(AzureMachineTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineTemplateSpec) DeepCopyInto(out *AzureMachineTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineTemplateSpec. -func (in *AzureMachineTemplateSpec) DeepCopy() *AzureMachineTemplateSpec { - if in == nil { - return nil - } - out := new(AzureMachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedCluster) DeepCopyInto(out *AzureManagedCluster) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedCluster. -func (in *AzureManagedCluster) DeepCopy() *AzureManagedCluster { - if in == nil { - return nil - } - out := new(AzureManagedCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedCluster) 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 *AzureManagedClusterList) DeepCopyInto(out *AzureManagedClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterList. -func (in *AzureManagedClusterList) DeepCopy() *AzureManagedClusterList { - if in == nil { - return nil - } - out := new(AzureManagedClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedClusterList) 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 *AzureManagedClusterSpec) DeepCopyInto(out *AzureManagedClusterSpec) { - *out = *in - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterSpec. -func (in *AzureManagedClusterSpec) DeepCopy() *AzureManagedClusterSpec { - if in == nil { - return nil - } - out := new(AzureManagedClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedClusterStatus) DeepCopyInto(out *AzureManagedClusterStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterStatus. -func (in *AzureManagedClusterStatus) DeepCopy() *AzureManagedClusterStatus { - if in == nil { - return nil - } - out := new(AzureManagedClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedControlPlane) DeepCopyInto(out *AzureManagedControlPlane) { - *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 AzureManagedControlPlane. -func (in *AzureManagedControlPlane) DeepCopy() *AzureManagedControlPlane { - if in == nil { - return nil - } - out := new(AzureManagedControlPlane) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedControlPlane) 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 *AzureManagedControlPlaneList) DeepCopyInto(out *AzureManagedControlPlaneList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedControlPlane, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneList. -func (in *AzureManagedControlPlaneList) DeepCopy() *AzureManagedControlPlaneList { - if in == nil { - return nil - } - out := new(AzureManagedControlPlaneList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedControlPlaneList) 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 *AzureManagedControlPlaneSpec) DeepCopyInto(out *AzureManagedControlPlaneSpec) { - *out = *in - out.VirtualNetwork = in.VirtualNetwork - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NetworkPlugin != nil { - in, out := &in.NetworkPlugin, &out.NetworkPlugin - *out = new(string) - **out = **in - } - if in.NetworkPolicy != nil { - in, out := &in.NetworkPolicy, &out.NetworkPolicy - *out = new(string) - **out = **in - } - if in.DNSServiceIP != nil { - in, out := &in.DNSServiceIP, &out.DNSServiceIP - *out = new(string) - **out = **in - } - if in.LoadBalancerSKU != nil { - in, out := &in.LoadBalancerSKU, &out.LoadBalancerSKU - *out = new(string) - **out = **in - } - if in.AADProfile != nil { - in, out := &in.AADProfile, &out.AADProfile - *out = new(AADProfile) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneSpec. -func (in *AzureManagedControlPlaneSpec) DeepCopy() *AzureManagedControlPlaneSpec { - if in == nil { - return nil - } - out := new(AzureManagedControlPlaneSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedControlPlaneStatus) DeepCopyInto(out *AzureManagedControlPlaneStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneStatus. -func (in *AzureManagedControlPlaneStatus) DeepCopy() *AzureManagedControlPlaneStatus { - if in == nil { - return nil - } - out := new(AzureManagedControlPlaneStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedMachinePool) DeepCopyInto(out *AzureManagedMachinePool) { - *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 AzureManagedMachinePool. -func (in *AzureManagedMachinePool) DeepCopy() *AzureManagedMachinePool { - if in == nil { - return nil - } - out := new(AzureManagedMachinePool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedMachinePool) 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 *AzureManagedMachinePoolList) DeepCopyInto(out *AzureManagedMachinePoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedMachinePool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolList. -func (in *AzureManagedMachinePoolList) DeepCopy() *AzureManagedMachinePoolList { - if in == nil { - return nil - } - out := new(AzureManagedMachinePoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedMachinePoolList) 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 *AzureManagedMachinePoolSpec) DeepCopyInto(out *AzureManagedMachinePoolSpec) { - *out = *in - if in.OSDiskSizeGB != nil { - in, out := &in.OSDiskSizeGB, &out.OSDiskSizeGB - *out = new(int32) - **out = **in - } - if in.ProviderIDList != nil { - in, out := &in.ProviderIDList, &out.ProviderIDList - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolSpec. -func (in *AzureManagedMachinePoolSpec) DeepCopy() *AzureManagedMachinePoolSpec { - if in == nil { - return nil - } - out := new(AzureManagedMachinePoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedMachinePoolStatus) DeepCopyInto(out *AzureManagedMachinePoolStatus) { - *out = *in - if in.ErrorReason != nil { - in, out := &in.ErrorReason, &out.ErrorReason - *out = new(errors.MachineStatusError) - **out = **in - } - if in.ErrorMessage != nil { - in, out := &in.ErrorMessage, &out.ErrorMessage - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolStatus. -func (in *AzureManagedMachinePoolStatus) DeepCopy() *AzureManagedMachinePoolStatus { - if in == nil { - return nil - } - out := new(AzureManagedMachinePoolStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMarketplaceImage) DeepCopyInto(out *AzureMarketplaceImage) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMarketplaceImage. -func (in *AzureMarketplaceImage) DeepCopy() *AzureMarketplaceImage { - if in == nil { - return nil - } - out := new(AzureMarketplaceImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureSharedGalleryImage) DeepCopyInto(out *AzureSharedGalleryImage) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSharedGalleryImage. -func (in *AzureSharedGalleryImage) DeepCopy() *AzureSharedGalleryImage { - if in == nil { - return nil - } - out := new(AzureSharedGalleryImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildParams) DeepCopyInto(out *BuildParams) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Role != nil { - in, out := &in.Role, &out.Role - *out = new(string) - **out = **in - } - if in.Additional != nil { - in, out := &in.Additional, &out.Additional - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildParams. -func (in *BuildParams) DeepCopy() *BuildParams { - if in == nil { - return nil - } - out := new(BuildParams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DataDisk) DeepCopyInto(out *DataDisk) { - *out = *in - if in.ManagedDisk != nil { - in, out := &in.ManagedDisk, &out.ManagedDisk - *out = new(ManagedDisk) - (*in).DeepCopyInto(*out) - } - if in.Lun != nil { - in, out := &in.Lun, &out.Lun - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDisk. -func (in *DataDisk) DeepCopy() *DataDisk { - if in == nil { - return nil - } - out := new(DataDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DiffDiskSettings) DeepCopyInto(out *DiffDiskSettings) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiffDiskSettings. -func (in *DiffDiskSettings) DeepCopy() *DiffDiskSettings { - if in == nil { - return nil - } - out := new(DiffDiskSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DiskEncryptionSetParameters) DeepCopyInto(out *DiskEncryptionSetParameters) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSetParameters. -func (in *DiskEncryptionSetParameters) DeepCopy() *DiskEncryptionSetParameters { - if in == nil { - return nil - } - out := new(DiskEncryptionSetParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FrontendIP) DeepCopyInto(out *FrontendIP) { - *out = *in - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(PublicIPSpec) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendIP. -func (in *FrontendIP) DeepCopy() *FrontendIP { - if in == nil { - return nil - } - out := new(FrontendIP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Future) DeepCopyInto(out *Future) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Future. -func (in *Future) DeepCopy() *Future { - if in == nil { - return nil - } - out := new(Future) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Image) DeepCopyInto(out *Image) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.SharedGallery != nil { - in, out := &in.SharedGallery, &out.SharedGallery - *out = new(AzureSharedGalleryImage) - **out = **in - } - if in.Marketplace != nil { - in, out := &in.Marketplace, &out.Marketplace - *out = new(AzureMarketplaceImage) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. -func (in *Image) DeepCopy() *Image { - if in == nil { - return nil - } - out := new(Image) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressRule) DeepCopyInto(out *IngressRule) { - *out = *in - if in.SourcePorts != nil { - in, out := &in.SourcePorts, &out.SourcePorts - *out = new(string) - **out = **in - } - if in.DestinationPorts != nil { - in, out := &in.DestinationPorts, &out.DestinationPorts - *out = new(string) - **out = **in - } - if in.Source != nil { - in, out := &in.Source, &out.Source - *out = new(string) - **out = **in - } - if in.Destination != nil { - in, out := &in.Destination, &out.Destination - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule. -func (in *IngressRule) DeepCopy() *IngressRule { - if in == nil { - return nil - } - out := new(IngressRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in IngressRules) DeepCopyInto(out *IngressRules) { - { - in := &in - *out = make(IngressRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRules. -func (in IngressRules) DeepCopy() IngressRules { - if in == nil { - return nil - } - out := new(IngressRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerSpec) DeepCopyInto(out *LoadBalancerSpec) { - *out = *in - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]FrontendIP, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSpec. -func (in *LoadBalancerSpec) DeepCopy() *LoadBalancerSpec { - if in == nil { - return nil - } - out := new(LoadBalancerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedControlPlaneSubnet) DeepCopyInto(out *ManagedControlPlaneSubnet) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedControlPlaneSubnet. -func (in *ManagedControlPlaneSubnet) DeepCopy() *ManagedControlPlaneSubnet { - if in == nil { - return nil - } - out := new(ManagedControlPlaneSubnet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedControlPlaneVirtualNetwork) DeepCopyInto(out *ManagedControlPlaneVirtualNetwork) { - *out = *in - out.Subnet = in.Subnet -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedControlPlaneVirtualNetwork. -func (in *ManagedControlPlaneVirtualNetwork) DeepCopy() *ManagedControlPlaneVirtualNetwork { - if in == nil { - return nil - } - out := new(ManagedControlPlaneVirtualNetwork) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedDisk) DeepCopyInto(out *ManagedDisk) { - *out = *in - if in.DiskEncryptionSet != nil { - in, out := &in.DiskEncryptionSet, &out.DiskEncryptionSet - *out = new(DiskEncryptionSetParameters) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedDisk. -func (in *ManagedDisk) DeepCopy() *ManagedDisk { - if in == nil { - return nil - } - out := new(ManagedDisk) - 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 - in.Vnet.DeepCopyInto(&out.Vnet) - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(Subnets, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.APIServerLB.DeepCopyInto(&out.APIServerLB) -} - -// 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 *OSDisk) DeepCopyInto(out *OSDisk) { - *out = *in - in.ManagedDisk.DeepCopyInto(&out.ManagedDisk) - if in.DiffDiskSettings != nil { - in, out := &in.DiffDiskSettings, &out.DiffDiskSettings - *out = new(DiffDiskSettings) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSDisk. -func (in *OSDisk) DeepCopy() *OSDisk { - if in == nil { - return nil - } - out := new(OSDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PublicIPSpec) DeepCopyInto(out *PublicIPSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicIPSpec. -func (in *PublicIPSpec) DeepCopy() *PublicIPSpec { - if in == nil { - return nil - } - out := new(PublicIPSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteTable) DeepCopyInto(out *RouteTable) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTable. -func (in *RouteTable) DeepCopy() *RouteTable { - if in == nil { - return nil - } - out := new(RouteTable) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroup) DeepCopyInto(out *SecurityGroup) { - *out = *in - if in.IngressRules != nil { - in, out := &in.IngressRules, &out.IngressRules - *out = make(IngressRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroup. -func (in *SecurityGroup) DeepCopy() *SecurityGroup { - if in == nil { - return nil - } - out := new(SecurityGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityProfile) DeepCopyInto(out *SecurityProfile) { - *out = *in - if in.EncryptionAtHost != nil { - in, out := &in.EncryptionAtHost, &out.EncryptionAtHost - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfile. -func (in *SecurityProfile) DeepCopy() *SecurityProfile { - if in == nil { - return nil - } - out := new(SecurityProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SpotVMOptions) DeepCopyInto(out *SpotVMOptions) { - *out = *in - if in.MaxPrice != nil { - in, out := &in.MaxPrice, &out.MaxPrice - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpotVMOptions. -func (in *SpotVMOptions) DeepCopy() *SpotVMOptions { - if in == nil { - return nil - } - out := new(SpotVMOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec) { - *out = *in - if in.CIDRBlocks != nil { - in, out := &in.CIDRBlocks, &out.CIDRBlocks - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.SecurityGroup.DeepCopyInto(&out.SecurityGroup) - out.RouteTable = in.RouteTable -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec. -func (in *SubnetSpec) DeepCopy() *SubnetSpec { - if in == nil { - return nil - } - out := new(SubnetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Subnets) DeepCopyInto(out *Subnets) { - { - in := &in - *out = make(Subnets, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnets. -func (in Subnets) DeepCopy() Subnets { - if in == nil { - return nil - } - out := new(Subnets) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Tags) DeepCopyInto(out *Tags) { - { - in := &in - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tags. -func (in Tags) DeepCopy() Tags { - if in == nil { - return nil - } - out := new(Tags) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAssignedIdentity) DeepCopyInto(out *UserAssignedIdentity) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentity. -func (in *UserAssignedIdentity) DeepCopy() *UserAssignedIdentity { - if in == nil { - return nil - } - out := new(UserAssignedIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VM) DeepCopyInto(out *VM) { - *out = *in - in.Image.DeepCopyInto(&out.Image) - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]v1.NodeAddress, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VM. -func (in *VM) DeepCopy() *VM { - if in == nil { - return nil - } - out := new(VM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VnetSpec) DeepCopyInto(out *VnetSpec) { - *out = *in - if in.CIDRBlocks != nil { - in, out := &in.CIDRBlocks, &out.CIDRBlocks - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VnetSpec. -func (in *VnetSpec) DeepCopy() *VnetSpec { - if in == nil { - return nil - } - out := new(VnetSpec) - in.DeepCopyInto(out) - return out -} diff --git a/api/v1alpha4/azurecluster_conversion.go b/api/v1alpha4/azurecluster_conversion.go deleted file mode 100644 index d769e9b655a..00000000000 --- a/api/v1alpha4/azurecluster_conversion.go +++ /dev/null @@ -1,384 +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 ( - "unsafe" - - apiconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureCluster to the Hub version (v1beta1). -func (src *AzureCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureCluster) - if err := Convert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureCluster{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - // Restore list of virtual network peerings - dst.Spec.NetworkSpec.Vnet.Peerings = restored.Spec.NetworkSpec.Vnet.Peerings - - // Restore ExtendedLocation properties - dst.Spec.ExtendedLocation = restored.Spec.ExtendedLocation - - // Restore API Server LB IP tags. - for _, restoredFrontendIP := range restored.Spec.NetworkSpec.APIServerLB.FrontendIPs { - for i, dstFrontendIP := range dst.Spec.NetworkSpec.APIServerLB.FrontendIPs { - if restoredFrontendIP.Name == dstFrontendIP.Name && restoredFrontendIP.PublicIP != nil { - dst.Spec.NetworkSpec.APIServerLB.FrontendIPs[i].PublicIP.IPTags = restoredFrontendIP.PublicIP.IPTags - } - } - } - - // Restore outbound LB IP tags. - if restored.Spec.NetworkSpec.ControlPlaneOutboundLB != nil { - for _, restoredFrontendIP := range restored.Spec.NetworkSpec.ControlPlaneOutboundLB.FrontendIPs { - for i, dstFrontendIP := range dst.Spec.NetworkSpec.ControlPlaneOutboundLB.FrontendIPs { - if restoredFrontendIP.Name == dstFrontendIP.Name && restoredFrontendIP.PublicIP != nil { - dst.Spec.NetworkSpec.ControlPlaneOutboundLB.FrontendIPs[i].PublicIP.IPTags = restoredFrontendIP.PublicIP.IPTags - } - } - } - } - if restored.Spec.NetworkSpec.NodeOutboundLB != nil { - for _, restoredFrontendIP := range restored.Spec.NetworkSpec.NodeOutboundLB.FrontendIPs { - for i, dstFrontendIP := range dst.Spec.NetworkSpec.NodeOutboundLB.FrontendIPs { - if restoredFrontendIP.Name == dstFrontendIP.Name && restoredFrontendIP.PublicIP != nil { - dst.Spec.NetworkSpec.NodeOutboundLB.FrontendIPs[i].PublicIP.IPTags = restoredFrontendIP.PublicIP.IPTags - } - } - } - } - - // Restore NAT Gateway IP tags, ServiceEndpoints and PrivateEndpoints. - for _, restoredSubnet := range restored.Spec.NetworkSpec.Subnets { - for i, dstSubnet := range dst.Spec.NetworkSpec.Subnets { - if dstSubnet.Name == restoredSubnet.Name { - dst.Spec.NetworkSpec.Subnets[i].NatGateway.NatGatewayIP.IPTags = restoredSubnet.NatGateway.NatGatewayIP.IPTags - dst.Spec.NetworkSpec.Subnets[i].ServiceEndpoints = restoredSubnet.ServiceEndpoints - dst.Spec.NetworkSpec.Subnets[i].PrivateEndpoints = restoredSubnet.PrivateEndpoints - } - } - } - - // Restore Azure Bastion IP tags, ServiceEndpoints, PrivateEndpoints, SKU, and EnableTunneling. - if restored.Spec.BastionSpec.AzureBastion != nil && dst.Spec.BastionSpec.AzureBastion != nil { - if restored.Spec.BastionSpec.AzureBastion.PublicIP.Name == dst.Spec.BastionSpec.AzureBastion.PublicIP.Name { - dst.Spec.BastionSpec.AzureBastion.PublicIP.IPTags = restored.Spec.BastionSpec.AzureBastion.PublicIP.IPTags - } - if restored.Spec.BastionSpec.AzureBastion.Subnet.NatGateway.NatGatewayIP.Name == dst.Spec.BastionSpec.AzureBastion.Subnet.NatGateway.NatGatewayIP.Name { - dst.Spec.BastionSpec.AzureBastion.Subnet.NatGateway.NatGatewayIP.IPTags = restored.Spec.BastionSpec.AzureBastion.Subnet.NatGateway.NatGatewayIP.IPTags - } - dst.Spec.BastionSpec.AzureBastion.Subnet.ServiceEndpoints = restored.Spec.BastionSpec.AzureBastion.Subnet.ServiceEndpoints - dst.Spec.BastionSpec.AzureBastion.Subnet.PrivateEndpoints = restored.Spec.BastionSpec.AzureBastion.Subnet.PrivateEndpoints - dst.Spec.BastionSpec.AzureBastion.Sku = restored.Spec.BastionSpec.AzureBastion.Sku - dst.Spec.BastionSpec.AzureBastion.EnableTunneling = restored.Spec.BastionSpec.AzureBastion.EnableTunneling - } - - // Restore load balancers' backend pool name - if restored.Spec.NetworkSpec.APIServerLB.BackendPool.Name != "" { - dst.Spec.NetworkSpec.APIServerLB.BackendPool.Name = restored.Spec.NetworkSpec.APIServerLB.BackendPool.Name - } - - if restored.Spec.NetworkSpec.NodeOutboundLB != nil && restored.Spec.NetworkSpec.NodeOutboundLB.BackendPool.Name != "" { - dst.Spec.NetworkSpec.NodeOutboundLB.BackendPool.Name = restored.Spec.NetworkSpec.NodeOutboundLB.BackendPool.Name - } - - if restored.Spec.NetworkSpec.ControlPlaneOutboundLB != nil && restored.Spec.NetworkSpec.ControlPlaneOutboundLB.BackendPool.Name != "" { - dst.Spec.NetworkSpec.ControlPlaneOutboundLB.BackendPool.Name = restored.Spec.NetworkSpec.ControlPlaneOutboundLB.BackendPool.Name - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureCluster) - if err := Convert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureClusterList to the Hub version (v1beta1). -func (src *AzureClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureClusterList) - return Convert_v1alpha4_AzureClusterList_To_v1beta1_AzureClusterList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureClusterList) - return Convert_v1beta1_AzureClusterList_To_v1alpha4_AzureClusterList(src, dst, nil) -} - -// Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec converts from the Hub version (v1beta1) of the VnetSpec to this version. -func Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(in *infrav1.VnetSpec, out *VnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(in, out, s); err != nil { - return err - } - - // Convert VnetClassSpec fields - out.CIDRBlocks = in.CIDRBlocks - out.Tags = *(*Tags)(&in.Tags) - - return nil -} - -// Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec is an autogenerated conversion function. -func Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *infrav1.VnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(in, out, s); err != nil { - return err - } - - // Convert VnetClassSpec fields - out.CIDRBlocks = in.CIDRBlocks - out.Tags = *(*infrav1.Tags)(&in.Tags) - - return nil -} - -// Convert_v1alpha4_AzureClusterSpec_To_v1beta1_AzureClusterSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterSpec_To_v1beta1_AzureClusterSpec(in *AzureClusterSpec, out *infrav1.AzureClusterSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_AzureClusterSpec_To_v1beta1_AzureClusterSpec(in, out, s); err != nil { - return err - } - - // Convert AzureClusterClassSpec fields - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - out.AdditionalTags = *(*infrav1.Tags)(&in.AdditionalTags) - out.IdentityRef = in.IdentityRef - out.AzureEnvironment = in.AzureEnvironment - out.CloudProviderConfigOverrides = (*infrav1.CloudProviderConfigOverrides)(unsafe.Pointer(in.CloudProviderConfigOverrides)) - - return nil -} - -// Convert_v1beta1_AzureClusterSpec_To_v1alpha4_AzureClusterSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterSpec_To_v1alpha4_AzureClusterSpec(in *infrav1.AzureClusterSpec, out *AzureClusterSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_AzureClusterSpec_To_v1alpha4_AzureClusterSpec(in, out, s); err != nil { - return err - } - - // Convert AzureClusterClassSpec fields - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - out.AdditionalTags = Tags(in.AdditionalTags) - out.IdentityRef = in.IdentityRef - out.AzureEnvironment = in.AzureEnvironment - out.CloudProviderConfigOverrides = (*CloudProviderConfigOverrides)(unsafe.Pointer(in.CloudProviderConfigOverrides)) - - return nil -} - -// Convert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP is an autogenerated conversion function. -func Convert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP(in *FrontendIP, out *infrav1.FrontendIP, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP(in, out, s); err != nil { - return err - } - - // Convert FrontendIPClass fields - out.PrivateIPAddress = in.PrivateIPAddress - - return nil -} - -// Convert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP is an autogenerated conversion function. -func Convert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP(in *infrav1.FrontendIP, out *FrontendIP, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP(in, out, s); err != nil { - return err - } - - // Convert FrontendIPClass fields - out.PrivateIPAddress = in.PrivateIPAddress - - return nil -} - -// Convert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec is an autogenerated conversion function. -func Convert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(in *LoadBalancerSpec, out *infrav1.LoadBalancerSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(in, out, s); err != nil { - return err - } - - // Convert LoadBalancerClassSpec fields - out.SKU = infrav1.SKU(in.SKU) - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]infrav1.FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - out.Type = infrav1.LBType(in.Type) - out.FrontendIPsCount = in.FrontendIPsCount - out.IdleTimeoutInMinutes = in.IdleTimeoutInMinutes - - return nil -} - -// Convert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec is an autogenerated conversion function. -func Convert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(in *infrav1.LoadBalancerSpec, out *LoadBalancerSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(in, out, s); err != nil { - return err - } - - // Convert LoadBalancerClassSpec fields - out.SKU = SKU(in.SKU) - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - out.Type = LBType(in.Type) - out.FrontendIPsCount = in.FrontendIPsCount - out.IdleTimeoutInMinutes = in.IdleTimeoutInMinutes - - return nil -} - -// Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec is an autogenerated conversion function. -func Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *infrav1.NetworkSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in, out, s); err != nil { - return err - } - - // Convert NetworkClassSpec fields - out.PrivateDNSZoneName = in.PrivateDNSZoneName - - return nil -} - -// Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *infrav1.NetworkSpec, out *NetworkSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in, out, s); err != nil { - return err - } - - // Convert NetworkClassSpec fields - out.PrivateDNSZoneName = in.PrivateDNSZoneName - - return nil -} - -// Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec is an autogenerated conversion function. -func Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *infrav1.SubnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(in, out, s); err != nil { - return err - } - - // Convert SubnetClassSpec fields - out.Role = infrav1.SubnetRole(in.Role) - out.Name = in.Name - out.CIDRBlocks = in.CIDRBlocks - - return nil -} - -// Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec is an autogenerated conversion function. -func Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(in *infrav1.SubnetSpec, out *SubnetSpec, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(in, out, s); err != nil { - return err - } - - // Convert SubnetClassSpec fields - out.Role = SubnetRole(in.Role) - out.Name = in.Name - out.CIDRBlocks = in.CIDRBlocks - - return nil -} - -// Convert_v1alpha4_SecurityGroup_To_v1beta1_SecurityGroup is an autogenerated conversion function. -func Convert_v1alpha4_SecurityGroup_To_v1beta1_SecurityGroup(in *SecurityGroup, out *infrav1.SecurityGroup, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_SecurityGroup_To_v1beta1_SecurityGroup(in, out, s); err != nil { - return err - } - - // Convert SecurityGroupClass fields - out.SecurityRules = *(*infrav1.SecurityRules)(unsafe.Pointer(&in.SecurityRules)) - out.Tags = *(*infrav1.Tags)(&in.Tags) - - return nil -} - -// Convert_v1beta1_SecurityGroup_To_v1alpha4_SecurityGroup is an autogenerated conversion function. -func Convert_v1beta1_SecurityGroup_To_v1alpha4_SecurityGroup(in *infrav1.SecurityGroup, out *SecurityGroup, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_SecurityGroup_To_v1alpha4_SecurityGroup(in, out, s); err != nil { - return err - } - - // Convert SecurityGroupClass fields - out.SecurityRules = *(*SecurityRules)(unsafe.Pointer(&in.SecurityRules)) - out.Tags = *(*Tags)(&in.Tags) - - return nil -} - -// Convert_v1alpha4_NatGateway_To_v1beta1_NatGateway converts a NAT gateway from v1alpha4 to v1beta1. -func Convert_v1alpha4_NatGateway_To_v1beta1_NatGateway(in *NatGateway, out *infrav1.NatGateway, s apiconversion.Scope) error { - if err := autoConvert_v1alpha4_NatGateway_To_v1beta1_NatGateway(in, out, s); err != nil { - return err - } - - // Convert Name field - out.Name = in.Name - return nil -} - -// Convert_v1beta1_NatGateway_To_v1alpha4_NatGateway converts a NatGateway from v1beta1 to v1alpha4. -func Convert_v1beta1_NatGateway_To_v1alpha4_NatGateway(in *infrav1.NatGateway, out *NatGateway, s apiconversion.Scope) error { - if err := autoConvert_v1beta1_NatGateway_To_v1alpha4_NatGateway(in, out, s); err != nil { - return err - } - - // Convert Name field - out.Name = in.Name - return nil -} - -// Convert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec is an autogenerated conversion function. -func Convert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(in *infrav1.PublicIPSpec, out *PublicIPSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(in, out, s) -} - -// Convert_v1beta1_AzureBastion_To_v1alpha4_AzureBastion is an autogenerated conversion function. -func Convert_v1beta1_AzureBastion_To_v1alpha4_AzureBastion(in *infrav1.AzureBastion, out *AzureBastion, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureBastion_To_v1alpha4_AzureBastion(in, out, s) -} diff --git a/api/v1alpha4/azurecluster_types.go b/api/v1alpha4/azurecluster_types.go deleted file mode 100644 index 609c88a64f0..00000000000 --- a/api/v1alpha4/azurecluster_types.go +++ /dev/null @@ -1,158 +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 ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -const ( - // ClusterFinalizer allows ReconcileAzureCluster to clean up Azure resources associated with AzureCluster before - // removing it from the apiserver. - ClusterFinalizer = "azurecluster.infrastructure.cluster.x-k8s.io" - - // ClusterLabelNamespace indicates the namespace of the cluster. - ClusterLabelNamespace = "azurecluster.infrastructure.cluster.x-k8s.io/cluster-namespace" -) - -// AzureClusterSpec defines the desired state of AzureCluster. -type AzureClusterSpec struct { - // NetworkSpec encapsulates all things related to Azure network. - NetworkSpec NetworkSpec `json:"networkSpec,omitempty"` - - // +optional - ResourceGroup string `json:"resourceGroup,omitempty"` - - // +optional - SubscriptionID string `json:"subscriptionID,omitempty"` - - Location string `json:"location"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1alpha4.APIEndpoint `json:"controlPlaneEndpoint"` - - // AdditionalTags is an optional set of tags to add to Azure resources managed by the Azure provider, in addition to the - // ones added by default. - // +optional - AdditionalTags Tags `json:"additionalTags,omitempty"` - - // IdentityRef is a reference to an AzureIdentity to be used when reconciling this cluster - // +optional - IdentityRef *corev1.ObjectReference `json:"identityRef,omitempty"` - - // AzureEnvironment is the name of the AzureCloud to be used. - // The default value that would be used by most users is "AzurePublicCloud", other values are: - // - ChinaCloud: "AzureChinaCloud" - // - GermanCloud: "AzureGermanCloud" - // - PublicCloud: "AzurePublicCloud" - // - USGovernmentCloud: "AzureUSGovernmentCloud" - // +optional - AzureEnvironment string `json:"azureEnvironment,omitempty"` - - // BastionSpec encapsulates all things related to the Bastions in the cluster. - // +optional - BastionSpec BastionSpec `json:"bastionSpec,omitempty"` - - // CloudProviderConfigOverrides is an optional set of configuration values that can be overridden in azure cloud provider config. - // This is only a subset of options that are available in azure cloud provider config. - // Some values for the cloud provider config are inferred from other parts of cluster api provider azure spec, and may not be available for overrides. - // See: https://kubernetes-sigs.github.io/cloud-provider-azure/install/configs - // Note: All cloud provider config values can be customized by creating the secret beforehand. CloudProviderConfigOverrides is only used when the secret is managed by the Azure Provider. - // +optional - CloudProviderConfigOverrides *CloudProviderConfigOverrides `json:"cloudProviderConfigOverrides,omitempty"` -} - -// AzureClusterStatus defines the observed state of AzureCluster. -type AzureClusterStatus struct { - // FailureDomains specifies the list of unique failure domains for the location/region of the cluster. - // A FailureDomain maps to Availability Zone with an Azure Region (if the region support them). An - // Availability Zone is a separate data center within a region and they can be used to ensure - // the cluster is more resilient to failure. - // See: https://learn.microsoft.com/azure/reliability/availability-zones-overview - // This list will be used by Cluster API to try and spread the machines across the failure domains. - FailureDomains clusterv1alpha4.FailureDomains `json:"failureDomains,omitempty"` - - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Conditions defines current service state of the AzureCluster. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` - - // LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the - // next reconciliation loop. - // +optional - LongRunningOperationStates Futures `json:"longRunningOperationStates,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureCluster belongs" -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" -// +kubebuilder:printcolumn:name="Message",type="string",priority=1,JSONPath=".status.conditions[?(@.type=='Ready')].message" -// +kubebuilder:printcolumn:name="Resource Group",type="string",priority=1,JSONPath=".spec.resourceGroup" -// +kubebuilder:printcolumn:name="SubscriptionID",type="string",priority=1,JSONPath=".spec.subscriptionID" -// +kubebuilder:printcolumn:name="Location",type="string",priority=1,JSONPath=".spec.location" -// +kubebuilder:printcolumn:name="Endpoint",type="string",priority=1,JSONPath=".spec.controlPlaneEndpoint.host",description="Control Plane Endpoint" -// +kubebuilder:resource:path=azureclusters,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureCluster is the Schema for the azureclusters API. -type AzureCluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureClusterSpec `json:"spec,omitempty"` - Status AzureClusterStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureClusterList contains a list of AzureClusters. -type AzureClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureCluster `json:"items"` -} - -// GetConditions returns the list of conditions for an AzureCluster API object. -func (c *AzureCluster) GetConditions() clusterv1alpha4.Conditions { - return c.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureCluster object. -func (c *AzureCluster) SetConditions(conditions clusterv1alpha4.Conditions) { - c.Status.Conditions = conditions -} - -// GetFutures returns the list of long running operation states for an AzureCluster API object. -func (c *AzureCluster) GetFutures() Futures { - return c.Status.LongRunningOperationStates -} - -// SetFutures will set the given long running operation states on an AzureCluster object. -func (c *AzureCluster) SetFutures(futures Futures) { - c.Status.LongRunningOperationStates = futures -} - -func init() { - SchemeBuilder.Register(&AzureCluster{}, &AzureClusterList{}) -} diff --git a/api/v1alpha4/azureclusteridentity_conversion.go b/api/v1alpha4/azureclusteridentity_conversion.go deleted file mode 100644 index a7390a7abc2..00000000000 --- a/api/v1alpha4/azureclusteridentity_conversion.go +++ /dev/null @@ -1,46 +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 ( - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureCluster to the Hub version (v1beta1). -func (src *AzureClusterIdentity) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureClusterIdentity) - return Convert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureClusterIdentity) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureClusterIdentity) - return Convert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity(src, dst, nil) -} - -// ConvertTo converts this AzureCluster to the Hub version (v1beta1). -func (src *AzureClusterIdentityList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureClusterIdentityList) - return Convert_v1alpha4_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureClusterIdentityList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureClusterIdentityList) - return Convert_v1beta1_AzureClusterIdentityList_To_v1alpha4_AzureClusterIdentityList(src, dst, nil) -} diff --git a/api/v1alpha4/azureclusteridentity_types.go b/api/v1alpha4/azureclusteridentity_types.go deleted file mode 100644 index 4c376aa842c..00000000000 --- a/api/v1alpha4/azureclusteridentity_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 ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -// AllowedNamespaces defines the namespaces the clusters are allowed to use the identity from -// NamespaceList takes precedence over the Selector. -type AllowedNamespaces struct { - // A nil or empty list indicates that AzureCluster cannot use the identity from any namespace. - // - // +optional - // +nullable - NamespaceList []string `json:"list"` - // Selector is a selector of namespaces that AzureCluster can - // use this Identity from. This is a standard Kubernetes LabelSelector, - // a label query over a set of resources. The result of matchLabels and - // matchExpressions are ANDed. - // - // A nil or empty selector indicates that AzureCluster cannot use this - // AzureClusterIdentity from any namespace. - // +optional - Selector *metav1.LabelSelector `json:"selector"` -} - -// AzureClusterIdentitySpec defines the parameters that are used to create an AzureIdentity. -type AzureClusterIdentitySpec struct { - // UserAssignedMSI or Service Principal - Type IdentityType `json:"type"` - // User assigned MSI resource id. - // +optional - ResourceID string `json:"resourceID,omitempty"` - // Both User Assigned MSI and SP can use this field. - ClientID string `json:"clientID"` - // ClientSecret is a secret reference which should contain either a Service Principal password or certificate secret. - // +optional - ClientSecret corev1.SecretReference `json:"clientSecret,omitempty"` - // Service principal primary tenant id. - TenantID string `json:"tenantID"` - // AllowedNamespaces is used to identify the namespaces the clusters are allowed to use the identity from. - // Namespaces can be selected either using an array of namespaces or with label selector. - // An empty allowedNamespaces object indicates that AzureClusters can use this identity from any namespace. - // If this object is nil, no namespaces will be allowed (default behaviour, if this field is not provided) - // A namespace should be either in the NamespaceList or match with Selector to use the identity. - // - // +optional - // +nullable - AllowedNamespaces *AllowedNamespaces `json:"allowedNamespaces"` -} - -// AzureClusterIdentityStatus defines the observed state of AzureClusterIdentity. -type AzureClusterIdentityStatus struct { - // Conditions defines current service state of the AzureClusterIdentity. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azureclusteridentities,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureClusterIdentity is the Schema for the azureclustersidentities API. -type AzureClusterIdentity struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureClusterIdentitySpec `json:"spec,omitempty"` - Status AzureClusterIdentityStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureClusterIdentityList contains a list of AzureClusterIdentity. -type AzureClusterIdentityList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureClusterIdentity `json:"items"` -} - -// GetConditions returns the list of conditions for an AzureClusterIdentity API object. -func (c *AzureClusterIdentity) GetConditions() clusterv1alpha4.Conditions { - return c.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureClusterIdentity object. -func (c *AzureClusterIdentity) SetConditions(conditions clusterv1alpha4.Conditions) { - c.Status.Conditions = conditions -} - -func init() { - SchemeBuilder.Register(&AzureClusterIdentity{}, &AzureClusterIdentityList{}) -} diff --git a/api/v1alpha4/azuremachine_conversion.go b/api/v1alpha4/azuremachine_conversion.go deleted file mode 100644 index d292b3e1c3f..00000000000 --- a/api/v1alpha4/azuremachine_conversion.go +++ /dev/null @@ -1,128 +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" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachine to the Hub version (v1beta1). -func (src *AzureMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachine) - if err := Convert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine(src, dst, nil); err != nil { - return err - } - - // Manually restore data from annotations - restored := &infrav1.AzureMachine{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - if restored.Spec.Image != nil && restored.Spec.Image.ComputeGallery != nil { - dst.Spec.Image.ComputeGallery = restored.Spec.Image.ComputeGallery - } - - if restored.Spec.AdditionalCapabilities != nil { - dst.Spec.AdditionalCapabilities = restored.Spec.AdditionalCapabilities - } - - if len(restored.Spec.DNSServers) > 0 { - dst.Spec.DNSServers = restored.Spec.DNSServers - } - - if len(restored.Spec.VMExtensions) > 0 { - dst.Spec.VMExtensions = restored.Spec.VMExtensions - } - - if restored.Spec.SpotVMOptions != nil && restored.Spec.SpotVMOptions.EvictionPolicy != nil { - dst.Spec.SpotVMOptions.EvictionPolicy = restored.Spec.SpotVMOptions.EvictionPolicy - } - - if restored.Spec.Diagnostics != nil { - dst.Spec.Diagnostics = restored.Spec.Diagnostics - } - - if restored.Spec.NetworkInterfaces != nil { - dst.Spec.NetworkInterfaces = restored.Spec.NetworkInterfaces - } - - if restored.Spec.SystemAssignedIdentityRole != nil { - dst.Spec.SystemAssignedIdentityRole = restored.Spec.SystemAssignedIdentityRole - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachine) - if err := Convert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureMachineList to the Hub version (v1beta1). -func (src *AzureMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachineList) - return Convert_v1alpha4_AzureMachineList_To_v1beta1_AzureMachineList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachineList) - return Convert_v1beta1_AzureMachineList_To_v1alpha4_AzureMachineList(src, dst, nil) -} - -// Convert_v1beta1_AzureMarketplaceImage_To_v1alpha4_AzureMarketplaceImage converts an Azure Marketplace image from v1beta1 to v1alpha4. -func Convert_v1beta1_AzureMarketplaceImage_To_v1alpha4_AzureMarketplaceImage(in *infrav1.AzureMarketplaceImage, out *AzureMarketplaceImage, s apiconversion.Scope) error { - out.Offer = in.ImagePlan.Offer - out.Publisher = in.ImagePlan.Publisher - out.SKU = in.ImagePlan.SKU - - return autoConvert_v1beta1_AzureMarketplaceImage_To_v1alpha4_AzureMarketplaceImage(in, out, s) -} - -// Convert_v1alpha4_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage converts an Azure Marketplace image from v1alpha4 to v1beta1. -func Convert_v1alpha4_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(in *AzureMarketplaceImage, out *infrav1.AzureMarketplaceImage, s apiconversion.Scope) error { - out.ImagePlan.Offer = in.Offer - out.ImagePlan.Publisher = in.Publisher - out.ImagePlan.SKU = in.SKU - - return autoConvert_v1alpha4_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(in, out, s) -} - -// Convert_v1beta1_Image_To_v1alpha4_Image converts an image from v1beta1 to v1alpha4. -func Convert_v1beta1_Image_To_v1alpha4_Image(in *infrav1.Image, out *Image, s apiconversion.Scope) error { - return autoConvert_v1beta1_Image_To_v1alpha4_Image(in, out, s) -} - -// Convert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec(in *infrav1.AzureMachineSpec, out *AzureMachineSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec(in, out, s) -} - -// Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions converts SpotVMOptions from v1beta1 to v1alpha4. -func Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(in *infrav1.SpotVMOptions, out *SpotVMOptions, s apiconversion.Scope) error { - return autoConvert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(in, out, s) -} diff --git a/api/v1alpha4/azuremachine_types.go b/api/v1alpha4/azuremachine_types.go deleted file mode 100644 index 18ea9a08ae2..00000000000 --- a/api/v1alpha4/azuremachine_types.go +++ /dev/null @@ -1,235 +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 ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - 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 ReconcileAzureMachine to clean up Azure resources associated with AzureMachine before - // removing it from the apiserver. - MachineFinalizer = "azuremachine.infrastructure.cluster.x-k8s.io" -) - -// AzureMachineSpec defines the desired state of AzureMachine. -type AzureMachineSpec struct { - // ProviderID is the unique identifier as specified by the cloud provider. - // +optional - ProviderID *string `json:"providerID,omitempty"` - - VMSize string `json:"vmSize"` - - // FailureDomain is the failure domain unique identifier this Machine should be attached to, - // as defined in Cluster API. This relates to an Azure Availability Zone - FailureDomain *string `json:"failureDomain,omitempty"` - - // Image is used to provide details of an image to use during VM creation. - // If image details are omitted the image will default the Azure Marketplace "capi" offer, - // which is based on Ubuntu. - // +kubebuilder:validation:nullable - // +optional - Image *Image `json:"image,omitempty"` - - // Identity is the type of identity used for the virtual machine. - // The type 'SystemAssigned' is an implicitly created identity. - // The generated identity will be assigned a Subscription contributor role. - // The type 'UserAssigned' is a standalone Azure resource provided by the user - // and assigned to the VM - // +kubebuilder:default=None - // +optional - Identity VMIdentity `json:"identity,omitempty"` - - // UserAssignedIdentities is a list of standalone Azure identities provided by the user - // The lifecycle of a user-assigned identity is managed separately from the lifecycle of - // the AzureMachine. - // See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - // +optional - UserAssignedIdentities []UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - - // RoleAssignmentName is the name of the role assignment to create for a system assigned identity. It can be any valid GUID. - // If not specified, a random GUID will be generated. - // +optional - RoleAssignmentName string `json:"roleAssignmentName,omitempty"` - - // OSDisk specifies the parameters for the operating system disk of the machine - OSDisk OSDisk `json:"osDisk"` - - // DataDisk specifies the parameters that are used to add one or more data disks to the machine - DataDisks []DataDisk `json:"dataDisks,omitempty"` - - SSHPublicKey string `json:"sshPublicKey"` - - // AdditionalTags is an optional set of tags to add to an instance, in addition to the ones added by default by the - // Azure provider. If both the AzureCluster and the AzureMachine specify the same tag name with different values, the - // AzureMachine's value takes precedence. - // +optional - AdditionalTags Tags `json:"additionalTags,omitempty"` - - // AllocatePublicIP allows the ability to create dynamic public ips for machines where this value is true. - // +optional - AllocatePublicIP bool `json:"allocatePublicIP,omitempty"` - - // EnableIPForwarding enables IP Forwarding in Azure which is required for some CNI's to send traffic from a pods on one machine - // to another. This is required for IpV6 with Calico in combination with User Defined Routes (set by the Azure Cloud Controller - // manager). Default is false for disabled. - // +optional - EnableIPForwarding bool `json:"enableIPForwarding,omitempty"` - - // AcceleratedNetworking enables or disables Azure accelerated networking. If omitted, it will be set based on - // whether the requested VMSize supports accelerated networking. - // If AcceleratedNetworking is set to true with a VMSize that does not support it, Azure will return an error. - // +kubebuilder:validation:nullable - // +optional - AcceleratedNetworking *bool `json:"acceleratedNetworking,omitempty"` - - // SpotVMOptions allows the ability to specify the Machine should use a Spot VM - // +optional - SpotVMOptions *SpotVMOptions `json:"spotVMOptions,omitempty"` - - // SecurityProfile specifies the Security profile settings for a virtual machine. - // +optional - SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` - - // SubnetName selects the Subnet where the VM will be placed - // +optional - SubnetName string `json:"subnetName,omitempty"` -} - -// SpotVMOptions defines the options relevant to running the Machine on Spot VMs. -type SpotVMOptions struct { - // MaxPrice defines the maximum price the user is willing to pay for Spot VM instances - // +optional - MaxPrice *resource.Quantity `json:"maxPrice,omitempty"` -} - -// AzureMachineStatus defines the observed state of AzureMachine. -type AzureMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the Azure instance associated addresses. - Addresses []corev1.NodeAddress `json:"addresses,omitempty"` - - // VMState is the provisioning state of the Azure virtual machine. - // +optional - VMState *ProvisioningState `json:"vmState,omitempty"` - - // ErrorReason 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"` - - // ErrorMessage 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 AzureMachine. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` - - // LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the - // next reconciliation loop. - // +optional - LongRunningOperationStates Futures `json:"longRunningOperationStates,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="AzureMachine ready status" -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.vmState",description="Azure VM provisioning state" -// +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureMachine belongs" -// +kubebuilder:printcolumn:name="Machine",type="string",priority=1,JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object to which this AzureMachine belongs" -// +kubebuilder:printcolumn:name="VM ID",type="string",priority=1,JSONPath=".spec.providerID",description="Azure VM ID" -// +kubebuilder:printcolumn:name="VM Size",type="string",priority=1,JSONPath=".spec.vmSize",description="Azure VM Size" -// +kubebuilder:resource:path=azuremachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureMachine is the Schema for the azuremachines API. -type AzureMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachineSpec `json:"spec,omitempty"` - Status AzureMachineStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureMachineList contains a list of AzureMachine. -type AzureMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachine `json:"items"` -} - -// GetConditions returns the list of conditions for an AzureMachine API object. -func (m *AzureMachine) GetConditions() clusterv1alpha4.Conditions { - return m.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureMachine object. -func (m *AzureMachine) SetConditions(conditions clusterv1alpha4.Conditions) { - m.Status.Conditions = conditions -} - -// GetFutures returns the list of long running operation states for an AzureMachine API object. -func (m *AzureMachine) GetFutures() Futures { - return m.Status.LongRunningOperationStates -} - -// SetFutures will set the given long running operation states on an AzureMachine object. -func (m *AzureMachine) SetFutures(futures Futures) { - m.Status.LongRunningOperationStates = futures -} - -func init() { - SchemeBuilder.Register(&AzureMachine{}, &AzureMachineList{}) -} diff --git a/api/v1alpha4/azuremachinetemplate_conversion.go b/api/v1alpha4/azuremachinetemplate_conversion.go deleted file mode 100644 index 204f359074e..00000000000 --- a/api/v1alpha4/azuremachinetemplate_conversion.go +++ /dev/null @@ -1,102 +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 ( - apimachineryconversion "k8s.io/apimachinery/pkg/conversion" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachineTemplate to the Hub version (v1beta1). -func (src *AzureMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachineTemplate) - if err := Convert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Restore missing fields from annotations - restored := &infrav1.AzureMachineTemplate{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - if dst.Spec.Template.Spec.Image != nil && restored.Spec.Template.Spec.Image.ComputeGallery != nil { - dst.Spec.Template.Spec.Image.ComputeGallery = restored.Spec.Template.Spec.Image.ComputeGallery - } - - if restored.Spec.Template.Spec.AdditionalCapabilities != nil { - dst.Spec.Template.Spec.AdditionalCapabilities = restored.Spec.Template.Spec.AdditionalCapabilities - } - - if restored.Spec.Template.Spec.Diagnostics != nil { - dst.Spec.Template.Spec.Diagnostics = restored.Spec.Template.Spec.Diagnostics - } - - dst.Spec.Template.ObjectMeta = restored.Spec.Template.ObjectMeta - - if len(restored.Spec.Template.Spec.DNSServers) > 0 { - dst.Spec.Template.Spec.DNSServers = restored.Spec.Template.Spec.DNSServers - } - - if len(restored.Spec.Template.Spec.VMExtensions) > 0 { - dst.Spec.Template.Spec.VMExtensions = restored.Spec.Template.Spec.VMExtensions - } - - if restored.Spec.Template.Spec.SpotVMOptions != nil && restored.Spec.Template.Spec.SpotVMOptions.EvictionPolicy != nil { - dst.Spec.Template.Spec.SpotVMOptions.EvictionPolicy = restored.Spec.Template.Spec.SpotVMOptions.EvictionPolicy - } - - if restored.Spec.Template.Spec.NetworkInterfaces != nil { - dst.Spec.Template.Spec.NetworkInterfaces = restored.Spec.Template.Spec.NetworkInterfaces - } - - if restored.Spec.Template.Spec.SystemAssignedIdentityRole != nil { - dst.Spec.Template.Spec.SystemAssignedIdentityRole = restored.Spec.Template.Spec.SystemAssignedIdentityRole - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachineTemplate) - if err := Convert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureMachineTemplateList to the Hub version (v1beta1). -func (src *AzureMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureMachineTemplateList) - return Convert_v1alpha4_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureMachineTemplateList) - return Convert_v1beta1_AzureMachineTemplateList_To_v1alpha4_AzureMachineTemplateList(src, dst, nil) -} - -// Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource converts an Azure Machine Template Resource from v1beta1 to v1alpha4. -func Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource(in *infrav1.AzureMachineTemplateResource, out *AzureMachineTemplateResource, s apimachineryconversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource(in, out, s) -} diff --git a/api/v1alpha4/azuremachinetemplate_types.go b/api/v1alpha4/azuremachinetemplate_types.go deleted file mode 100644 index a9224a4dd8b..00000000000 --- a/api/v1alpha4/azuremachinetemplate_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. -*/ - -package v1alpha4 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// AzureMachineTemplateSpec defines the desired state of AzureMachineTemplate. -type AzureMachineTemplateSpec struct { - Template AzureMachineTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremachinetemplates,scope=Namespaced,categories=cluster-api - -// AzureMachineTemplate is the Schema for the azuremachinetemplates API. -type AzureMachineTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachineTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureMachineTemplateList contains a list of AzureMachineTemplates. -type AzureMachineTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachineTemplate `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureMachineTemplate{}, &AzureMachineTemplateList{}) -} - -// AzureMachineTemplateResource describes the data needed to create an AzureMachine from a template. -type AzureMachineTemplateResource struct { - // Spec is the specification of the desired behavior of the machine. - Spec AzureMachineSpec `json:"spec"` -} diff --git a/api/v1alpha4/azuremanagedcluster_conversion.go b/api/v1alpha4/azuremanagedcluster_conversion.go deleted file mode 100644 index dac118b2112..00000000000 --- a/api/v1alpha4/azuremanagedcluster_conversion.go +++ /dev/null @@ -1,46 +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 ( - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureManagedCluster to the Hub version (v1beta1). -func (src *AzureManagedCluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedCluster) - return Convert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedCluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedCluster) - return Convert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster(src, dst, nil) -} - -// ConvertTo converts this AzureManagedClusterList to the Hub version (v1beta1). -func (src *AzureManagedClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedClusterList) - return Convert_v1alpha4_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedClusterList) - return Convert_v1beta1_AzureManagedClusterList_To_v1alpha4_AzureManagedClusterList(src, dst, nil) -} diff --git a/api/v1alpha4/azuremanagedcluster_types.go b/api/v1alpha4/azuremanagedcluster_types.go deleted file mode 100644 index f41076140c3..00000000000 --- a/api/v1alpha4/azuremanagedcluster_types.go +++ /dev/null @@ -1,62 +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" -) - -// AzureManagedClusterSpec defines the desired state of AzureManagedCluster. -type AzureManagedClusterSpec struct { - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1alpha4.APIEndpoint `json:"controlPlaneEndpoint"` -} - -// AzureManagedClusterStatus defines the observed state of AzureManagedCluster. -type AzureManagedClusterStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremanagedclusters,scope=Namespaced,categories=cluster-api,shortName=amc -// +kubebuilder:subresource:status - -// AzureManagedCluster is the Schema for the azuremanagedclusters API. -type AzureManagedCluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureManagedClusterSpec `json:"spec,omitempty"` - Status AzureManagedClusterStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureManagedClusterList contains a list of AzureManagedClusters. -type AzureManagedClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureManagedCluster `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureManagedCluster{}, &AzureManagedClusterList{}) -} diff --git a/api/v1alpha4/azuremanagedcontrolplane_conversion.go b/api/v1alpha4/azuremanagedcontrolplane_conversion.go deleted file mode 100644 index 8f40560976e..00000000000 --- a/api/v1alpha4/azuremanagedcontrolplane_conversion.go +++ /dev/null @@ -1,95 +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" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureManagedControlPlane to the Hub version (v1beta1). -func (src *AzureManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedControlPlane) - if err := Convert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureManagedControlPlane{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.AddonProfiles = restored.Spec.AddonProfiles - dst.Status.Conditions = restored.Status.Conditions - dst.Spec.VirtualNetwork.ResourceGroup = restored.Spec.VirtualNetwork.ResourceGroup - dst.Spec.VirtualNetwork.Subnet.ServiceEndpoints = restored.Spec.VirtualNetwork.Subnet.ServiceEndpoints - dst.Spec.VirtualNetwork.Subnet.PrivateEndpoints = restored.Spec.VirtualNetwork.Subnet.PrivateEndpoints - dst.Spec.AutoScalerProfile = restored.Spec.AutoScalerProfile - dst.Spec.OutboundType = restored.Spec.OutboundType - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedControlPlane) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedControlPlane) - if err := Convert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha4_AzureManagedControlPlaneSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha4_AzureManagedControlPlaneSpec(in *infrav1.AzureManagedControlPlaneSpec, out *AzureManagedControlPlaneSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha4_AzureManagedControlPlaneSpec(in, out, s) -} - -// Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha4_AzureManagedControlPlaneStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha4_AzureManagedControlPlaneStatus(in *infrav1.AzureManagedControlPlaneStatus, out *AzureManagedControlPlaneStatus, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha4_AzureManagedControlPlaneStatus(in, out, s) -} - -// ConvertTo converts this AzureManagedControlPlaneList to the Hub version (v1beta1). -func (src *AzureManagedControlPlaneList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedControlPlaneList) - return Convert_v1alpha4_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedControlPlaneList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedControlPlaneList) - return Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha4_AzureManagedControlPlaneList(src, dst, nil) -} - -// Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha4_ManagedControlPlaneVirtualNetwork converts v1beta1 ManagedControlPlaneVirtualNetwork to v1alpha4 ManagedControlPlaneVirtualNetwork. -func Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha4_ManagedControlPlaneVirtualNetwork(in *infrav1.ManagedControlPlaneVirtualNetwork, out *ManagedControlPlaneVirtualNetwork, s apiconversion.Scope) error { - out.Name = in.Name - out.Subnet.Name = in.Subnet.Name - out.Subnet.CIDRBlock = in.Subnet.CIDRBlock - out.CIDRBlock = in.CIDRBlock - return nil -} - -// Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha4_ManagedControlPlaneSubnet converts v1beta1 ManagedControlPlaneSubnet to v1alpha4 ManagedControlPlaneSubnet. -func Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha4_ManagedControlPlaneSubnet(in *infrav1.ManagedControlPlaneSubnet, out *ManagedControlPlaneSubnet, s apiconversion.Scope) error { - return autoConvert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha4_ManagedControlPlaneSubnet(in, out, s) -} diff --git a/api/v1alpha4/azuremanagedcontrolplane_types.go b/api/v1alpha4/azuremanagedcontrolplane_types.go deleted file mode 100644 index 4c0933ed2f0..00000000000 --- a/api/v1alpha4/azuremanagedcontrolplane_types.go +++ /dev/null @@ -1,238 +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 ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -const ( - // PrivateDNSZoneModeSystem represents mode System for azuremanagedcontrolplane. - PrivateDNSZoneModeSystem string = "System" - - // PrivateDNSZoneModeNone represents mode None for azuremanagedcontrolplane. - PrivateDNSZoneModeNone string = "None" -) - -// AzureManagedControlPlaneSpec defines the desired state of AzureManagedControlPlane. -type AzureManagedControlPlaneSpec struct { - // Version defines the desired Kubernetes version. - // +kubebuilder:validation:MinLength:=2 - Version string `json:"version"` - - // ResourceGroupName is the name of the Azure resource group for this AKS Cluster. - ResourceGroupName string `json:"resourceGroupName"` - - // NodeResourceGroupName is the name of the resource group - // containing cluster IaaS resources. Will be populated to default - // in webhook. - // +optional - NodeResourceGroupName string `json:"nodeResourceGroupName,omitempty"` - - // VirtualNetwork describes the vnet for the AKS cluster. Will be created if it does not exist. - VirtualNetwork ManagedControlPlaneVirtualNetwork `json:"virtualNetwork,omitempty"` - - // SubscriptionID is the GUID of the Azure subscription to hold this cluster. - SubscriptionID string `json:"subscriptionID,omitempty"` - - // Location is a string matching one of the canonical Azure region names. Examples: "westus2", "eastus". - Location string `json:"location"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1alpha4.APIEndpoint `json:"controlPlaneEndpoint"` - - // AdditionalTags is an optional set of tags to add to Azure resources managed by the Azure provider, in addition to the - // ones added by default. - // +optional - AdditionalTags Tags `json:"additionalTags,omitempty"` - - // NetworkPlugin used for building Kubernetes network. - // +kubebuilder:validation:Enum=azure;kubenet - // +optional - NetworkPlugin *string `json:"networkPlugin,omitempty"` - - // NetworkPolicy used for building Kubernetes network. - // +kubebuilder:validation:Enum=azure;calico - // +optional - NetworkPolicy *string `json:"networkPolicy,omitempty"` - - // SSHPublicKey is a string literal containing an ssh public key base64 encoded. - SSHPublicKey string `json:"sshPublicKey"` - - // DNSServiceIP is an IP address assigned to the Kubernetes DNS service. - // It must be within the Kubernetes service address range specified in serviceCidr. - // +optional - DNSServiceIP *string `json:"dnsServiceIP,omitempty"` - - // LoadBalancerSKU is the SKU of the loadBalancer to be provisioned. - // +kubebuilder:validation:Enum=Basic;Standard - // +optional - LoadBalancerSKU *string `json:"loadBalancerSKU,omitempty"` - - // IdentityRef is a reference to a AzureClusterIdentity to be used when reconciling this cluster - // +optional - IdentityRef *corev1.ObjectReference `json:"identityRef,omitempty"` - - // AadProfile is Azure Active Directory configuration to integrate with AKS for aad authentication. - // +optional - AADProfile *AADProfile `json:"aadProfile,omitempty"` - - // SKU is the AKSSku of the AKS to be provisioned. - // +optional - SKU *AKSSku `json:"sku,omitempty"` - - // LoadBalancerProfile is the profile of the cluster load balancer. - // +optional - LoadBalancerProfile *LoadBalancerProfile `json:"loadBalancerProfile,omitempty"` - - // APIServerAccessProfile is the access profile for AKS API server. - // +optional - APIServerAccessProfile *APIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` -} - -// AADProfile - AAD integration managed by AKS. -type AADProfile struct { - // Managed - Whether to enable managed AAD. - // +kubebuilder:validation:Required - Managed bool `json:"managed"` - - // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster. - // +kubebuilder:validation:Required - AdminGroupObjectIDs []string `json:"adminGroupObjectIDs"` -} - -// AKSSku - AKS SKU. -type AKSSku struct { - // Tier - Tier of a managed cluster SKU. - // +kubebuilder:validation:Enum=Free;Paid - Tier string `json:"tier"` -} - -// LoadBalancerProfile - Profile of the cluster load balancer. -type LoadBalancerProfile struct { - // Load balancer profile must specify at most one of ManagedOutboundIPs, OutboundIPPrefixes and OutboundIPs. - // By default the AKS cluster automatically creates a public IP in the AKS-managed infrastructure resource group and assigns it to the load balancer outbound pool. - // Alternatively, you can assign your own custom public IP or public IP prefix at cluster creation time. - // See https://docs.microsoft.com/en-us/azure/aks/load-balancer-standard#provide-your-own-outbound-public-ips-or-prefixes - - // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer. - // +optional - ManagedOutboundIPs *int32 `json:"managedOutboundIPs,omitempty"` - - // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer. - // +optional - OutboundIPPrefixes []string `json:"outboundIPPrefixes,omitempty"` - - // OutboundIPs - Desired outbound IP resources for the cluster load balancer. - // +optional - OutboundIPs []string `json:"outboundIPs,omitempty"` - - // AllocatedOutboundPorts - Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. - // +optional - AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` - - // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes. - // +optional - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` -} - -// APIServerAccessProfile - access profile for AKS API server. -type APIServerAccessProfile struct { - // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server. - // +optional - AuthorizedIPRanges []string `json:"authorizedIPRanges,omitempty"` - // EnablePrivateCluster - Whether to create the cluster as a private cluster or not. - // +optional - EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"` - // PrivateDNSZone - Private dns zone mode for private cluster. - // +kubebuilder:validation:Enum=System;None - // +optional - PrivateDNSZone *string `json:"privateDNSZone,omitempty"` - // EnablePrivateClusterPublicFQDN - Whether to create additional public FQDN for private cluster or not. - // +optional - EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"` -} - -// ManagedControlPlaneVirtualNetwork describes a virtual network required to provision AKS clusters. -type ManagedControlPlaneVirtualNetwork struct { - Name string `json:"name"` - CIDRBlock string `json:"cidrBlock"` - Subnet ManagedControlPlaneSubnet `json:"subnet,omitempty"` -} - -// ManagedControlPlaneSubnet describes a subnet for an AKS cluster. -type ManagedControlPlaneSubnet struct { - Name string `json:"name"` - CIDRBlock string `json:"cidrBlock"` -} - -// AzureManagedControlPlaneStatus defines the observed state of AzureManagedControlPlane. -type AzureManagedControlPlaneStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready,omitempty"` - - // Initialized is true when the the control plane is available for initial contact. - // This may occur before the control plane is fully ready. - // In the AzureManagedControlPlane implementation, these are identical. - // +optional - Initialized bool `json:"initialized,omitempty"` - - // LongRunningOperationStates saves the states for Azure long-running operations so they can be continued on the - // next reconciliation loop. - // +optional - LongRunningOperationStates Futures `json:"longRunningOperationStates,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremanagedcontrolplanes,scope=Namespaced,categories=cluster-api,shortName=amcp -// +kubebuilder:subresource:status - -// AzureManagedControlPlane is the Schema for the azuremanagedcontrolplanes API. -type AzureManagedControlPlane struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureManagedControlPlaneSpec `json:"spec,omitempty"` - Status AzureManagedControlPlaneStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureManagedControlPlaneList contains a list of AzureManagedControlPlane. -type AzureManagedControlPlaneList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureManagedControlPlane `json:"items"` -} - -// GetFutures returns the list of long running operation states for an AzureManagedControlPlane API object. -func (m *AzureManagedControlPlane) GetFutures() Futures { - return m.Status.LongRunningOperationStates -} - -// SetFutures will set the given long running operation states on an AzureManagedControlPlane object. -func (m *AzureManagedControlPlane) SetFutures(futures Futures) { - m.Status.LongRunningOperationStates = futures -} - -func init() { - SchemeBuilder.Register(&AzureManagedControlPlane{}, &AzureManagedControlPlaneList{}) -} diff --git a/api/v1alpha4/azuremanagedmachinepool_conversion.go b/api/v1alpha4/azuremanagedmachinepool_conversion.go deleted file mode 100644 index 847783c0933..00000000000 --- a/api/v1alpha4/azuremanagedmachinepool_conversion.go +++ /dev/null @@ -1,97 +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" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureManagedMachinePool to the Hub version (v1beta1). -func (src *AzureManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedMachinePool) - if err := Convert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1.AzureManagedMachinePool{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - dst.Spec.Scaling = restored.Spec.Scaling - dst.Spec.Name = restored.Spec.Name - dst.Spec.Taints = restored.Spec.Taints - dst.Spec.AvailabilityZones = restored.Spec.AvailabilityZones - dst.Spec.MaxPods = restored.Spec.MaxPods - dst.Spec.OsDiskType = restored.Spec.OsDiskType - dst.Spec.OSType = restored.Spec.OSType - dst.Spec.NodeLabels = restored.Spec.NodeLabels - dst.Spec.EnableUltraSSD = restored.Spec.EnableUltraSSD - dst.Spec.EnableNodePublicIP = restored.Spec.EnableNodePublicIP - dst.Spec.NodePublicIPPrefixID = restored.Spec.NodePublicIPPrefixID - dst.Spec.ScaleSetPriority = restored.Spec.ScaleSetPriority - dst.Spec.AdditionalTags = restored.Spec.AdditionalTags - dst.Spec.KubeletDiskType = restored.Spec.KubeletDiskType - dst.Spec.LinuxOSConfig = restored.Spec.LinuxOSConfig - - if restored.Spec.KubeletConfig != nil { - dst.Spec.KubeletConfig = restored.Spec.KubeletConfig - } - dst.Spec.SubnetName = restored.Spec.SubnetName - - dst.Status.LongRunningOperationStates = restored.Status.LongRunningOperationStates - dst.Status.Conditions = restored.Status.Conditions - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedMachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedMachinePool) - if err := Convert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha4_AzureManagedMachinePoolSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha4_AzureManagedMachinePoolSpec(in *infrav1.AzureManagedMachinePoolSpec, out *AzureManagedMachinePoolSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha4_AzureManagedMachinePoolSpec(in, out, s) -} - -// Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha4_AzureManagedMachinePoolStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha4_AzureManagedMachinePoolStatus(in *infrav1.AzureManagedMachinePoolStatus, out *AzureManagedMachinePoolStatus, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha4_AzureManagedMachinePoolStatus(in, out, s) -} - -// ConvertTo converts this AzureManagedMachinePoolList to the Hub version (v1beta1). -func (src *AzureManagedMachinePoolList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1.AzureManagedMachinePoolList) - return Convert_v1alpha4_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureManagedMachinePoolList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1.AzureManagedMachinePoolList) - return Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha4_AzureManagedMachinePoolList(src, dst, nil) -} diff --git a/api/v1alpha4/azuremanagedmachinepool_types.go b/api/v1alpha4/azuremanagedmachinepool_types.go deleted file mode 100644 index 646c8a3b859..00000000000 --- a/api/v1alpha4/azuremanagedmachinepool_types.go +++ /dev/null @@ -1,108 +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" - capierrors "sigs.k8s.io/cluster-api/errors" -) - -const ( - // LabelAgentPoolMode represents mode of an agent pool. Possible values include: System, User. - LabelAgentPoolMode = "azuremanagedmachinepool.infrastructure.cluster.x-k8s.io/agentpoolmode" - - // NodePoolModeSystem represents mode system for azuremachinepool. - NodePoolModeSystem NodePoolMode = "System" - - // NodePoolModeUser represents mode user for azuremachinepool. - NodePoolModeUser NodePoolMode = "User" -) - -// NodePoolMode enumerates the values for agent pool mode. -type NodePoolMode string - -// AzureManagedMachinePoolSpec defines the desired state of AzureManagedMachinePool. -type AzureManagedMachinePoolSpec struct { - - // Name - name of the agent pool. If not specified, CAPZ uses the name of the CR as the agent pool name. - // +optional - Name *string `json:"name,omitempty"` - - // Mode - represents mode of an agent pool. Possible values include: System, User. - // +kubebuilder:validation:Enum=System;User - Mode string `json:"mode"` - - // SKU is the size of the VMs in the node pool. - SKU string `json:"sku"` - - // OSDiskSizeGB is the disk size for every machine in this agent pool. - // If you specify 0, it will apply the default osDisk size according to the vmSize specified. - OSDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` - - // ProviderIDList is the unique identifier as specified by the cloud provider. - // +optional - ProviderIDList []string `json:"providerIDList,omitempty"` -} - -// AzureManagedMachinePoolStatus defines the observed state of AzureManagedMachinePool. -type AzureManagedMachinePoolStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Replicas is the most recently observed number of replicas. - // +optional - Replicas int32 `json:"replicas"` - - // 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 - ErrorReason *capierrors.MachineStatusError `json:"errorReason,omitempty"` - - // 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 - ErrorMessage *string `json:"errorMessage,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azuremanagedmachinepools,scope=Namespaced,categories=cluster-api,shortName=ammp -// +kubebuilder:subresource:status - -// AzureManagedMachinePool is the Schema for the azuremanagedmachinepools API. -type AzureManagedMachinePool struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureManagedMachinePoolSpec `json:"spec,omitempty"` - Status AzureManagedMachinePoolStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureManagedMachinePoolList contains a list of AzureManagedMachinePools. -type AzureManagedMachinePoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureManagedMachinePool `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureManagedMachinePool{}, &AzureManagedMachinePoolList{}) -} diff --git a/api/v1alpha4/conditions_consts.go b/api/v1alpha4/conditions_consts.go deleted file mode 100644 index 49ec91384ad..00000000000 --- a/api/v1alpha4/conditions_consts.go +++ /dev/null @@ -1,120 +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 clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - -// AzureCluster Conditions and Reasons. -const ( - // NetworkInfrastructureReadyCondition reports of current status of cluster infrastructure. - NetworkInfrastructureReadyCondition clusterv1alpha4.ConditionType = "NetworkInfrastructureReady" - // NamespaceNotAllowedByIdentity used to indicate cluster in a namespace not allowed by identity. - NamespaceNotAllowedByIdentity = "NamespaceNotAllowedByIdentity" -) - -// AzureMachine Conditions and Reasons. -const ( - // VMRunningCondition reports on current status of the Azure VM. - VMRunningCondition clusterv1alpha4.ConditionType = "VMRunning" - // VMCreatingReason used when the vm creation is in progress. - VMCreatingReason = "VMCreating" - // VMUpdatingReason used when the vm updating is in progress. - VMUpdatingReason = "VMUpdating" - // VMDeletingReason used when the vm is in a deleting state. - VMDeletingReason = "VMDeleting" - // VMProvisionFailedReason used for failures during vm provisioning. - VMProvisionFailedReason = "VMProvisionFailed" - // WaitingForClusterInfrastructureReason used when machine is waiting for cluster infrastructure to be ready before proceeding. - WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" - // WaitingForBootstrapDataReason used when machine is waiting for bootstrap data to be ready before proceeding. - WaitingForBootstrapDataReason = "WaitingForBootstrapData" - // BootstrapSucceededCondition reports the result of the execution of the bootstrap data on the machine. - BootstrapSucceededCondition = "BoostrapSucceeded" - // BootstrapInProgressReason is used to indicate the bootstrap data has not finished executing. - BootstrapInProgressReason = "BootstrapInProgress" - // BootstrapFailedReason is used to indicate the bootstrap process ran into an error. - BootstrapFailedReason = "BootstrapFailed" -) - -// AzureMachinePool Conditions and Reasons. -const ( - // ScaleSetRunningCondition reports on current status of the Azure Scale Set. - ScaleSetRunningCondition clusterv1alpha4.ConditionType = "ScaleSetRunning" - // ScaleSetCreatingReason used when the scale set creation is in progress. - ScaleSetCreatingReason = "ScaleSetCreating" - // ScaleSetUpdatingReason used when the scale set updating is in progress. - ScaleSetUpdatingReason = "ScaleSetUpdating" - // ScaleSetDeletingReason used when the scale set is in a deleting state. - ScaleSetDeletingReason = "ScaleSetDeleting" - // ScaleSetProvisionFailedReason used for failures during scale set provisioning. - ScaleSetProvisionFailedReason = "ScaleSetProvisionFailed" - - // ScaleSetDesiredReplicasCondition reports on the scaling state of the machine pool. - ScaleSetDesiredReplicasCondition clusterv1alpha4.ConditionType = "ScaleSetDesiredReplicas" - // ScaleSetScaleUpReason describes the machine pool scaling up. - ScaleSetScaleUpReason = "ScaleSetScalingUp" - // ScaleSetScaleDownReason describes the machine pool scaling down. - ScaleSetScaleDownReason = "ScaleSetScalingDown" - - // ScaleSetModelUpdatedCondition reports on the model state of the pool. - ScaleSetModelUpdatedCondition clusterv1alpha4.ConditionType = "ScaleSetModelUpdated" - // ScaleSetModelOutOfDateReason describes the machine pool model being out of date. - ScaleSetModelOutOfDateReason = "ScaleSetModelOutOfDate" -) - -// Azure Services Conditions and Reasons. -const ( - // ResourceGroupReadyCondition means the resource group exists and is ready to be used. - ResourceGroupReadyCondition clusterv1alpha4.ConditionType = "ResourceGroupReady" - // VNetReadyCondition means the virtual network exists and is ready to be used. - VNetReadyCondition clusterv1alpha4.ConditionType = "VNetReady" - // SecurityGroupsReadyCondition means the security groups exist and are ready to be used. - SecurityGroupsReadyCondition clusterv1alpha4.ConditionType = "SecurityGroupsReady" - // RouteTablesReadyCondition means the route tables exist and are ready to be used. - RouteTablesReadyCondition clusterv1alpha4.ConditionType = "RouteTablesReady" - // PublicIPsReadyCondition means the public IPs exist and are ready to be used. - PublicIPsReadyCondition clusterv1alpha4.ConditionType = "PublicIPsReady" - // NATGatewaysReadyCondition means the NAT gateways exist and are ready to be used. - NATGatewaysReadyCondition clusterv1alpha4.ConditionType = "NATGatewaysReady" - // SubnetsReadyCondition means the subnets exist and are ready to be used. - SubnetsReadyCondition clusterv1alpha4.ConditionType = "SubnetsReady" - // LoadBalancersReadyCondition means the load balancers exist and are ready to be used. - LoadBalancersReadyCondition clusterv1alpha4.ConditionType = "LoadBalancersReady" - // PrivateDNSReadyCondition means the private DNS exists and is ready to be used. - PrivateDNSReadyCondition clusterv1alpha4.ConditionType = "PrivateDNSReady" - // BastionHostReadyCondition means the bastion host exists and is ready to be used. - BastionHostReadyCondition clusterv1alpha4.ConditionType = "BastionHostReady" - // InboundNATRulesReadyCondition means the inbound NAT rules exist and are ready to be used. - InboundNATRulesReadyCondition clusterv1alpha4.ConditionType = "InboundNATRulesReady" - // AvailabilitySetReadyCondition means the availability set exists and is ready to be used. - AvailabilitySetReadyCondition clusterv1alpha4.ConditionType = "AvailabilitySetReady" - // RoleAssignmentReadyCondition means the role assignment exists and is ready to be used. - RoleAssignmentReadyCondition clusterv1alpha4.ConditionType = "RoleAssignmentReady" - - // CreatingReason means the resource is being created. - CreatingReason = "Creating" - // FailedReason means the resource failed to be created. - FailedReason = "Failed" - // DeletingReason means the resource is being deleted. - DeletingReason = "Deleting" - // DeletedReason means the resource was deleted. - DeletedReason = "Deleted" - // DeletionFailedReason means the resource failed to be deleted. - DeletionFailedReason = "DeletionFailed" - // UpdatingReason means the resource is being updated. - UpdatingReason = "Updating" -) diff --git a/api/v1alpha4/conversion_test.go b/api/v1alpha4/conversion_test.go deleted file mode 100644 index 66fcf12811c..00000000000 --- a/api/v1alpha4/conversion_test.go +++ /dev/null @@ -1,75 +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 ( - "testing" - - . "github.com/onsi/gomega" - "k8s.io/apimachinery/pkg/runtime" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -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 AzureCluster", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureCluster{}, - Spoke: &AzureCluster{}, - })) - - t.Run("for AzureMachine", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureMachine{}, - Spoke: &AzureMachine{}, - })) - - t.Run("for AzureMachineTemplate", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureMachineTemplate{}, - Spoke: &AzureMachineTemplate{}, - })) - - t.Run("for AzureClusterIdentity", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureClusterIdentity{}, - Spoke: &AzureClusterIdentity{}, - })) - - t.Run("for AzureManagedCluster", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureManagedCluster{}, - Spoke: &AzureManagedCluster{}, - })) - - t.Run("for AzureManagedControlPlane", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureManagedControlPlane{}, - Spoke: &AzureManagedControlPlane{}, - })) - - t.Run("for AzureManagedMachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1.AzureManagedMachinePool{}, - Spoke: &AzureManagedMachinePool{}, - })) -} diff --git a/api/v1alpha4/doc.go b/api/v1alpha4/doc.go deleted file mode 100644 index e6a873b2c8e..00000000000 --- a/api/v1alpha4/doc.go +++ /dev/null @@ -1,19 +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 - -// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-azure/api/v1beta1 diff --git a/api/v1alpha4/groupversion_info.go b/api/v1alpha4/groupversion_info.go deleted file mode 100644 index 728422c86d2..00000000000 --- a/api/v1alpha4/groupversion_info.go +++ /dev/null @@ -1,39 +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 -package v1alpha4 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha4"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = SchemeBuilder.SchemeBuilder -) diff --git a/api/v1alpha4/tags.go b/api/v1alpha4/tags.go deleted file mode 100644 index a7adad92047..00000000000 --- a/api/v1alpha4/tags.go +++ /dev/null @@ -1,197 +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 ( - "fmt" - "reflect" -) - -// Tags defines a map of tags. -type Tags map[string]string - -// Equals returns true if the tags are equal. -func (t Tags) Equals(other Tags) bool { - return reflect.DeepEqual(t, other) -} - -// HasMatchingSpecVersionHash returns true if the resource has been tagged with a matching resource spec hash value. -func (t Tags) HasMatchingSpecVersionHash(hash string) bool { - value, ok := t[SpecVersionHashTagKey()] - return ok && value == hash -} - -// HasOwned returns true if the tags contains a tag that marks the resource as owned by the cluster from the perspective of this management tooling. -func (t Tags) HasOwned(cluster string) bool { - value, ok := t[ClusterTagKey(cluster)] - return ok && ResourceLifecycle(value) == ResourceLifecycleOwned -} - -// HasAzureCloudProviderOwned returns true if the tags contains a tag that marks the resource as owned by the cluster from the perspective of the in-tree cloud provider. -func (t Tags) HasAzureCloudProviderOwned(cluster string) bool { - value, ok := t[ClusterAzureCloudProviderTagKey(cluster)] - return ok && ResourceLifecycle(value) == ResourceLifecycleOwned -} - -// GetRole returns the Cluster API role for the tagged resource. -func (t Tags) GetRole() string { - return t[NameAzureClusterAPIRole] -} - -// Difference returns the difference between this map of tags and the other map of tags. -// Items are considered equals if key and value are equals. -func (t Tags) Difference(other Tags) Tags { - res := make(Tags, len(t)) - - for key, value := range t { - if otherValue, ok := other[key]; ok && value == otherValue { - continue - } - res[key] = value - } - - return res -} - -// Merge merges in tags from other. If a tag already exists, it is replaced by the tag in other. -func (t Tags) Merge(other Tags) { - for k, v := range other { - t[k] = v - } -} - -// AddSpecVersionHashTag adds a spec version hash to the Azure resource tags to determine quickly if state has changed. -func (t Tags) AddSpecVersionHashTag(hash string) Tags { - t[SpecVersionHashTagKey()] = hash - return t -} - -// ResourceLifecycle configures the lifecycle of a resource. -type ResourceLifecycle string - -const ( - // ResourceLifecycleOwned is the value we use when tagging resources to indicate - // that the resource is considered owned and managed by the cluster, - // and in particular that the lifecycle is tied to the lifecycle of the cluster. - ResourceLifecycleOwned = ResourceLifecycle("owned") - - // ResourceLifecycleShared is the value we use when tagging resources to indicate - // that the resource is shared between multiple clusters, and should not be destroyed - // if the cluster is destroyed. - ResourceLifecycleShared = ResourceLifecycle("shared") - - // NameKubernetesAzureCloudProviderPrefix is the tag name used by the cloud provider to logically - // separate independent cluster resources. We use it to identify which resources we expect - // to be permissive about state changes. - // logically independent clusters running in the same AZ. - // The tag key = NameKubernetesAzureCloudProviderPrefix + clusterID. - // The tag value is an ownership value. - NameKubernetesAzureCloudProviderPrefix = "kubernetes.io_cluster_" - - // NameAzureProviderPrefix is the tag prefix we use to differentiate - // cluster-api-provider-azure owned components from other tooling that - // uses NameKubernetesClusterPrefix. - NameAzureProviderPrefix = "sigs.k8s.io_cluster-api-provider-azure_" - - // NameAzureProviderOwned is the tag name we use to differentiate - // cluster-api-provider-azure owned components from other tooling that - // uses NameKubernetesClusterPrefix. - NameAzureProviderOwned = NameAzureProviderPrefix + "cluster_" - - // NameAzureClusterAPIRole is the tag name we use to mark roles for resources - // dedicated to this cluster api provider implementation. - NameAzureClusterAPIRole = NameAzureProviderPrefix + "role" - - // APIServerRole describes the value for the apiserver role. - APIServerRole = "apiserver" - - // NodeOutboundRole describes the value for the node outbound LB role. - NodeOutboundRole = "nodeOutbound" - - // ControlPlaneOutboundRole describes the value for the control plane outbound LB role. - ControlPlaneOutboundRole = "controlPlaneOutbound" - - // BastionRole describes the value for the bastion role. - BastionRole = "bastion" - - // CommonRole describes the value for the common role. - CommonRole = "common" - - // VMTagsLastAppliedAnnotation is the key for the machine object annotation - // which tracks the AdditionalTags in the Machine Provider Config. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - // for annotation formatting rules. - VMTagsLastAppliedAnnotation = "sigs.k8s.io/cluster-api-provider-azure-last-applied-tags-vm" -) - -// SpecVersionHashTagKey is the key for the spec version hash used to enable quick spec difference comparison. -func SpecVersionHashTagKey() string { - return fmt.Sprintf("%s%s", NameAzureProviderPrefix, "spec-version-hash") -} - -// ClusterTagKey generates the key for resources associated with a cluster. -func ClusterTagKey(name string) string { - return fmt.Sprintf("%s%s", NameAzureProviderOwned, name) -} - -// ClusterAzureCloudProviderTagKey generates the key for resources associated a cluster's Azure cloud provider. -func ClusterAzureCloudProviderTagKey(name string) string { - return fmt.Sprintf("%s%s", NameKubernetesAzureCloudProviderPrefix, name) -} - -// BuildParams is used to build tags around an azure resource. -type BuildParams struct { - // Lifecycle determines the resource lifecycle. - Lifecycle ResourceLifecycle - - // ClusterName is the cluster associated with the resource. - ClusterName string - - // ResourceID is the unique identifier of the resource to be tagged. - ResourceID string - - // Name is the name of the resource, it's applied as the tag "Name" on Azure. - // +optional - Name *string - - // Role is the role associated to the resource. - // +optional - Role *string - - // Any additional tags to be added to the resource. - // +optional - Additional Tags -} - -// Build builds tags including the cluster tag and returns them in map form. -func Build(params BuildParams) Tags { - tags := make(Tags) - for k, v := range params.Additional { - tags[k] = v - } - - tags[ClusterTagKey(params.ClusterName)] = string(params.Lifecycle) - if params.Role != nil { - tags[NameAzureClusterAPIRole] = *params.Role - } - - if params.Name != nil { - tags["Name"] = *params.Name - } - - return tags -} diff --git a/api/v1alpha4/tags_test.go b/api/v1alpha4/tags_test.go deleted file mode 100644 index 3c8cac5f03f..00000000000 --- a/api/v1alpha4/tags_test.go +++ /dev/null @@ -1,90 +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 ( - "testing" - - . "github.com/onsi/gomega" -) - -func TestTags_Merge(t *testing.T) { - g := NewWithT(t) - - tests := []struct { - name string - other Tags - expected Tags - }{ - { - name: "nil other", - other: nil, - expected: Tags{ - "a": "b", - "c": "d", - }, - }, - { - name: "empty other", - other: Tags{}, - expected: Tags{ - "a": "b", - "c": "d", - }, - }, - { - name: "disjoint", - other: Tags{ - "1": "2", - "3": "4", - }, - expected: Tags{ - "a": "b", - "c": "d", - "1": "2", - "3": "4", - }, - }, - { - name: "overlapping, other wins", - other: Tags{ - "1": "2", - "3": "4", - "a": "hello", - }, - expected: Tags{ - "a": "hello", - "c": "d", - "1": "2", - "3": "4", - }, - }, - } - for _, tc := range tests { - tc := tc - t.Run(tc.name, func(t *testing.T) { - t.Parallel() - tags := Tags{ - "a": "b", - "c": "d", - } - - tags.Merge(tc.other) - g.Expect(tags).To(Equal(tc.expected)) - }) - } -} diff --git a/api/v1alpha4/types.go b/api/v1alpha4/types.go deleted file mode 100644 index 663d231f7c0..00000000000 --- a/api/v1alpha4/types.go +++ /dev/null @@ -1,657 +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 ( - "github.com/pkg/errors" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" -) - -const ( - // ControlPlane machine label. - ControlPlane string = "control-plane" - // Node machine label. - Node string = "node" -) - -// Futures is a slice of Future. -type Futures []Future - -const ( - // PatchFuture is a future that was derived from a PATCH request. - PatchFuture string = "PATCH" - // PutFuture is a future that was derived from a PUT request. - PutFuture string = "PUT" - // DeleteFuture is a future that was derived from a DELETE request. - DeleteFuture string = "DELETE" -) - -// Future contains the data needed for an Azure long-running operation to continue across reconcile loops. -type Future struct { - // Type describes the type of future, such as update, create, delete, etc. - Type string `json:"type"` - - // ResourceGroup is the Azure resource group for the resource. - // +optional - ResourceGroup string `json:"resourceGroup,omitempty"` - - // ServiceName is the name of the Azure service. - // Together with the name of the resource, this forms the unique identifier for the future. - ServiceName string `json:"serviceName"` - - // Name is the name of the Azure resource. - // Together with the service name, this forms the unique identifier for the future. - Name string `json:"name"` - - // Data is the base64 url encoded json Azure AutoRest Future. - Data string `json:"data,omitempty"` -} - -// NetworkSpec specifies what the Azure networking resources should look like. -type NetworkSpec struct { - // Vnet is the configuration for the Azure virtual network. - // +optional - Vnet VnetSpec `json:"vnet,omitempty"` - - // Subnets is the configuration for the control-plane subnet and the node subnet. - // +optional - Subnets Subnets `json:"subnets,omitempty"` - - // APIServerLB is the configuration for the control-plane load balancer. - // +optional - APIServerLB LoadBalancerSpec `json:"apiServerLB,omitempty"` - - // NodeOutboundLB is the configuration for the node outbound load balancer. - // +optional - NodeOutboundLB *LoadBalancerSpec `json:"nodeOutboundLB,omitempty"` - - // ControlPlaneOutboundLB is the configuration for the control-plane outbound load balancer. - // This is different from APIServerLB, and is used only in private clusters (optionally) for enabling outbound traffic. - // +optional - ControlPlaneOutboundLB *LoadBalancerSpec `json:"controlPlaneOutboundLB,omitempty"` - - // PrivateDNSZoneName defines the zone name for the Azure Private DNS. - // +optional - PrivateDNSZoneName string `json:"privateDNSZoneName,omitempty"` -} - -// VnetSpec configures an Azure virtual network. -type VnetSpec struct { - // ResourceGroup is the name of the resource group of the existing virtual network - // or the resource group where a managed virtual network should be created. - ResourceGroup string `json:"resourceGroup,omitempty"` - - // ID is the identifier of the virtual network this provider should use to create resources. - ID string `json:"id,omitempty"` - - // Name defines a name for the virtual network resource. - Name string `json:"name"` - - // CIDRBlocks defines the virtual network's address space, specified as one or more address prefixes in CIDR notation. - // +optional - CIDRBlocks []string `json:"cidrBlocks,omitempty"` - - // Tags is a collection of tags describing the resource. - // +optional - Tags Tags `json:"tags,omitempty"` -} - -// IsManaged returns true if the vnet is managed. -func (v *VnetSpec) IsManaged(clusterName string) bool { - return v.ID == "" || v.Tags.HasOwned(clusterName) -} - -// Subnets is a slice of Subnet. -type Subnets []SubnetSpec - -// SecurityGroup defines an Azure security group. -type SecurityGroup struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - SecurityRules SecurityRules `json:"securityRules,omitempty"` - Tags Tags `json:"tags,omitempty"` -} - -// RouteTable defines an Azure route table. -type RouteTable struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` -} - -// NatGateway defines an Azure Nat Gateway. -// NAT gateway resources are part of Vnet NAT and provide outbound Internet connectivity for subnets of a virtual network. -type NatGateway struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - NatGatewayIP PublicIPSpec `json:"ip,omitempty"` -} - -// SecurityGroupProtocol defines the protocol type for a security group rule. -type SecurityGroupProtocol string - -const ( - // SecurityGroupProtocolAll is a wildcard for all IP protocols. - SecurityGroupProtocolAll = SecurityGroupProtocol("*") - // SecurityGroupProtocolTCP represents the TCP protocol. - SecurityGroupProtocolTCP = SecurityGroupProtocol("Tcp") - // SecurityGroupProtocolUDP represents the UDP protocol. - SecurityGroupProtocolUDP = SecurityGroupProtocol("Udp") - // SecurityGroupProtocolICMP represents the ICMP protocol. - SecurityGroupProtocolICMP = SecurityGroupProtocol("Icmp") -) - -// SecurityRuleDirection defines the direction type for a security group rule. -type SecurityRuleDirection string - -const ( - // SecurityRuleDirectionInbound defines an ingress security rule. - SecurityRuleDirectionInbound = SecurityRuleDirection("Inbound") - - // SecurityRuleDirectionOutbound defines an egress security rule. - SecurityRuleDirectionOutbound = SecurityRuleDirection("Outbound") -) - -// SecurityRule defines an Azure security rule for security groups. -type SecurityRule struct { - // Name is a unique name within the network security group. - Name string `json:"name"` - // A description for this rule. Restricted to 140 chars. - Description string `json:"description"` - // Protocol specifies the protocol type. "Tcp", "Udp", "Icmp", or "*". - // +kubebuilder:validation:Enum=Tcp;Udp;Icmp;* - Protocol SecurityGroupProtocol `json:"protocol"` - // Direction indicates whether the rule applies to inbound, or outbound traffic. "Inbound" or "Outbound". - // +kubebuilder:validation:Enum=Inbound;Outbound - Direction SecurityRuleDirection `json:"direction"` - // Priority is a number between 100 and 4096. Each rule should have a unique value for priority. Rules are processed in priority order, with lower numbers processed before higher numbers. Once traffic matches a rule, processing stops. - Priority int32 `json:"priority,omitempty"` - // SourcePorts specifies source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. - SourcePorts *string `json:"sourcePorts,omitempty"` - // DestinationPorts specifies the destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports. - DestinationPorts *string `json:"destinationPorts,omitempty"` - // Source specifies the CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from. - Source *string `json:"source,omitempty"` - // Destination is the destination address prefix. CIDR or destination IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - Destination *string `json:"destination,omitempty"` -} - -// SecurityRules is a slice of Azure security rules for security groups. -type SecurityRules []SecurityRule - -// LoadBalancerSpec defines an Azure load balancer. -type LoadBalancerSpec struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - SKU SKU `json:"sku,omitempty"` - FrontendIPs []FrontendIP `json:"frontendIPs,omitempty"` - Type LBType `json:"type,omitempty"` - // FrontendIPsCount specifies the number of frontend IP addresses for the load balancer. - FrontendIPsCount *int32 `json:"frontendIPsCount,omitempty"` - // IdleTimeoutInMinutes specifies the timeout for the TCP idle connection. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` -} - -// SKU defines an Azure load balancer SKU. -type SKU string - -const ( - // SKUStandard is the value for the Azure load balancer Standard SKU. - SKUStandard = SKU("Standard") -) - -// LBType defines an Azure load balancer Type. -type LBType string - -const ( - // Internal is the value for the Azure load balancer internal type. - Internal = LBType("Internal") - // Public is the value for the Azure load balancer public type. - Public = LBType("Public") -) - -// FrontendIP defines a load balancer frontend IP configuration. -type FrontendIP struct { - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` - // +optional - PrivateIPAddress string `json:"privateIP,omitempty"` - // +optional - PublicIP *PublicIPSpec `json:"publicIP,omitempty"` -} - -// PublicIPSpec defines the inputs to create an Azure public IP address. -type PublicIPSpec struct { - Name string `json:"name"` - // +optional - DNSName string `json:"dnsName,omitempty"` -} - -// VMState describes the state of an Azure virtual machine. -// Deprecated: use ProvisioningState. -type VMState string - -// ProvisioningState describes the provisioning state of an Azure resource. -type ProvisioningState string - -const ( - // Creating ... - Creating ProvisioningState = "Creating" - // Deleting ... - Deleting ProvisioningState = "Deleting" - // Failed ... - Failed ProvisioningState = "Failed" - // Migrating ... - Migrating ProvisioningState = "Migrating" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" - // Updating ... - Updating ProvisioningState = "Updating" - // Canceled represents an action which was initiated but terminated by the user before completion. - Canceled ProvisioningState = "Canceled" - // Deleted represents a deleted VM - // NOTE: This state is specific to capz, and does not have corresponding mapping in Azure API (https://docs.microsoft.com/en-us/azure/virtual-machines/states-billing#provisioning-states) - Deleted ProvisioningState = "Deleted" -) - -// VM describes an Azure virtual machine. -type VM struct { - ID string `json:"id,omitempty"` - Name string `json:"name,omitempty"` - AvailabilityZone string `json:"availabilityZone,omitempty"` - // Hardware profile - VMSize string `json:"vmSize,omitempty"` - // Storage profile - Image Image `json:"image,omitempty"` - OSDisk OSDisk `json:"osDisk,omitempty"` - StartupScript string `json:"startupScript,omitempty"` - // State - The provisioning state, which only appears in the response. - State ProvisioningState `json:"vmState,omitempty"` - Identity VMIdentity `json:"identity,omitempty"` - Tags Tags `json:"tags,omitempty"` - - // Addresses contains the addresses associated with the Azure VM. - Addresses []corev1.NodeAddress `json:"addresses,omitempty"` -} - -// Image defines information about the image to use for VM creation. -// There are three ways to specify an image: by ID, Marketplace Image or SharedImageGallery -// One of ID, SharedImage or Marketplace should be set. -type Image struct { - // ID specifies an image to use by ID - // +optional - ID *string `json:"id,omitempty"` - - // SharedGallery specifies an image to use from an Azure Shared Image Gallery - // +optional - SharedGallery *AzureSharedGalleryImage `json:"sharedGallery,omitempty"` - - // Marketplace specifies an image to use from the Azure Marketplace - // +optional - Marketplace *AzureMarketplaceImage `json:"marketplace,omitempty"` -} - -// AzureMarketplaceImage defines an image in the Azure Marketplace to use for VM creation. -type AzureMarketplaceImage struct { - // Publisher is the name of the organization that created the image - // +kubebuilder:validation:MinLength=1 - Publisher string `json:"publisher"` - // Offer specifies the name of a group of related images created by the publisher. - // For example, UbuntuServer, WindowsServer - // +kubebuilder:validation:MinLength=1 - Offer string `json:"offer"` - // SKU specifies an instance of an offer, such as a major release of a distribution. - // For example, 18.04-LTS, 2019-Datacenter - // +kubebuilder:validation:MinLength=1 - SKU string `json:"sku"` - // Version specifies the version of an image sku. The allowed formats - // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. - // Specify 'latest' to use the latest version of an image available at deploy time. - // Even if you use 'latest', the VM image will not automatically update after deploy - // time even if a new version becomes available. - // +kubebuilder:validation:MinLength=1 - Version string `json:"version"` - // ThirdPartyImage indicates the image is published by a third party publisher and a Plan - // will be generated for it. - // +kubebuilder:default=false - // +optional - ThirdPartyImage bool `json:"thirdPartyImage"` -} - -// AzureSharedGalleryImage defines an image in a Shared Image Gallery to use for VM creation. -type AzureSharedGalleryImage struct { - // SubscriptionID is the identifier of the subscription that contains the shared image gallery - // +kubebuilder:validation:MinLength=1 - SubscriptionID string `json:"subscriptionID"` - // ResourceGroup specifies the resource group containing the shared image gallery - // +kubebuilder:validation:MinLength=1 - ResourceGroup string `json:"resourceGroup"` - // Gallery specifies the name of the shared image gallery that contains the image - // +kubebuilder:validation:MinLength=1 - Gallery string `json:"gallery"` - // Name is the name of the image - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` - // Version specifies the version of the marketplace image. The allowed formats - // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. - // Specify 'latest' to use the latest version of an image available at deploy time. - // Even if you use 'latest', the VM image will not automatically update after deploy - // time even if a new version becomes available. - // +kubebuilder:validation:MinLength=1 - Version string `json:"version"` - // Publisher is the name of the organization that created the image. - // This value will be used to add a `Plan` in the API request when creating the VM/VMSS resource. - // This is needed when the source image from which this SIG image was built requires the `Plan` to be used. - // +optional - Publisher *string `json:"publisher,omitempty"` - // Offer specifies the name of a group of related images created by the publisher. - // For example, UbuntuServer, WindowsServer - // This value will be used to add a `Plan` in the API request when creating the VM/VMSS resource. - // This is needed when the source image from which this SIG image was built requires the `Plan` to be used. - // +optional - Offer *string `json:"offer,omitempty"` - // SKU specifies an instance of an offer, such as a major release of a distribution. - // For example, 18.04-LTS, 2019-Datacenter - // This value will be used to add a `Plan` in the API request when creating the VM/VMSS resource. - // This is needed when the source image from which this SIG image was built requires the `Plan` to be used. - // +optional - SKU *string `json:"sku,omitempty"` -} - -// VMIdentity defines the identity of the virtual machine, if configured. -// +kubebuilder:validation:Enum=None;SystemAssigned;UserAssigned -type VMIdentity string - -const ( - // VMIdentityNone ... - VMIdentityNone VMIdentity = "None" - // VMIdentitySystemAssigned ... - VMIdentitySystemAssigned VMIdentity = "SystemAssigned" - // VMIdentityUserAssigned ... - VMIdentityUserAssigned VMIdentity = "UserAssigned" -) - -// UserAssignedIdentity defines the user-assigned identities provided -// by the user to be assigned to Azure resources. -type UserAssignedIdentity struct { - // ProviderID is the identification ID of the user-assigned Identity, the format of an identity is: - // 'azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}' - ProviderID string `json:"providerID"` -} - -const ( - // AzureIdentityBindingSelector is the label used to match with the AzureIdentityBinding - // For the controller to match an identity binding, it needs a [label] with the key `aadpodidbinding` - // whose value is that of the `selector:` field in the `AzureIdentityBinding`. - AzureIdentityBindingSelector = "capz-controller-aadpodidentity-selector" -) - -// IdentityType represents different types of identities. -// +kubebuilder:validation:Enum=ServicePrincipal;UserAssignedMSI -type IdentityType string - -const ( - // UserAssignedMSI represents a user-assigned identity. - UserAssignedMSI IdentityType = "UserAssignedMSI" - - // ServicePrincipal represents a service principal. - ServicePrincipal IdentityType = "ServicePrincipal" - - // ManualServicePrincipal represents a manual service principal. - ManualServicePrincipal IdentityType = "ManualServicePrincipal" -) - -// OSDisk defines the operating system disk for a VM. -// -// WARNING: this requires any updates to ManagedDisk to be manually converted. This is due to the odd issue with -// conversion-gen where the warning message generated uses a relative directory import rather than the fully -// qualified import when generating outside of the GOPATH. -type OSDisk struct { - OSType string `json:"osType"` - // DiskSizeGB is the size in GB to assign to the OS disk. - // Will have a default of 30GB if not provided - // +optional - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` - // ManagedDisk specifies the Managed Disk parameters for the OS disk. - // +optional - ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` - DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"` - // CachingType specifies the caching requirements. - // +optional - // +kubebuilder:validation:Enum=None;ReadOnly;ReadWrite - CachingType string `json:"cachingType,omitempty"` -} - -// DataDisk specifies the parameters that are used to add one or more data disks to the machine. -type DataDisk struct { - // NameSuffix is the suffix to be appended to the machine name to generate the disk name. - // Each disk name will be in format _. - NameSuffix string `json:"nameSuffix"` - // DiskSizeGB is the size in GB to assign to the data disk. - DiskSizeGB int32 `json:"diskSizeGB"` - // ManagedDisk specifies the Managed Disk parameters for the data disk. - // +optional - ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"` - // Lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - // The value must be between 0 and 63. - Lun *int32 `json:"lun,omitempty"` - // CachingType specifies the caching requirements. - // +optional - // +kubebuilder:validation:Enum=None;ReadOnly;ReadWrite - CachingType string `json:"cachingType,omitempty"` -} - -// ManagedDiskParameters defines the parameters of a managed disk. -type ManagedDiskParameters struct { - // +optional - StorageAccountType string `json:"storageAccountType,omitempty"` - // +optional - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// DiskEncryptionSetParameters defines disk encryption options. -type DiskEncryptionSetParameters struct { - // ID defines resourceID for diskEncryptionSet resource. It must be in the same subscription - ID string `json:"id,omitempty"` -} - -// DiffDiskSettings describe ephemeral disk settings for the os disk. -type DiffDiskSettings struct { - // Option enables ephemeral OS when set to "Local" - // See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details - // +kubebuilder:validation:Enum=Local - Option string `json:"option"` -} - -// SubnetRole defines the unique role of a subnet. -type SubnetRole string - -const ( - // SubnetNode defines a Kubernetes workload node role. - SubnetNode = SubnetRole(Node) - - // SubnetControlPlane defines a Kubernetes control plane node role. - SubnetControlPlane = SubnetRole(ControlPlane) -) - -// SubnetSpec configures an Azure subnet. -type SubnetSpec struct { - // Role defines the subnet role (eg. Node, ControlPlane) - Role SubnetRole `json:"role,omitempty"` - - // ID defines a unique identifier to reference this resource. - // +optional - ID string `json:"id,omitempty"` - - // Name defines a name for the subnet resource. - Name string `json:"name"` - - // CIDRBlocks defines the subnet's address space, specified as one or more address prefixes in CIDR notation. - // +optional - CIDRBlocks []string `json:"cidrBlocks,omitempty"` - - // SecurityGroup defines the NSG (network security group) that should be attached to this subnet. - // +optional - SecurityGroup SecurityGroup `json:"securityGroup,omitempty"` - - // RouteTable defines the route table that should be attached to this subnet. - // +optional - RouteTable RouteTable `json:"routeTable,omitempty"` - - // NatGateway associated with this subnet. - // +optional - NatGateway NatGateway `json:"natGateway,omitempty"` -} - -// GetControlPlaneSubnet returns the cluster control plane subnet. -func (n *NetworkSpec) GetControlPlaneSubnet() (SubnetSpec, error) { - for _, sn := range n.Subnets { - if sn.Role == SubnetControlPlane { - return sn, nil - } - } - return SubnetSpec{}, errors.Errorf("no subnet found with role %s", SubnetControlPlane) -} - -// UpdateControlPlaneSubnet updates the cluster control plane subnet. -func (n *NetworkSpec) UpdateControlPlaneSubnet(subnet SubnetSpec) { - for i, sn := range n.Subnets { - if sn.Role == SubnetControlPlane { - n.Subnets[i] = subnet - } - } -} - -// UpdateNodeSubnet updates the cluster node subnet. -func (n *NetworkSpec) UpdateNodeSubnet(subnet SubnetSpec) { - for i, sn := range n.Subnets { - if sn.Role == SubnetNode { - n.Subnets[i] = subnet - } - } -} - -// IsNatGatewayEnabled returns whether or not a Nat Gateway is enabled on the subnet. -func (s SubnetSpec) IsNatGatewayEnabled() bool { - return s.NatGateway.Name != "" -} - -// SecurityProfile specifies the Security profile settings for a -// virtual machine or virtual machine scale set. -type SecurityProfile struct { - // This field indicates whether Host Encryption should be enabled - // or disabled for a virtual machine or virtual machine scale - // set. Default is disabled. - EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"` -} - -// AddressRecord specifies a DNS record mapping a hostname to an IPV4 or IPv6 address. -type AddressRecord struct { - Hostname string - IP string -} - -// CloudProviderConfigOverrides represents the fields that can be overridden in azure cloud provider config. -type CloudProviderConfigOverrides struct { - RateLimits []RateLimitSpec `json:"rateLimits,omitempty"` - BackOffs BackOffConfig `json:"backOffs,omitempty"` -} - -// BackOffConfig indicates the back-off config options. -type BackOffConfig struct { - CloudProviderBackoff bool `json:"cloudProviderBackoff,omitempty"` - CloudProviderBackoffRetries int `json:"cloudProviderBackoffRetries,omitempty"` - CloudProviderBackoffExponent *resource.Quantity `json:"cloudProviderBackoffExponent,omitempty"` - CloudProviderBackoffDuration int `json:"cloudProviderBackoffDuration,omitempty"` - CloudProviderBackoffJitter *resource.Quantity `json:"cloudProviderBackoffJitter,omitempty"` -} - -// RateLimitSpec represents the rate limit configuration for a particular kind of resource. -// Eg. loadBalancerRateLimit is used to configure rate limits for load balancers. -// This eventually gets converted to CloudProviderRateLimitConfig that cloud-provider-azure expects. -// See: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/d585c2031925b39c925624302f22f8856e29e352/pkg/provider/azure_ratelimit.go#L25 -// We cannot use CloudProviderRateLimitConfig directly because floating point values are not supported in controller-tools. -// See: https://github.com/kubernetes-sigs/controller-tools/issues/245 -type RateLimitSpec struct { - // Name is the name of the rate limit spec. - // +kubebuilder:validation:Enum=defaultRateLimit;routeRateLimit;subnetsRateLimit;interfaceRateLimit;routeTableRateLimit;loadBalancerRateLimit;publicIPAddressRateLimit;securityGroupRateLimit;virtualMachineRateLimit;storageAccountRateLimit;diskRateLimit;snapshotRateLimit;virtualMachineScaleSetRateLimit;virtualMachineSizesRateLimit;availabilitySetRateLimit - Name string `json:"name,omitempty"` - Config RateLimitConfig `json:"config,omitempty"` -} - -// RateLimitConfig indicates the rate limit config options. -type RateLimitConfig struct { - CloudProviderRateLimit bool `json:"cloudProviderRateLimit,omitempty"` - CloudProviderRateLimitQPS *resource.Quantity `json:"cloudProviderRateLimitQPS,omitempty"` - CloudProviderRateLimitBucket int `json:"cloudProviderRateLimitBucket,omitempty"` - CloudProviderRateLimitQPSWrite *resource.Quantity `json:"cloudProviderRateLimitQPSWrite,omitempty"` - CloudProviderRateLimitBucketWrite int `json:"cloudProviderRateLimitBucketWrite,omitempty"` -} - -const ( - // DefaultRateLimit ... - DefaultRateLimit = "defaultRateLimit" - // RouteRateLimit ... - RouteRateLimit = "routeRateLimit" - // SubnetsRateLimit ... - SubnetsRateLimit = "subnetsRateLimit" - // InterfaceRateLimit ... - InterfaceRateLimit = "interfaceRateLimit" - // RouteTableRateLimit ... - RouteTableRateLimit = "routeTableRateLimit" - // LoadBalancerRateLimit ... - LoadBalancerRateLimit = "loadBalancerRateLimit" - // PublicIPAddressRateLimit ... - PublicIPAddressRateLimit = "publicIPAddressRateLimit" - // SecurityGroupRateLimit ... - SecurityGroupRateLimit = "securityGroupRateLimit" - // VirtualMachineRateLimit ... - VirtualMachineRateLimit = "virtualMachineRateLimit" - // StorageAccountRateLimit ... - StorageAccountRateLimit = "storageAccountRateLimit" - // DiskRateLimit ... - DiskRateLimit = "diskRateLimit" - // SnapshotRateLimit ... - SnapshotRateLimit = "snapshotRateLimit" - // VirtualMachineScaleSetRateLimit ... - VirtualMachineScaleSetRateLimit = "virtualMachineScaleSetRateLimit" - // VirtualMachineSizesRateLimit ... - VirtualMachineSizesRateLimit = "virtualMachineSizesRateLimit" - // AvailabilitySetRateLimit ... - AvailabilitySetRateLimit = "availabilitySetRateLimit" -) - -// BastionSpec specifies how the Bastion feature should be set up for the cluster. -type BastionSpec struct { - // +optional - AzureBastion *AzureBastion `json:"azureBastion,omitempty"` -} - -// AzureBastion specifies how the Azure Bastion cloud component should be configured. -type AzureBastion struct { - // +optional - Name string `json:"name,omitempty"` - // +optional - Subnet SubnetSpec `json:"subnet,omitempty"` - // +optional - PublicIP PublicIPSpec `json:"publicIP,omitempty"` -} - -// IsTerminalProvisioningState returns true if the ProvisioningState is a terminal state for an Azure resource. -func IsTerminalProvisioningState(state ProvisioningState) bool { - return state == Failed || state == Succeeded -} diff --git a/api/v1alpha4/zz_generated.conversion.go b/api/v1alpha4/zz_generated.conversion.go deleted file mode 100644 index 917e31cad19..00000000000 --- a/api/v1alpha4/zz_generated.conversion.go +++ /dev/null @@ -1,2738 +0,0 @@ -//go:build !ignore_autogenerated_core_v1alpha4 -// +build !ignore_autogenerated_core_v1alpha4 - -/* -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-v0.23.1. DO NOT EDIT. - -package v1alpha4 - -import ( - unsafe "unsafe" - - corev1 "k8s.io/api/core/v1" - resource "k8s.io/apimachinery/pkg/api/resource" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - v1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/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((*AADProfile)(nil), (*v1beta1.AADProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AADProfile_To_v1beta1_AADProfile(a.(*AADProfile), b.(*v1beta1.AADProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AADProfile)(nil), (*AADProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AADProfile_To_v1alpha4_AADProfile(a.(*v1beta1.AADProfile), b.(*AADProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AKSSku)(nil), (*v1beta1.AKSSku)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AKSSku_To_v1beta1_AKSSku(a.(*AKSSku), b.(*v1beta1.AKSSku), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AKSSku)(nil), (*AKSSku)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AKSSku_To_v1alpha4_AKSSku(a.(*v1beta1.AKSSku), b.(*AKSSku), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServerAccessProfile)(nil), (*v1beta1.APIServerAccessProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIServerAccessProfile_To_v1beta1_APIServerAccessProfile(a.(*APIServerAccessProfile), b.(*v1beta1.APIServerAccessProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.APIServerAccessProfile)(nil), (*APIServerAccessProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIServerAccessProfile_To_v1alpha4_APIServerAccessProfile(a.(*v1beta1.APIServerAccessProfile), b.(*APIServerAccessProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AddressRecord)(nil), (*v1beta1.AddressRecord)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AddressRecord_To_v1beta1_AddressRecord(a.(*AddressRecord), b.(*v1beta1.AddressRecord), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AddressRecord)(nil), (*AddressRecord)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AddressRecord_To_v1alpha4_AddressRecord(a.(*v1beta1.AddressRecord), b.(*AddressRecord), 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((*AzureBastion)(nil), (*v1beta1.AzureBastion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureBastion_To_v1beta1_AzureBastion(a.(*AzureBastion), b.(*v1beta1.AzureBastion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureCluster)(nil), (*v1beta1.AzureCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster(a.(*AzureCluster), b.(*v1beta1.AzureCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureCluster)(nil), (*AzureCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster(a.(*v1beta1.AzureCluster), b.(*AzureCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentity)(nil), (*v1beta1.AzureClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(a.(*AzureClusterIdentity), b.(*v1beta1.AzureClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentity)(nil), (*AzureClusterIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity(a.(*v1beta1.AzureClusterIdentity), b.(*AzureClusterIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentityList)(nil), (*v1beta1.AzureClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(a.(*AzureClusterIdentityList), b.(*v1beta1.AzureClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentityList)(nil), (*AzureClusterIdentityList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentityList_To_v1alpha4_AzureClusterIdentityList(a.(*v1beta1.AzureClusterIdentityList), b.(*AzureClusterIdentityList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentitySpec)(nil), (*v1beta1.AzureClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(a.(*AzureClusterIdentitySpec), b.(*v1beta1.AzureClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentitySpec)(nil), (*AzureClusterIdentitySpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha4_AzureClusterIdentitySpec(a.(*v1beta1.AzureClusterIdentitySpec), b.(*AzureClusterIdentitySpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterIdentityStatus)(nil), (*v1beta1.AzureClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(a.(*AzureClusterIdentityStatus), b.(*v1beta1.AzureClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterIdentityStatus)(nil), (*AzureClusterIdentityStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha4_AzureClusterIdentityStatus(a.(*v1beta1.AzureClusterIdentityStatus), b.(*AzureClusterIdentityStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterList)(nil), (*v1beta1.AzureClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterList_To_v1beta1_AzureClusterList(a.(*AzureClusterList), b.(*v1beta1.AzureClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterList)(nil), (*AzureClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterList_To_v1alpha4_AzureClusterList(a.(*v1beta1.AzureClusterList), b.(*AzureClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureClusterStatus)(nil), (*v1beta1.AzureClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterStatus_To_v1beta1_AzureClusterStatus(a.(*AzureClusterStatus), b.(*v1beta1.AzureClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureClusterStatus)(nil), (*AzureClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterStatus_To_v1alpha4_AzureClusterStatus(a.(*v1beta1.AzureClusterStatus), b.(*AzureClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachine)(nil), (*v1beta1.AzureMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine(a.(*AzureMachine), b.(*v1beta1.AzureMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachine)(nil), (*AzureMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine(a.(*v1beta1.AzureMachine), b.(*AzureMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineList)(nil), (*v1beta1.AzureMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineList_To_v1beta1_AzureMachineList(a.(*AzureMachineList), b.(*v1beta1.AzureMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineList)(nil), (*AzureMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineList_To_v1alpha4_AzureMachineList(a.(*v1beta1.AzureMachineList), b.(*AzureMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineSpec)(nil), (*v1beta1.AzureMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec(a.(*AzureMachineSpec), b.(*v1beta1.AzureMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineStatus)(nil), (*v1beta1.AzureMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineStatus_To_v1beta1_AzureMachineStatus(a.(*AzureMachineStatus), b.(*v1beta1.AzureMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineStatus)(nil), (*AzureMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineStatus_To_v1alpha4_AzureMachineStatus(a.(*v1beta1.AzureMachineStatus), b.(*AzureMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplate)(nil), (*v1beta1.AzureMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(a.(*AzureMachineTemplate), b.(*v1beta1.AzureMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineTemplate)(nil), (*AzureMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate(a.(*v1beta1.AzureMachineTemplate), b.(*AzureMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplateList)(nil), (*v1beta1.AzureMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(a.(*AzureMachineTemplateList), b.(*v1beta1.AzureMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineTemplateList)(nil), (*AzureMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplateList_To_v1alpha4_AzureMachineTemplateList(a.(*v1beta1.AzureMachineTemplateList), b.(*AzureMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplateResource)(nil), (*v1beta1.AzureMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(a.(*AzureMachineTemplateResource), b.(*v1beta1.AzureMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachineTemplateSpec)(nil), (*v1beta1.AzureMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(a.(*AzureMachineTemplateSpec), b.(*v1beta1.AzureMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachineTemplateSpec)(nil), (*AzureMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha4_AzureMachineTemplateSpec(a.(*v1beta1.AzureMachineTemplateSpec), b.(*AzureMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedCluster)(nil), (*v1beta1.AzureManagedCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster(a.(*AzureManagedCluster), b.(*v1beta1.AzureManagedCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedCluster)(nil), (*AzureManagedCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster(a.(*v1beta1.AzureManagedCluster), b.(*AzureManagedCluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedClusterList)(nil), (*v1beta1.AzureManagedClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(a.(*AzureManagedClusterList), b.(*v1beta1.AzureManagedClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedClusterList)(nil), (*AzureManagedClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedClusterList_To_v1alpha4_AzureManagedClusterList(a.(*v1beta1.AzureManagedClusterList), b.(*AzureManagedClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedClusterSpec)(nil), (*v1beta1.AzureManagedClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(a.(*AzureManagedClusterSpec), b.(*v1beta1.AzureManagedClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedClusterSpec)(nil), (*AzureManagedClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha4_AzureManagedClusterSpec(a.(*v1beta1.AzureManagedClusterSpec), b.(*AzureManagedClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedClusterStatus)(nil), (*v1beta1.AzureManagedClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(a.(*AzureManagedClusterStatus), b.(*v1beta1.AzureManagedClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedClusterStatus)(nil), (*AzureManagedClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha4_AzureManagedClusterStatus(a.(*v1beta1.AzureManagedClusterStatus), b.(*AzureManagedClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlane)(nil), (*v1beta1.AzureManagedControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(a.(*AzureManagedControlPlane), b.(*v1beta1.AzureManagedControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedControlPlane)(nil), (*AzureManagedControlPlane)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane(a.(*v1beta1.AzureManagedControlPlane), b.(*AzureManagedControlPlane), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlaneList)(nil), (*v1beta1.AzureManagedControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(a.(*AzureManagedControlPlaneList), b.(*v1beta1.AzureManagedControlPlaneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedControlPlaneList)(nil), (*AzureManagedControlPlaneList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha4_AzureManagedControlPlaneList(a.(*v1beta1.AzureManagedControlPlaneList), b.(*AzureManagedControlPlaneList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlaneSpec)(nil), (*v1beta1.AzureManagedControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(a.(*AzureManagedControlPlaneSpec), b.(*v1beta1.AzureManagedControlPlaneSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedControlPlaneStatus)(nil), (*v1beta1.AzureManagedControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(a.(*AzureManagedControlPlaneStatus), b.(*v1beta1.AzureManagedControlPlaneStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePool)(nil), (*v1beta1.AzureManagedMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(a.(*AzureManagedMachinePool), b.(*v1beta1.AzureManagedMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedMachinePool)(nil), (*AzureManagedMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool(a.(*v1beta1.AzureManagedMachinePool), b.(*AzureManagedMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePoolList)(nil), (*v1beta1.AzureManagedMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(a.(*AzureManagedMachinePoolList), b.(*v1beta1.AzureManagedMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureManagedMachinePoolList)(nil), (*AzureManagedMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha4_AzureManagedMachinePoolList(a.(*v1beta1.AzureManagedMachinePoolList), b.(*AzureManagedMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePoolSpec)(nil), (*v1beta1.AzureManagedMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(a.(*AzureManagedMachinePoolSpec), b.(*v1beta1.AzureManagedMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureManagedMachinePoolStatus)(nil), (*v1beta1.AzureManagedMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(a.(*AzureManagedMachinePoolStatus), b.(*v1beta1.AzureManagedMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureSharedGalleryImage)(nil), (*v1beta1.AzureSharedGalleryImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(a.(*AzureSharedGalleryImage), b.(*v1beta1.AzureSharedGalleryImage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureSharedGalleryImage)(nil), (*AzureSharedGalleryImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha4_AzureSharedGalleryImage(a.(*v1beta1.AzureSharedGalleryImage), b.(*AzureSharedGalleryImage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BackOffConfig)(nil), (*v1beta1.BackOffConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BackOffConfig_To_v1beta1_BackOffConfig(a.(*BackOffConfig), b.(*v1beta1.BackOffConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.BackOffConfig)(nil), (*BackOffConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BackOffConfig_To_v1alpha4_BackOffConfig(a.(*v1beta1.BackOffConfig), b.(*BackOffConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BastionSpec)(nil), (*v1beta1.BastionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BastionSpec_To_v1beta1_BastionSpec(a.(*BastionSpec), b.(*v1beta1.BastionSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.BastionSpec)(nil), (*BastionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BastionSpec_To_v1alpha4_BastionSpec(a.(*v1beta1.BastionSpec), b.(*BastionSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*BuildParams)(nil), (*v1beta1.BuildParams)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_BuildParams_To_v1beta1_BuildParams(a.(*BuildParams), b.(*v1beta1.BuildParams), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.BuildParams)(nil), (*BuildParams)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_BuildParams_To_v1alpha4_BuildParams(a.(*v1beta1.BuildParams), b.(*BuildParams), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CloudProviderConfigOverrides)(nil), (*v1beta1.CloudProviderConfigOverrides)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_CloudProviderConfigOverrides_To_v1beta1_CloudProviderConfigOverrides(a.(*CloudProviderConfigOverrides), b.(*v1beta1.CloudProviderConfigOverrides), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.CloudProviderConfigOverrides)(nil), (*CloudProviderConfigOverrides)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CloudProviderConfigOverrides_To_v1alpha4_CloudProviderConfigOverrides(a.(*v1beta1.CloudProviderConfigOverrides), b.(*CloudProviderConfigOverrides), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DataDisk)(nil), (*v1beta1.DataDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DataDisk_To_v1beta1_DataDisk(a.(*DataDisk), b.(*v1beta1.DataDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.DataDisk)(nil), (*DataDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DataDisk_To_v1alpha4_DataDisk(a.(*v1beta1.DataDisk), b.(*DataDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DiffDiskSettings)(nil), (*v1beta1.DiffDiskSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DiffDiskSettings_To_v1beta1_DiffDiskSettings(a.(*DiffDiskSettings), b.(*v1beta1.DiffDiskSettings), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.DiffDiskSettings)(nil), (*DiffDiskSettings)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DiffDiskSettings_To_v1alpha4_DiffDiskSettings(a.(*v1beta1.DiffDiskSettings), b.(*DiffDiskSettings), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*DiskEncryptionSetParameters)(nil), (*v1beta1.DiskEncryptionSetParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(a.(*DiskEncryptionSetParameters), b.(*v1beta1.DiskEncryptionSetParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.DiskEncryptionSetParameters)(nil), (*DiskEncryptionSetParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_DiskEncryptionSetParameters_To_v1alpha4_DiskEncryptionSetParameters(a.(*v1beta1.DiskEncryptionSetParameters), b.(*DiskEncryptionSetParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Future)(nil), (*v1beta1.Future)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Future_To_v1beta1_Future(a.(*Future), b.(*v1beta1.Future), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.Future)(nil), (*Future)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Future_To_v1alpha4_Future(a.(*v1beta1.Future), b.(*Future), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*Image)(nil), (*v1beta1.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Image_To_v1beta1_Image(a.(*Image), b.(*v1beta1.Image), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*LoadBalancerProfile)(nil), (*v1beta1.LoadBalancerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_LoadBalancerProfile_To_v1beta1_LoadBalancerProfile(a.(*LoadBalancerProfile), b.(*v1beta1.LoadBalancerProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.LoadBalancerProfile)(nil), (*LoadBalancerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_LoadBalancerProfile_To_v1alpha4_LoadBalancerProfile(a.(*v1beta1.LoadBalancerProfile), b.(*LoadBalancerProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ManagedControlPlaneSubnet)(nil), (*v1beta1.ManagedControlPlaneSubnet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(a.(*ManagedControlPlaneSubnet), b.(*v1beta1.ManagedControlPlaneSubnet), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ManagedControlPlaneVirtualNetwork)(nil), (*v1beta1.ManagedControlPlaneVirtualNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(a.(*ManagedControlPlaneVirtualNetwork), b.(*v1beta1.ManagedControlPlaneVirtualNetwork), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ManagedDiskParameters)(nil), (*v1beta1.ManagedDiskParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ManagedDiskParameters_To_v1beta1_ManagedDiskParameters(a.(*ManagedDiskParameters), b.(*v1beta1.ManagedDiskParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.ManagedDiskParameters)(nil), (*ManagedDiskParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedDiskParameters_To_v1alpha4_ManagedDiskParameters(a.(*v1beta1.ManagedDiskParameters), b.(*ManagedDiskParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OSDisk)(nil), (*v1beta1.OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(a.(*OSDisk), b.(*v1beta1.OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.OSDisk)(nil), (*OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(a.(*v1beta1.OSDisk), b.(*OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*PublicIPSpec)(nil), (*v1beta1.PublicIPSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(a.(*PublicIPSpec), b.(*v1beta1.PublicIPSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*RateLimitConfig)(nil), (*v1beta1.RateLimitConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_RateLimitConfig_To_v1beta1_RateLimitConfig(a.(*RateLimitConfig), b.(*v1beta1.RateLimitConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.RateLimitConfig)(nil), (*RateLimitConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_RateLimitConfig_To_v1alpha4_RateLimitConfig(a.(*v1beta1.RateLimitConfig), b.(*RateLimitConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*RateLimitSpec)(nil), (*v1beta1.RateLimitSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_RateLimitSpec_To_v1beta1_RateLimitSpec(a.(*RateLimitSpec), b.(*v1beta1.RateLimitSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.RateLimitSpec)(nil), (*RateLimitSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_RateLimitSpec_To_v1alpha4_RateLimitSpec(a.(*v1beta1.RateLimitSpec), b.(*RateLimitSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*RouteTable)(nil), (*v1beta1.RouteTable)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_RouteTable_To_v1beta1_RouteTable(a.(*RouteTable), b.(*v1beta1.RouteTable), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.RouteTable)(nil), (*RouteTable)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_RouteTable_To_v1alpha4_RouteTable(a.(*v1beta1.RouteTable), b.(*RouteTable), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SecurityProfile)(nil), (*v1beta1.SecurityProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SecurityProfile_To_v1beta1_SecurityProfile(a.(*SecurityProfile), b.(*v1beta1.SecurityProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.SecurityProfile)(nil), (*SecurityProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SecurityProfile_To_v1alpha4_SecurityProfile(a.(*v1beta1.SecurityProfile), b.(*SecurityProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SecurityRule)(nil), (*v1beta1.SecurityRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SecurityRule_To_v1beta1_SecurityRule(a.(*SecurityRule), b.(*v1beta1.SecurityRule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.SecurityRule)(nil), (*SecurityRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SecurityRule_To_v1alpha4_SecurityRule(a.(*v1beta1.SecurityRule), b.(*SecurityRule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SpotVMOptions)(nil), (*v1beta1.SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(a.(*SpotVMOptions), b.(*v1beta1.SpotVMOptions), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*UserAssignedIdentity)(nil), (*v1beta1.UserAssignedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(a.(*UserAssignedIdentity), b.(*v1beta1.UserAssignedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.UserAssignedIdentity)(nil), (*UserAssignedIdentity)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_UserAssignedIdentity_To_v1alpha4_UserAssignedIdentity(a.(*v1beta1.UserAssignedIdentity), b.(*UserAssignedIdentity), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureClusterSpec)(nil), (*v1beta1.AzureClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureClusterSpec_To_v1beta1_AzureClusterSpec(a.(*AzureClusterSpec), b.(*v1beta1.AzureClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureMarketplaceImage)(nil), (*v1beta1.AzureMarketplaceImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(a.(*AzureMarketplaceImage), b.(*v1beta1.AzureMarketplaceImage), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*FrontendIP)(nil), (*v1beta1.FrontendIP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP(a.(*FrontendIP), b.(*v1beta1.FrontendIP), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*LoadBalancerSpec)(nil), (*v1beta1.LoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(a.(*LoadBalancerSpec), b.(*v1beta1.LoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*NatGateway)(nil), (*v1beta1.NatGateway)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NatGateway_To_v1beta1_NatGateway(a.(*NatGateway), b.(*v1beta1.NatGateway), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*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.AddConversionFunc((*SecurityGroup)(nil), (*v1beta1.SecurityGroup)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SecurityGroup_To_v1beta1_SecurityGroup(a.(*SecurityGroup), b.(*v1beta1.SecurityGroup), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*SubnetSpec)(nil), (*v1beta1.SubnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(a.(*SubnetSpec), b.(*v1beta1.SubnetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*VnetSpec)(nil), (*v1beta1.VnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(a.(*VnetSpec), b.(*v1beta1.VnetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureBastion)(nil), (*AzureBastion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureBastion_To_v1alpha4_AzureBastion(a.(*v1beta1.AzureBastion), b.(*AzureBastion), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureClusterSpec)(nil), (*AzureClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureClusterSpec_To_v1alpha4_AzureClusterSpec(a.(*v1beta1.AzureClusterSpec), b.(*AzureClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachineSpec)(nil), (*AzureMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec(a.(*v1beta1.AzureMachineSpec), b.(*AzureMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachineTemplateResource)(nil), (*AzureMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource(a.(*v1beta1.AzureMachineTemplateResource), b.(*AzureMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedControlPlaneSpec)(nil), (*AzureManagedControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha4_AzureManagedControlPlaneSpec(a.(*v1beta1.AzureManagedControlPlaneSpec), b.(*AzureManagedControlPlaneSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedControlPlaneStatus)(nil), (*AzureManagedControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha4_AzureManagedControlPlaneStatus(a.(*v1beta1.AzureManagedControlPlaneStatus), b.(*AzureManagedControlPlaneStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedMachinePoolSpec)(nil), (*AzureManagedMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha4_AzureManagedMachinePoolSpec(a.(*v1beta1.AzureManagedMachinePoolSpec), b.(*AzureManagedMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureManagedMachinePoolStatus)(nil), (*AzureManagedMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha4_AzureManagedMachinePoolStatus(a.(*v1beta1.AzureManagedMachinePoolStatus), b.(*AzureManagedMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMarketplaceImage)(nil), (*AzureMarketplaceImage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMarketplaceImage_To_v1alpha4_AzureMarketplaceImage(a.(*v1beta1.AzureMarketplaceImage), b.(*AzureMarketplaceImage), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.FrontendIP)(nil), (*FrontendIP)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP(a.(*v1beta1.FrontendIP), b.(*FrontendIP), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.Image)(nil), (*Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Image_To_v1alpha4_Image(a.(*v1beta1.Image), b.(*Image), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.LoadBalancerSpec)(nil), (*LoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(a.(*v1beta1.LoadBalancerSpec), b.(*LoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.ManagedControlPlaneSubnet)(nil), (*ManagedControlPlaneSubnet)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha4_ManagedControlPlaneSubnet(a.(*v1beta1.ManagedControlPlaneSubnet), b.(*ManagedControlPlaneSubnet), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.ManagedControlPlaneVirtualNetwork)(nil), (*ManagedControlPlaneVirtualNetwork)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha4_ManagedControlPlaneVirtualNetwork(a.(*v1beta1.ManagedControlPlaneVirtualNetwork), b.(*ManagedControlPlaneVirtualNetwork), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.NatGateway)(nil), (*NatGateway)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NatGateway_To_v1alpha4_NatGateway(a.(*v1beta1.NatGateway), b.(*NatGateway), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*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.AddConversionFunc((*v1beta1.PublicIPSpec)(nil), (*PublicIPSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(a.(*v1beta1.PublicIPSpec), b.(*PublicIPSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SecurityGroup)(nil), (*SecurityGroup)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SecurityGroup_To_v1alpha4_SecurityGroup(a.(*v1beta1.SecurityGroup), b.(*SecurityGroup), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SpotVMOptions)(nil), (*SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(a.(*v1beta1.SpotVMOptions), b.(*SpotVMOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.SubnetSpec)(nil), (*SubnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(a.(*v1beta1.SubnetSpec), b.(*SubnetSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.VnetSpec)(nil), (*VnetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(a.(*v1beta1.VnetSpec), b.(*VnetSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_AADProfile_To_v1beta1_AADProfile(in *AADProfile, out *v1beta1.AADProfile, s conversion.Scope) error { - out.Managed = in.Managed - out.AdminGroupObjectIDs = *(*[]string)(unsafe.Pointer(&in.AdminGroupObjectIDs)) - return nil -} - -// Convert_v1alpha4_AADProfile_To_v1beta1_AADProfile is an autogenerated conversion function. -func Convert_v1alpha4_AADProfile_To_v1beta1_AADProfile(in *AADProfile, out *v1beta1.AADProfile, s conversion.Scope) error { - return autoConvert_v1alpha4_AADProfile_To_v1beta1_AADProfile(in, out, s) -} - -func autoConvert_v1beta1_AADProfile_To_v1alpha4_AADProfile(in *v1beta1.AADProfile, out *AADProfile, s conversion.Scope) error { - out.Managed = in.Managed - out.AdminGroupObjectIDs = *(*[]string)(unsafe.Pointer(&in.AdminGroupObjectIDs)) - return nil -} - -// Convert_v1beta1_AADProfile_To_v1alpha4_AADProfile is an autogenerated conversion function. -func Convert_v1beta1_AADProfile_To_v1alpha4_AADProfile(in *v1beta1.AADProfile, out *AADProfile, s conversion.Scope) error { - return autoConvert_v1beta1_AADProfile_To_v1alpha4_AADProfile(in, out, s) -} - -func autoConvert_v1alpha4_AKSSku_To_v1beta1_AKSSku(in *AKSSku, out *v1beta1.AKSSku, s conversion.Scope) error { - out.Tier = v1beta1.AzureManagedControlPlaneSkuTier(in.Tier) - return nil -} - -// Convert_v1alpha4_AKSSku_To_v1beta1_AKSSku is an autogenerated conversion function. -func Convert_v1alpha4_AKSSku_To_v1beta1_AKSSku(in *AKSSku, out *v1beta1.AKSSku, s conversion.Scope) error { - return autoConvert_v1alpha4_AKSSku_To_v1beta1_AKSSku(in, out, s) -} - -func autoConvert_v1beta1_AKSSku_To_v1alpha4_AKSSku(in *v1beta1.AKSSku, out *AKSSku, s conversion.Scope) error { - out.Tier = string(in.Tier) - return nil -} - -// Convert_v1beta1_AKSSku_To_v1alpha4_AKSSku is an autogenerated conversion function. -func Convert_v1beta1_AKSSku_To_v1alpha4_AKSSku(in *v1beta1.AKSSku, out *AKSSku, s conversion.Scope) error { - return autoConvert_v1beta1_AKSSku_To_v1alpha4_AKSSku(in, out, s) -} - -func autoConvert_v1alpha4_APIServerAccessProfile_To_v1beta1_APIServerAccessProfile(in *APIServerAccessProfile, out *v1beta1.APIServerAccessProfile, s conversion.Scope) error { - out.AuthorizedIPRanges = *(*[]string)(unsafe.Pointer(&in.AuthorizedIPRanges)) - out.EnablePrivateCluster = (*bool)(unsafe.Pointer(in.EnablePrivateCluster)) - out.PrivateDNSZone = (*string)(unsafe.Pointer(in.PrivateDNSZone)) - out.EnablePrivateClusterPublicFQDN = (*bool)(unsafe.Pointer(in.EnablePrivateClusterPublicFQDN)) - return nil -} - -// Convert_v1alpha4_APIServerAccessProfile_To_v1beta1_APIServerAccessProfile is an autogenerated conversion function. -func Convert_v1alpha4_APIServerAccessProfile_To_v1beta1_APIServerAccessProfile(in *APIServerAccessProfile, out *v1beta1.APIServerAccessProfile, s conversion.Scope) error { - return autoConvert_v1alpha4_APIServerAccessProfile_To_v1beta1_APIServerAccessProfile(in, out, s) -} - -func autoConvert_v1beta1_APIServerAccessProfile_To_v1alpha4_APIServerAccessProfile(in *v1beta1.APIServerAccessProfile, out *APIServerAccessProfile, s conversion.Scope) error { - out.AuthorizedIPRanges = *(*[]string)(unsafe.Pointer(&in.AuthorizedIPRanges)) - out.EnablePrivateCluster = (*bool)(unsafe.Pointer(in.EnablePrivateCluster)) - out.PrivateDNSZone = (*string)(unsafe.Pointer(in.PrivateDNSZone)) - out.EnablePrivateClusterPublicFQDN = (*bool)(unsafe.Pointer(in.EnablePrivateClusterPublicFQDN)) - return nil -} - -// Convert_v1beta1_APIServerAccessProfile_To_v1alpha4_APIServerAccessProfile is an autogenerated conversion function. -func Convert_v1beta1_APIServerAccessProfile_To_v1alpha4_APIServerAccessProfile(in *v1beta1.APIServerAccessProfile, out *APIServerAccessProfile, s conversion.Scope) error { - return autoConvert_v1beta1_APIServerAccessProfile_To_v1alpha4_APIServerAccessProfile(in, out, s) -} - -func autoConvert_v1alpha4_AddressRecord_To_v1beta1_AddressRecord(in *AddressRecord, out *v1beta1.AddressRecord, s conversion.Scope) error { - out.Hostname = in.Hostname - out.IP = in.IP - return nil -} - -// Convert_v1alpha4_AddressRecord_To_v1beta1_AddressRecord is an autogenerated conversion function. -func Convert_v1alpha4_AddressRecord_To_v1beta1_AddressRecord(in *AddressRecord, out *v1beta1.AddressRecord, s conversion.Scope) error { - return autoConvert_v1alpha4_AddressRecord_To_v1beta1_AddressRecord(in, out, s) -} - -func autoConvert_v1beta1_AddressRecord_To_v1alpha4_AddressRecord(in *v1beta1.AddressRecord, out *AddressRecord, s conversion.Scope) error { - out.Hostname = in.Hostname - out.IP = in.IP - return nil -} - -// Convert_v1beta1_AddressRecord_To_v1alpha4_AddressRecord is an autogenerated conversion function. -func Convert_v1beta1_AddressRecord_To_v1alpha4_AddressRecord(in *v1beta1.AddressRecord, out *AddressRecord, s conversion.Scope) error { - return autoConvert_v1beta1_AddressRecord_To_v1alpha4_AddressRecord(in, out, s) -} - -func autoConvert_v1alpha4_AllowedNamespaces_To_v1beta1_AllowedNamespaces(in *AllowedNamespaces, out *v1beta1.AllowedNamespaces, s conversion.Scope) error { - out.NamespaceList = *(*[]string)(unsafe.Pointer(&in.NamespaceList)) - out.Selector = (*v1.LabelSelector)(unsafe.Pointer(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.NamespaceList = *(*[]string)(unsafe.Pointer(&in.NamespaceList)) - out.Selector = (*v1.LabelSelector)(unsafe.Pointer(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_AzureBastion_To_v1beta1_AzureBastion(in *AzureBastion, out *v1beta1.AzureBastion, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(&in.Subnet, &out.Subnet, s); err != nil { - return err - } - if err := Convert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(&in.PublicIP, &out.PublicIP, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureBastion_To_v1beta1_AzureBastion is an autogenerated conversion function. -func Convert_v1alpha4_AzureBastion_To_v1beta1_AzureBastion(in *AzureBastion, out *v1beta1.AzureBastion, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureBastion_To_v1beta1_AzureBastion(in, out, s) -} - -func autoConvert_v1beta1_AzureBastion_To_v1alpha4_AzureBastion(in *v1beta1.AzureBastion, out *AzureBastion, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(&in.Subnet, &out.Subnet, s); err != nil { - return err - } - if err := Convert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(&in.PublicIP, &out.PublicIP, s); err != nil { - return err - } - // WARNING: in.Sku requires manual conversion: does not exist in peer-type - // WARNING: in.EnableTunneling requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster(in *AzureCluster, out *v1beta1.AzureCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureClusterSpec_To_v1beta1_AzureClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureClusterStatus_To_v1beta1_AzureClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster is an autogenerated conversion function. -func Convert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster(in *AzureCluster, out *v1beta1.AzureCluster, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster(in, out, s) -} - -func autoConvert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster(in *v1beta1.AzureCluster, out *AzureCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureClusterSpec_To_v1alpha4_AzureClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureClusterStatus_To_v1alpha4_AzureClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster is an autogenerated conversion function. -func Convert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster(in *v1beta1.AzureCluster, out *AzureCluster, s conversion.Scope) error { - return autoConvert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster(in, out, s) -} - -func autoConvert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(in *AzureClusterIdentity, out *v1beta1.AzureClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(in *AzureClusterIdentity, out *v1beta1.AzureClusterIdentity, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity(in *v1beta1.AzureClusterIdentity, out *AzureClusterIdentity, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha4_AzureClusterIdentitySpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha4_AzureClusterIdentityStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity(in *v1beta1.AzureClusterIdentity, out *AzureClusterIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity(in, out, s) -} - -func autoConvert_v1alpha4_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(in *AzureClusterIdentityList, out *v1beta1.AzureClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureClusterIdentity, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureClusterIdentity_To_v1beta1_AzureClusterIdentity(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(in *AzureClusterIdentityList, out *v1beta1.AzureClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureClusterIdentityList_To_v1beta1_AzureClusterIdentityList(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentityList_To_v1alpha4_AzureClusterIdentityList(in *v1beta1.AzureClusterIdentityList, out *AzureClusterIdentityList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureClusterIdentity, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureClusterIdentity_To_v1alpha4_AzureClusterIdentity(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureClusterIdentityList_To_v1alpha4_AzureClusterIdentityList is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentityList_To_v1alpha4_AzureClusterIdentityList(in *v1beta1.AzureClusterIdentityList, out *AzureClusterIdentityList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentityList_To_v1alpha4_AzureClusterIdentityList(in, out, s) -} - -func autoConvert_v1alpha4_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(in *AzureClusterIdentitySpec, out *v1beta1.AzureClusterIdentitySpec, s conversion.Scope) error { - out.Type = v1beta1.IdentityType(in.Type) - out.ResourceID = in.ResourceID - out.ClientID = in.ClientID - out.ClientSecret = in.ClientSecret - out.TenantID = in.TenantID - out.AllowedNamespaces = (*v1beta1.AllowedNamespaces)(unsafe.Pointer(in.AllowedNamespaces)) - return nil -} - -// Convert_v1alpha4_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(in *AzureClusterIdentitySpec, out *v1beta1.AzureClusterIdentitySpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentitySpec_To_v1alpha4_AzureClusterIdentitySpec(in *v1beta1.AzureClusterIdentitySpec, out *AzureClusterIdentitySpec, s conversion.Scope) error { - out.Type = IdentityType(in.Type) - out.ResourceID = in.ResourceID - out.ClientID = in.ClientID - out.ClientSecret = in.ClientSecret - out.TenantID = in.TenantID - out.AllowedNamespaces = (*AllowedNamespaces)(unsafe.Pointer(in.AllowedNamespaces)) - return nil -} - -// Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha4_AzureClusterIdentitySpec is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha4_AzureClusterIdentitySpec(in *v1beta1.AzureClusterIdentitySpec, out *AzureClusterIdentitySpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentitySpec_To_v1alpha4_AzureClusterIdentitySpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(in *AzureClusterIdentityStatus, out *v1beta1.AzureClusterIdentityStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha4.Convert_v1alpha4_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -// Convert_v1alpha4_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(in *AzureClusterIdentityStatus, out *v1beta1.AzureClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureClusterIdentityStatus_To_v1beta1_AzureClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterIdentityStatus_To_v1alpha4_AzureClusterIdentityStatus(in *v1beta1.AzureClusterIdentityStatus, out *AzureClusterIdentityStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha4.Convert_v1beta1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - return nil -} - -// Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha4_AzureClusterIdentityStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterIdentityStatus_To_v1alpha4_AzureClusterIdentityStatus(in *v1beta1.AzureClusterIdentityStatus, out *AzureClusterIdentityStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterIdentityStatus_To_v1alpha4_AzureClusterIdentityStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureClusterList_To_v1beta1_AzureClusterList(in *AzureClusterList, out *v1beta1.AzureClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureCluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureCluster_To_v1beta1_AzureCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureClusterList_To_v1beta1_AzureClusterList is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterList_To_v1beta1_AzureClusterList(in *AzureClusterList, out *v1beta1.AzureClusterList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureClusterList_To_v1beta1_AzureClusterList(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterList_To_v1alpha4_AzureClusterList(in *v1beta1.AzureClusterList, out *AzureClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureCluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureCluster_To_v1alpha4_AzureCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureClusterList_To_v1alpha4_AzureClusterList is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterList_To_v1alpha4_AzureClusterList(in *v1beta1.AzureClusterList, out *AzureClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterList_To_v1alpha4_AzureClusterList(in, out, s) -} - -func autoConvert_v1alpha4_AzureClusterSpec_To_v1beta1_AzureClusterSpec(in *AzureClusterSpec, out *v1beta1.AzureClusterSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(&in.NetworkSpec, &out.NetworkSpec, s); err != nil { - return err - } - out.ResourceGroup = in.ResourceGroup - // WARNING: in.SubscriptionID requires manual conversion: does not exist in peer-type - // WARNING: in.Location requires manual conversion: does not exist in peer-type - if err := apiv1alpha4.Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - // WARNING: in.AdditionalTags requires manual conversion: does not exist in peer-type - // WARNING: in.IdentityRef requires manual conversion: does not exist in peer-type - // WARNING: in.AzureEnvironment requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha4_BastionSpec_To_v1beta1_BastionSpec(&in.BastionSpec, &out.BastionSpec, s); err != nil { - return err - } - // WARNING: in.CloudProviderConfigOverrides requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_AzureClusterSpec_To_v1alpha4_AzureClusterSpec(in *v1beta1.AzureClusterSpec, out *AzureClusterSpec, s conversion.Scope) error { - // WARNING: in.AzureClusterClassSpec requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(&in.NetworkSpec, &out.NetworkSpec, s); err != nil { - return err - } - out.ResourceGroup = in.ResourceGroup - if err := Convert_v1beta1_BastionSpec_To_v1alpha4_BastionSpec(&in.BastionSpec, &out.BastionSpec, s); err != nil { - return err - } - if err := apiv1alpha4.Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_AzureClusterStatus_To_v1beta1_AzureClusterStatus(in *AzureClusterStatus, out *v1beta1.AzureClusterStatus, s conversion.Scope) error { - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1beta1.FailureDomains, len(*in)) - for key, val := range *in { - newVal := new(apiv1beta1.FailureDomainSpec) - if err := apiv1alpha4.Convert_v1alpha4_FailureDomainSpec_To_v1beta1_FailureDomainSpec(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.FailureDomains = nil - } - out.Ready = in.Ready - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha4.Convert_v1alpha4_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.LongRunningOperationStates = *(*v1beta1.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1alpha4_AzureClusterStatus_To_v1beta1_AzureClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureClusterStatus_To_v1beta1_AzureClusterStatus(in *AzureClusterStatus, out *v1beta1.AzureClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureClusterStatus_To_v1beta1_AzureClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureClusterStatus_To_v1alpha4_AzureClusterStatus(in *v1beta1.AzureClusterStatus, out *AzureClusterStatus, s conversion.Scope) error { - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = make(apiv1alpha4.FailureDomains, len(*in)) - for key, val := range *in { - newVal := new(apiv1alpha4.FailureDomainSpec) - if err := apiv1alpha4.Convert_v1beta1_FailureDomainSpec_To_v1alpha4_FailureDomainSpec(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.FailureDomains = nil - } - out.Ready = in.Ready - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha4.Convert_v1beta1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.LongRunningOperationStates = *(*Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1beta1_AzureClusterStatus_To_v1alpha4_AzureClusterStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureClusterStatus_To_v1alpha4_AzureClusterStatus(in *v1beta1.AzureClusterStatus, out *AzureClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureClusterStatus_To_v1alpha4_AzureClusterStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine(in *AzureMachine, out *v1beta1.AzureMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureMachineStatus_To_v1beta1_AzureMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine(in *AzureMachine, out *v1beta1.AzureMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine(in *v1beta1.AzureMachine, out *AzureMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureMachineStatus_To_v1alpha4_AzureMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine(in *v1beta1.AzureMachine, out *AzureMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachineList_To_v1beta1_AzureMachineList(in *AzureMachineList, out *v1beta1.AzureMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureMachine, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureMachine_To_v1beta1_AzureMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureMachineList_To_v1beta1_AzureMachineList is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineList_To_v1beta1_AzureMachineList(in *AzureMachineList, out *v1beta1.AzureMachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineList_To_v1beta1_AzureMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineList_To_v1alpha4_AzureMachineList(in *v1beta1.AzureMachineList, out *AzureMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachine, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureMachine_To_v1alpha4_AzureMachine(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureMachineList_To_v1alpha4_AzureMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineList_To_v1alpha4_AzureMachineList(in *v1beta1.AzureMachineList, out *AzureMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineList_To_v1alpha4_AzureMachineList(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec(in *AzureMachineSpec, out *v1beta1.AzureMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(v1beta1.Image) - if err := Convert_v1alpha4_Image_To_v1beta1_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - out.Identity = v1beta1.VMIdentity(in.Identity) - out.UserAssignedIdentities = *(*[]v1beta1.UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - out.RoleAssignmentName = in.RoleAssignmentName - if err := Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.DataDisks = *(*[]v1beta1.DataDisk)(unsafe.Pointer(&in.DataDisks)) - out.SSHPublicKey = in.SSHPublicKey - out.AdditionalTags = *(*v1beta1.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.AllocatePublicIP = in.AllocatePublicIP - out.EnableIPForwarding = in.EnableIPForwarding - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(v1beta1.SpotVMOptions) - if err := Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - out.SecurityProfile = (*v1beta1.SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - out.SubnetName = in.SubnetName - return nil -} - -// Convert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec(in *AzureMachineSpec, out *v1beta1.AzureMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec(in *v1beta1.AzureMachineSpec, out *AzureMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - out.FailureDomain = (*string)(unsafe.Pointer(in.FailureDomain)) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(Image) - if err := Convert_v1beta1_Image_To_v1alpha4_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - out.Identity = VMIdentity(in.Identity) - out.UserAssignedIdentities = *(*[]UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - // WARNING: in.SystemAssignedIdentityRole requires manual conversion: does not exist in peer-type - out.RoleAssignmentName = in.RoleAssignmentName - if err := Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.DataDisks = *(*[]DataDisk)(unsafe.Pointer(&in.DataDisks)) - out.SSHPublicKey = in.SSHPublicKey - out.AdditionalTags = *(*Tags)(unsafe.Pointer(&in.AdditionalTags)) - // WARNING: in.AdditionalCapabilities requires manual conversion: does not exist in peer-type - out.AllocatePublicIP = in.AllocatePublicIP - out.EnableIPForwarding = in.EnableIPForwarding - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - // WARNING: in.Diagnostics requires manual conversion: does not exist in peer-type - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(SpotVMOptions) - if err := Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - out.SecurityProfile = (*SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - out.SubnetName = in.SubnetName - // WARNING: in.DNSServers requires manual conversion: does not exist in peer-type - // WARNING: in.VMExtensions requires manual conversion: does not exist in peer-type - // WARNING: in.NetworkInterfaces requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureMachineStatus_To_v1beta1_AzureMachineStatus(in *AzureMachineStatus, out *v1beta1.AzureMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]corev1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*v1beta1.ProvisioningState)(unsafe.Pointer(in.VMState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1beta1.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha4.Convert_v1alpha4_Condition_To_v1beta1_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.LongRunningOperationStates = *(*v1beta1.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1alpha4_AzureMachineStatus_To_v1beta1_AzureMachineStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineStatus_To_v1beta1_AzureMachineStatus(in *AzureMachineStatus, out *v1beta1.AzureMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineStatus_To_v1beta1_AzureMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineStatus_To_v1alpha4_AzureMachineStatus(in *v1beta1.AzureMachineStatus, out *AzureMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]corev1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*ProvisioningState)(unsafe.Pointer(in.VMState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha4.Conditions, len(*in)) - for i := range *in { - if err := apiv1alpha4.Convert_v1beta1_Condition_To_v1alpha4_Condition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.LongRunningOperationStates = *(*Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1beta1_AzureMachineStatus_To_v1alpha4_AzureMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineStatus_To_v1alpha4_AzureMachineStatus(in *v1beta1.AzureMachineStatus, out *AzureMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineStatus_To_v1alpha4_AzureMachineStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(in *AzureMachineTemplate, out *v1beta1.AzureMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(in *AzureMachineTemplate, out *v1beta1.AzureMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate(in *v1beta1.AzureMachineTemplate, out *AzureMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha4_AzureMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate(in *v1beta1.AzureMachineTemplate, out *AzureMachineTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(in *AzureMachineTemplateList, out *v1beta1.AzureMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureMachineTemplate_To_v1beta1_AzureMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(in *AzureMachineTemplateList, out *v1beta1.AzureMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineTemplateList_To_v1beta1_AzureMachineTemplateList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplateList_To_v1alpha4_AzureMachineTemplateList(in *v1beta1.AzureMachineTemplateList, out *AzureMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachineTemplate, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureMachineTemplate_To_v1alpha4_AzureMachineTemplate(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureMachineTemplateList_To_v1alpha4_AzureMachineTemplateList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineTemplateList_To_v1alpha4_AzureMachineTemplateList(in *v1beta1.AzureMachineTemplateList, out *AzureMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplateList_To_v1alpha4_AzureMachineTemplateList(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(in *AzureMachineTemplateResource, out *v1beta1.AzureMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha4_AzureMachineSpec_To_v1beta1_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(in *AzureMachineTemplateResource, out *v1beta1.AzureMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource(in *v1beta1.AzureMachineTemplateResource, out *AzureMachineTemplateResource, s conversion.Scope) error { - // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type - if err := Convert_v1beta1_AzureMachineSpec_To_v1alpha4_AzureMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(in *AzureMachineTemplateSpec, out *v1beta1.AzureMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_AzureMachineTemplateResource_To_v1beta1_AzureMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(in *AzureMachineTemplateSpec, out *v1beta1.AzureMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachineTemplateSpec_To_v1beta1_AzureMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureMachineTemplateSpec_To_v1alpha4_AzureMachineTemplateSpec(in *v1beta1.AzureMachineTemplateSpec, out *AzureMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha4_AzureMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureMachineTemplateSpec_To_v1alpha4_AzureMachineTemplateSpec(in *v1beta1.AzureMachineTemplateSpec, out *AzureMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachineTemplateSpec_To_v1alpha4_AzureMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster(in *AzureManagedCluster, out *v1beta1.AzureManagedCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster(in *AzureManagedCluster, out *v1beta1.AzureManagedCluster, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster(in *v1beta1.AzureManagedCluster, out *AzureManagedCluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha4_AzureManagedClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha4_AzureManagedClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster(in *v1beta1.AzureManagedCluster, out *AzureManagedCluster, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(in *AzureManagedClusterList, out *v1beta1.AzureManagedClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureManagedCluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureManagedCluster_To_v1beta1_AzureManagedCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(in *AzureManagedClusterList, out *v1beta1.AzureManagedClusterList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedClusterList_To_v1alpha4_AzureManagedClusterList(in *v1beta1.AzureManagedClusterList, out *AzureManagedClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedCluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureManagedCluster_To_v1alpha4_AzureManagedCluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureManagedClusterList_To_v1alpha4_AzureManagedClusterList is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedClusterList_To_v1alpha4_AzureManagedClusterList(in *v1beta1.AzureManagedClusterList, out *AzureManagedClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedClusterList_To_v1alpha4_AzureManagedClusterList(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(in *AzureManagedClusterSpec, out *v1beta1.AzureManagedClusterSpec, s conversion.Scope) error { - if err := apiv1alpha4.Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(in *AzureManagedClusterSpec, out *v1beta1.AzureManagedClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedClusterSpec_To_v1beta1_AzureManagedClusterSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedClusterSpec_To_v1alpha4_AzureManagedClusterSpec(in *v1beta1.AzureManagedClusterSpec, out *AzureManagedClusterSpec, s conversion.Scope) error { - if err := apiv1alpha4.Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha4_AzureManagedClusterSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedClusterSpec_To_v1alpha4_AzureManagedClusterSpec(in *v1beta1.AzureManagedClusterSpec, out *AzureManagedClusterSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedClusterSpec_To_v1alpha4_AzureManagedClusterSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(in *AzureManagedClusterStatus, out *v1beta1.AzureManagedClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha4_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(in *AzureManagedClusterStatus, out *v1beta1.AzureManagedClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedClusterStatus_To_v1beta1_AzureManagedClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedClusterStatus_To_v1alpha4_AzureManagedClusterStatus(in *v1beta1.AzureManagedClusterStatus, out *AzureManagedClusterStatus, s conversion.Scope) error { - out.Ready = in.Ready - return nil -} - -// Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha4_AzureManagedClusterStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedClusterStatus_To_v1alpha4_AzureManagedClusterStatus(in *v1beta1.AzureManagedClusterStatus, out *AzureManagedClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedClusterStatus_To_v1alpha4_AzureManagedClusterStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(in *AzureManagedControlPlane, out *v1beta1.AzureManagedControlPlane, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(in *AzureManagedControlPlane, out *v1beta1.AzureManagedControlPlane, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane(in *v1beta1.AzureManagedControlPlane, out *AzureManagedControlPlane, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha4_AzureManagedControlPlaneSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha4_AzureManagedControlPlaneStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane(in *v1beta1.AzureManagedControlPlane, out *AzureManagedControlPlane, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(in *AzureManagedControlPlaneList, out *v1beta1.AzureManagedControlPlaneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureManagedControlPlane, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(in *AzureManagedControlPlaneList, out *v1beta1.AzureManagedControlPlaneList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlaneList_To_v1alpha4_AzureManagedControlPlaneList(in *v1beta1.AzureManagedControlPlaneList, out *AzureManagedControlPlaneList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedControlPlane, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureManagedControlPlane_To_v1alpha4_AzureManagedControlPlane(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha4_AzureManagedControlPlaneList is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha4_AzureManagedControlPlaneList(in *v1beta1.AzureManagedControlPlaneList, out *AzureManagedControlPlaneList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedControlPlaneList_To_v1alpha4_AzureManagedControlPlaneList(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(in *AzureManagedControlPlaneSpec, out *v1beta1.AzureManagedControlPlaneSpec, s conversion.Scope) error { - out.Version = in.Version - out.ResourceGroupName = in.ResourceGroupName - out.NodeResourceGroupName = in.NodeResourceGroupName - if err := Convert_v1alpha4_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(&in.VirtualNetwork, &out.VirtualNetwork, s); err != nil { - return err - } - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - if err := apiv1alpha4.Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.AdditionalTags = *(*v1beta1.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.NetworkPlugin = (*string)(unsafe.Pointer(in.NetworkPlugin)) - out.NetworkPolicy = (*string)(unsafe.Pointer(in.NetworkPolicy)) - out.SSHPublicKey = in.SSHPublicKey - out.DNSServiceIP = (*string)(unsafe.Pointer(in.DNSServiceIP)) - out.LoadBalancerSKU = (*string)(unsafe.Pointer(in.LoadBalancerSKU)) - out.IdentityRef = (*corev1.ObjectReference)(unsafe.Pointer(in.IdentityRef)) - out.AADProfile = (*v1beta1.AADProfile)(unsafe.Pointer(in.AADProfile)) - out.SKU = (*v1beta1.AKSSku)(unsafe.Pointer(in.SKU)) - out.LoadBalancerProfile = (*v1beta1.LoadBalancerProfile)(unsafe.Pointer(in.LoadBalancerProfile)) - out.APIServerAccessProfile = (*v1beta1.APIServerAccessProfile)(unsafe.Pointer(in.APIServerAccessProfile)) - return nil -} - -// Convert_v1alpha4_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(in *AzureManagedControlPlaneSpec, out *v1beta1.AzureManagedControlPlaneSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedControlPlaneSpec_To_v1beta1_AzureManagedControlPlaneSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha4_AzureManagedControlPlaneSpec(in *v1beta1.AzureManagedControlPlaneSpec, out *AzureManagedControlPlaneSpec, s conversion.Scope) error { - out.Version = in.Version - out.ResourceGroupName = in.ResourceGroupName - out.NodeResourceGroupName = in.NodeResourceGroupName - if err := Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha4_ManagedControlPlaneVirtualNetwork(&in.VirtualNetwork, &out.VirtualNetwork, s); err != nil { - return err - } - out.SubscriptionID = in.SubscriptionID - out.Location = in.Location - if err := apiv1alpha4.Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.AdditionalTags = *(*Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.NetworkPlugin = (*string)(unsafe.Pointer(in.NetworkPlugin)) - out.NetworkPolicy = (*string)(unsafe.Pointer(in.NetworkPolicy)) - // WARNING: in.OutboundType requires manual conversion: does not exist in peer-type - out.SSHPublicKey = in.SSHPublicKey - out.DNSServiceIP = (*string)(unsafe.Pointer(in.DNSServiceIP)) - out.LoadBalancerSKU = (*string)(unsafe.Pointer(in.LoadBalancerSKU)) - out.IdentityRef = (*corev1.ObjectReference)(unsafe.Pointer(in.IdentityRef)) - out.AADProfile = (*AADProfile)(unsafe.Pointer(in.AADProfile)) - // WARNING: in.AddonProfiles requires manual conversion: does not exist in peer-type - out.SKU = (*AKSSku)(unsafe.Pointer(in.SKU)) - out.LoadBalancerProfile = (*LoadBalancerProfile)(unsafe.Pointer(in.LoadBalancerProfile)) - out.APIServerAccessProfile = (*APIServerAccessProfile)(unsafe.Pointer(in.APIServerAccessProfile)) - // WARNING: in.AutoScalerProfile requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(in *AzureManagedControlPlaneStatus, out *v1beta1.AzureManagedControlPlaneStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Initialized = in.Initialized - out.LongRunningOperationStates = *(*v1beta1.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1alpha4_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(in *AzureManagedControlPlaneStatus, out *v1beta1.AzureManagedControlPlaneStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedControlPlaneStatus_To_v1beta1_AzureManagedControlPlaneStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha4_AzureManagedControlPlaneStatus(in *v1beta1.AzureManagedControlPlaneStatus, out *AzureManagedControlPlaneStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Initialized = in.Initialized - // WARNING: in.Conditions requires manual conversion: does not exist in peer-type - out.LongRunningOperationStates = *(*Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -func autoConvert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(in *AzureManagedMachinePool, out *v1beta1.AzureManagedMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(in *AzureManagedMachinePool, out *v1beta1.AzureManagedMachinePool, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool(in *v1beta1.AzureManagedMachinePool, out *AzureManagedMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha4_AzureManagedMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha4_AzureManagedMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool(in *v1beta1.AzureManagedMachinePool, out *AzureManagedMachinePool, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(in *AzureManagedMachinePoolList, out *v1beta1.AzureManagedMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureManagedMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(in *AzureManagedMachinePoolList, out *v1beta1.AzureManagedMachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePoolList_To_v1alpha4_AzureManagedMachinePoolList(in *v1beta1.AzureManagedMachinePoolList, out *AzureManagedMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureManagedMachinePool_To_v1alpha4_AzureManagedMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha4_AzureManagedMachinePoolList is an autogenerated conversion function. -func Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha4_AzureManagedMachinePoolList(in *v1beta1.AzureManagedMachinePoolList, out *AzureManagedMachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureManagedMachinePoolList_To_v1alpha4_AzureManagedMachinePoolList(in, out, s) -} - -func autoConvert_v1alpha4_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(in *AzureManagedMachinePoolSpec, out *v1beta1.AzureManagedMachinePoolSpec, s conversion.Scope) error { - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Mode = in.Mode - out.SKU = in.SKU - out.OSDiskSizeGB = (*int32)(unsafe.Pointer(in.OSDiskSizeGB)) - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - return nil -} - -// Convert_v1alpha4_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(in *AzureManagedMachinePoolSpec, out *v1beta1.AzureManagedMachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedMachinePoolSpec_To_v1beta1_AzureManagedMachinePoolSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha4_AzureManagedMachinePoolSpec(in *v1beta1.AzureManagedMachinePoolSpec, out *AzureManagedMachinePoolSpec, s conversion.Scope) error { - // WARNING: in.AdditionalTags requires manual conversion: does not exist in peer-type - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Mode = in.Mode - out.SKU = in.SKU - out.OSDiskSizeGB = (*int32)(unsafe.Pointer(in.OSDiskSizeGB)) - // WARNING: in.AvailabilityZones requires manual conversion: does not exist in peer-type - // WARNING: in.NodeLabels requires manual conversion: does not exist in peer-type - // WARNING: in.Taints requires manual conversion: does not exist in peer-type - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - // WARNING: in.Scaling requires manual conversion: does not exist in peer-type - // WARNING: in.MaxPods requires manual conversion: does not exist in peer-type - // WARNING: in.OsDiskType requires manual conversion: does not exist in peer-type - // WARNING: in.EnableUltraSSD requires manual conversion: does not exist in peer-type - // WARNING: in.OSType requires manual conversion: does not exist in peer-type - // WARNING: in.EnableNodePublicIP requires manual conversion: does not exist in peer-type - // WARNING: in.NodePublicIPPrefixID requires manual conversion: does not exist in peer-type - // WARNING: in.ScaleSetPriority requires manual conversion: does not exist in peer-type - // WARNING: in.KubeletConfig requires manual conversion: does not exist in peer-type - // WARNING: in.KubeletDiskType requires manual conversion: does not exist in peer-type - // WARNING: in.LinuxOSConfig requires manual conversion: does not exist in peer-type - // WARNING: in.SubnetName requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(in *AzureManagedMachinePoolStatus, out *v1beta1.AzureManagedMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - return nil -} - -// Convert_v1alpha4_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(in *AzureManagedMachinePoolStatus, out *v1beta1.AzureManagedMachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureManagedMachinePoolStatus_To_v1beta1_AzureManagedMachinePoolStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha4_AzureManagedMachinePoolStatus(in *v1beta1.AzureManagedMachinePoolStatus, out *AzureManagedMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - // WARNING: in.Conditions requires manual conversion: does not exist in peer-type - // WARNING: in.LongRunningOperationStates requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(in *AzureMarketplaceImage, out *v1beta1.AzureMarketplaceImage, s conversion.Scope) error { - // WARNING: in.Publisher requires manual conversion: does not exist in peer-type - // WARNING: in.Offer requires manual conversion: does not exist in peer-type - // WARNING: in.SKU requires manual conversion: does not exist in peer-type - out.Version = in.Version - out.ThirdPartyImage = in.ThirdPartyImage - return nil -} - -func autoConvert_v1beta1_AzureMarketplaceImage_To_v1alpha4_AzureMarketplaceImage(in *v1beta1.AzureMarketplaceImage, out *AzureMarketplaceImage, s conversion.Scope) error { - // WARNING: in.ImagePlan requires manual conversion: does not exist in peer-type - out.Version = in.Version - out.ThirdPartyImage = in.ThirdPartyImage - return nil -} - -func autoConvert_v1alpha4_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(in *AzureSharedGalleryImage, out *v1beta1.AzureSharedGalleryImage, s conversion.Scope) error { - out.SubscriptionID = in.SubscriptionID - out.ResourceGroup = in.ResourceGroup - out.Gallery = in.Gallery - out.Name = in.Name - out.Version = in.Version - out.Publisher = (*string)(unsafe.Pointer(in.Publisher)) - out.Offer = (*string)(unsafe.Pointer(in.Offer)) - out.SKU = (*string)(unsafe.Pointer(in.SKU)) - return nil -} - -// Convert_v1alpha4_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage is an autogenerated conversion function. -func Convert_v1alpha4_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(in *AzureSharedGalleryImage, out *v1beta1.AzureSharedGalleryImage, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureSharedGalleryImage_To_v1beta1_AzureSharedGalleryImage(in, out, s) -} - -func autoConvert_v1beta1_AzureSharedGalleryImage_To_v1alpha4_AzureSharedGalleryImage(in *v1beta1.AzureSharedGalleryImage, out *AzureSharedGalleryImage, s conversion.Scope) error { - out.SubscriptionID = in.SubscriptionID - out.ResourceGroup = in.ResourceGroup - out.Gallery = in.Gallery - out.Name = in.Name - out.Version = in.Version - out.Publisher = (*string)(unsafe.Pointer(in.Publisher)) - out.Offer = (*string)(unsafe.Pointer(in.Offer)) - out.SKU = (*string)(unsafe.Pointer(in.SKU)) - return nil -} - -// Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha4_AzureSharedGalleryImage is an autogenerated conversion function. -func Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha4_AzureSharedGalleryImage(in *v1beta1.AzureSharedGalleryImage, out *AzureSharedGalleryImage, s conversion.Scope) error { - return autoConvert_v1beta1_AzureSharedGalleryImage_To_v1alpha4_AzureSharedGalleryImage(in, out, s) -} - -func autoConvert_v1alpha4_BackOffConfig_To_v1beta1_BackOffConfig(in *BackOffConfig, out *v1beta1.BackOffConfig, s conversion.Scope) error { - out.CloudProviderBackoff = in.CloudProviderBackoff - out.CloudProviderBackoffRetries = in.CloudProviderBackoffRetries - out.CloudProviderBackoffExponent = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderBackoffExponent)) - out.CloudProviderBackoffDuration = in.CloudProviderBackoffDuration - out.CloudProviderBackoffJitter = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderBackoffJitter)) - return nil -} - -// Convert_v1alpha4_BackOffConfig_To_v1beta1_BackOffConfig is an autogenerated conversion function. -func Convert_v1alpha4_BackOffConfig_To_v1beta1_BackOffConfig(in *BackOffConfig, out *v1beta1.BackOffConfig, s conversion.Scope) error { - return autoConvert_v1alpha4_BackOffConfig_To_v1beta1_BackOffConfig(in, out, s) -} - -func autoConvert_v1beta1_BackOffConfig_To_v1alpha4_BackOffConfig(in *v1beta1.BackOffConfig, out *BackOffConfig, s conversion.Scope) error { - out.CloudProviderBackoff = in.CloudProviderBackoff - out.CloudProviderBackoffRetries = in.CloudProviderBackoffRetries - out.CloudProviderBackoffExponent = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderBackoffExponent)) - out.CloudProviderBackoffDuration = in.CloudProviderBackoffDuration - out.CloudProviderBackoffJitter = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderBackoffJitter)) - return nil -} - -// Convert_v1beta1_BackOffConfig_To_v1alpha4_BackOffConfig is an autogenerated conversion function. -func Convert_v1beta1_BackOffConfig_To_v1alpha4_BackOffConfig(in *v1beta1.BackOffConfig, out *BackOffConfig, s conversion.Scope) error { - return autoConvert_v1beta1_BackOffConfig_To_v1alpha4_BackOffConfig(in, out, s) -} - -func autoConvert_v1alpha4_BastionSpec_To_v1beta1_BastionSpec(in *BastionSpec, out *v1beta1.BastionSpec, s conversion.Scope) error { - if in.AzureBastion != nil { - in, out := &in.AzureBastion, &out.AzureBastion - *out = new(v1beta1.AzureBastion) - if err := Convert_v1alpha4_AzureBastion_To_v1beta1_AzureBastion(*in, *out, s); err != nil { - return err - } - } else { - out.AzureBastion = nil - } - return nil -} - -// Convert_v1alpha4_BastionSpec_To_v1beta1_BastionSpec is an autogenerated conversion function. -func Convert_v1alpha4_BastionSpec_To_v1beta1_BastionSpec(in *BastionSpec, out *v1beta1.BastionSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_BastionSpec_To_v1beta1_BastionSpec(in, out, s) -} - -func autoConvert_v1beta1_BastionSpec_To_v1alpha4_BastionSpec(in *v1beta1.BastionSpec, out *BastionSpec, s conversion.Scope) error { - if in.AzureBastion != nil { - in, out := &in.AzureBastion, &out.AzureBastion - *out = new(AzureBastion) - if err := Convert_v1beta1_AzureBastion_To_v1alpha4_AzureBastion(*in, *out, s); err != nil { - return err - } - } else { - out.AzureBastion = nil - } - return nil -} - -// Convert_v1beta1_BastionSpec_To_v1alpha4_BastionSpec is an autogenerated conversion function. -func Convert_v1beta1_BastionSpec_To_v1alpha4_BastionSpec(in *v1beta1.BastionSpec, out *BastionSpec, s conversion.Scope) error { - return autoConvert_v1beta1_BastionSpec_To_v1alpha4_BastionSpec(in, out, s) -} - -func autoConvert_v1alpha4_BuildParams_To_v1beta1_BuildParams(in *BuildParams, out *v1beta1.BuildParams, s conversion.Scope) error { - out.Lifecycle = v1beta1.ResourceLifecycle(in.Lifecycle) - out.ClusterName = in.ClusterName - out.ResourceID = in.ResourceID - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Role = (*string)(unsafe.Pointer(in.Role)) - out.Additional = *(*v1beta1.Tags)(unsafe.Pointer(&in.Additional)) - return nil -} - -// Convert_v1alpha4_BuildParams_To_v1beta1_BuildParams is an autogenerated conversion function. -func Convert_v1alpha4_BuildParams_To_v1beta1_BuildParams(in *BuildParams, out *v1beta1.BuildParams, s conversion.Scope) error { - return autoConvert_v1alpha4_BuildParams_To_v1beta1_BuildParams(in, out, s) -} - -func autoConvert_v1beta1_BuildParams_To_v1alpha4_BuildParams(in *v1beta1.BuildParams, out *BuildParams, s conversion.Scope) error { - out.Lifecycle = ResourceLifecycle(in.Lifecycle) - out.ClusterName = in.ClusterName - out.ResourceID = in.ResourceID - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Role = (*string)(unsafe.Pointer(in.Role)) - out.Additional = *(*Tags)(unsafe.Pointer(&in.Additional)) - return nil -} - -// Convert_v1beta1_BuildParams_To_v1alpha4_BuildParams is an autogenerated conversion function. -func Convert_v1beta1_BuildParams_To_v1alpha4_BuildParams(in *v1beta1.BuildParams, out *BuildParams, s conversion.Scope) error { - return autoConvert_v1beta1_BuildParams_To_v1alpha4_BuildParams(in, out, s) -} - -func autoConvert_v1alpha4_CloudProviderConfigOverrides_To_v1beta1_CloudProviderConfigOverrides(in *CloudProviderConfigOverrides, out *v1beta1.CloudProviderConfigOverrides, s conversion.Scope) error { - out.RateLimits = *(*[]v1beta1.RateLimitSpec)(unsafe.Pointer(&in.RateLimits)) - if err := Convert_v1alpha4_BackOffConfig_To_v1beta1_BackOffConfig(&in.BackOffs, &out.BackOffs, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_CloudProviderConfigOverrides_To_v1beta1_CloudProviderConfigOverrides is an autogenerated conversion function. -func Convert_v1alpha4_CloudProviderConfigOverrides_To_v1beta1_CloudProviderConfigOverrides(in *CloudProviderConfigOverrides, out *v1beta1.CloudProviderConfigOverrides, s conversion.Scope) error { - return autoConvert_v1alpha4_CloudProviderConfigOverrides_To_v1beta1_CloudProviderConfigOverrides(in, out, s) -} - -func autoConvert_v1beta1_CloudProviderConfigOverrides_To_v1alpha4_CloudProviderConfigOverrides(in *v1beta1.CloudProviderConfigOverrides, out *CloudProviderConfigOverrides, s conversion.Scope) error { - out.RateLimits = *(*[]RateLimitSpec)(unsafe.Pointer(&in.RateLimits)) - if err := Convert_v1beta1_BackOffConfig_To_v1alpha4_BackOffConfig(&in.BackOffs, &out.BackOffs, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_CloudProviderConfigOverrides_To_v1alpha4_CloudProviderConfigOverrides is an autogenerated conversion function. -func Convert_v1beta1_CloudProviderConfigOverrides_To_v1alpha4_CloudProviderConfigOverrides(in *v1beta1.CloudProviderConfigOverrides, out *CloudProviderConfigOverrides, s conversion.Scope) error { - return autoConvert_v1beta1_CloudProviderConfigOverrides_To_v1alpha4_CloudProviderConfigOverrides(in, out, s) -} - -func autoConvert_v1alpha4_DataDisk_To_v1beta1_DataDisk(in *DataDisk, out *v1beta1.DataDisk, s conversion.Scope) error { - out.NameSuffix = in.NameSuffix - out.DiskSizeGB = in.DiskSizeGB - out.ManagedDisk = (*v1beta1.ManagedDiskParameters)(unsafe.Pointer(in.ManagedDisk)) - out.Lun = (*int32)(unsafe.Pointer(in.Lun)) - out.CachingType = in.CachingType - return nil -} - -// Convert_v1alpha4_DataDisk_To_v1beta1_DataDisk is an autogenerated conversion function. -func Convert_v1alpha4_DataDisk_To_v1beta1_DataDisk(in *DataDisk, out *v1beta1.DataDisk, s conversion.Scope) error { - return autoConvert_v1alpha4_DataDisk_To_v1beta1_DataDisk(in, out, s) -} - -func autoConvert_v1beta1_DataDisk_To_v1alpha4_DataDisk(in *v1beta1.DataDisk, out *DataDisk, s conversion.Scope) error { - out.NameSuffix = in.NameSuffix - out.DiskSizeGB = in.DiskSizeGB - out.ManagedDisk = (*ManagedDiskParameters)(unsafe.Pointer(in.ManagedDisk)) - out.Lun = (*int32)(unsafe.Pointer(in.Lun)) - out.CachingType = in.CachingType - return nil -} - -// Convert_v1beta1_DataDisk_To_v1alpha4_DataDisk is an autogenerated conversion function. -func Convert_v1beta1_DataDisk_To_v1alpha4_DataDisk(in *v1beta1.DataDisk, out *DataDisk, s conversion.Scope) error { - return autoConvert_v1beta1_DataDisk_To_v1alpha4_DataDisk(in, out, s) -} - -func autoConvert_v1alpha4_DiffDiskSettings_To_v1beta1_DiffDiskSettings(in *DiffDiskSettings, out *v1beta1.DiffDiskSettings, s conversion.Scope) error { - out.Option = in.Option - return nil -} - -// Convert_v1alpha4_DiffDiskSettings_To_v1beta1_DiffDiskSettings is an autogenerated conversion function. -func Convert_v1alpha4_DiffDiskSettings_To_v1beta1_DiffDiskSettings(in *DiffDiskSettings, out *v1beta1.DiffDiskSettings, s conversion.Scope) error { - return autoConvert_v1alpha4_DiffDiskSettings_To_v1beta1_DiffDiskSettings(in, out, s) -} - -func autoConvert_v1beta1_DiffDiskSettings_To_v1alpha4_DiffDiskSettings(in *v1beta1.DiffDiskSettings, out *DiffDiskSettings, s conversion.Scope) error { - out.Option = in.Option - return nil -} - -// Convert_v1beta1_DiffDiskSettings_To_v1alpha4_DiffDiskSettings is an autogenerated conversion function. -func Convert_v1beta1_DiffDiskSettings_To_v1alpha4_DiffDiskSettings(in *v1beta1.DiffDiskSettings, out *DiffDiskSettings, s conversion.Scope) error { - return autoConvert_v1beta1_DiffDiskSettings_To_v1alpha4_DiffDiskSettings(in, out, s) -} - -func autoConvert_v1alpha4_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(in *DiskEncryptionSetParameters, out *v1beta1.DiskEncryptionSetParameters, s conversion.Scope) error { - out.ID = in.ID - return nil -} - -// Convert_v1alpha4_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters is an autogenerated conversion function. -func Convert_v1alpha4_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(in *DiskEncryptionSetParameters, out *v1beta1.DiskEncryptionSetParameters, s conversion.Scope) error { - return autoConvert_v1alpha4_DiskEncryptionSetParameters_To_v1beta1_DiskEncryptionSetParameters(in, out, s) -} - -func autoConvert_v1beta1_DiskEncryptionSetParameters_To_v1alpha4_DiskEncryptionSetParameters(in *v1beta1.DiskEncryptionSetParameters, out *DiskEncryptionSetParameters, s conversion.Scope) error { - out.ID = in.ID - return nil -} - -// Convert_v1beta1_DiskEncryptionSetParameters_To_v1alpha4_DiskEncryptionSetParameters is an autogenerated conversion function. -func Convert_v1beta1_DiskEncryptionSetParameters_To_v1alpha4_DiskEncryptionSetParameters(in *v1beta1.DiskEncryptionSetParameters, out *DiskEncryptionSetParameters, s conversion.Scope) error { - return autoConvert_v1beta1_DiskEncryptionSetParameters_To_v1alpha4_DiskEncryptionSetParameters(in, out, s) -} - -func autoConvert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP(in *FrontendIP, out *v1beta1.FrontendIP, s conversion.Scope) error { - out.Name = in.Name - // WARNING: in.PrivateIPAddress requires manual conversion: does not exist in peer-type - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(v1beta1.PublicIPSpec) - if err := Convert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(*in, *out, s); err != nil { - return err - } - } else { - out.PublicIP = nil - } - return nil -} - -func autoConvert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP(in *v1beta1.FrontendIP, out *FrontendIP, s conversion.Scope) error { - out.Name = in.Name - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(PublicIPSpec) - if err := Convert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(*in, *out, s); err != nil { - return err - } - } else { - out.PublicIP = nil - } - // WARNING: in.FrontendIPClass requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_Future_To_v1beta1_Future(in *Future, out *v1beta1.Future, s conversion.Scope) error { - out.Type = in.Type - out.ResourceGroup = in.ResourceGroup - out.ServiceName = in.ServiceName - out.Name = in.Name - out.Data = in.Data - return nil -} - -// Convert_v1alpha4_Future_To_v1beta1_Future is an autogenerated conversion function. -func Convert_v1alpha4_Future_To_v1beta1_Future(in *Future, out *v1beta1.Future, s conversion.Scope) error { - return autoConvert_v1alpha4_Future_To_v1beta1_Future(in, out, s) -} - -func autoConvert_v1beta1_Future_To_v1alpha4_Future(in *v1beta1.Future, out *Future, s conversion.Scope) error { - out.Type = in.Type - out.ResourceGroup = in.ResourceGroup - out.ServiceName = in.ServiceName - out.Name = in.Name - out.Data = in.Data - return nil -} - -// Convert_v1beta1_Future_To_v1alpha4_Future is an autogenerated conversion function. -func Convert_v1beta1_Future_To_v1alpha4_Future(in *v1beta1.Future, out *Future, s conversion.Scope) error { - return autoConvert_v1beta1_Future_To_v1alpha4_Future(in, out, s) -} - -func autoConvert_v1alpha4_Image_To_v1beta1_Image(in *Image, out *v1beta1.Image, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.SharedGallery = (*v1beta1.AzureSharedGalleryImage)(unsafe.Pointer(in.SharedGallery)) - if in.Marketplace != nil { - in, out := &in.Marketplace, &out.Marketplace - *out = new(v1beta1.AzureMarketplaceImage) - if err := Convert_v1alpha4_AzureMarketplaceImage_To_v1beta1_AzureMarketplaceImage(*in, *out, s); err != nil { - return err - } - } else { - out.Marketplace = nil - } - return nil -} - -// Convert_v1alpha4_Image_To_v1beta1_Image is an autogenerated conversion function. -func Convert_v1alpha4_Image_To_v1beta1_Image(in *Image, out *v1beta1.Image, s conversion.Scope) error { - return autoConvert_v1alpha4_Image_To_v1beta1_Image(in, out, s) -} - -func autoConvert_v1beta1_Image_To_v1alpha4_Image(in *v1beta1.Image, out *Image, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.SharedGallery = (*AzureSharedGalleryImage)(unsafe.Pointer(in.SharedGallery)) - if in.Marketplace != nil { - in, out := &in.Marketplace, &out.Marketplace - *out = new(AzureMarketplaceImage) - if err := Convert_v1beta1_AzureMarketplaceImage_To_v1alpha4_AzureMarketplaceImage(*in, *out, s); err != nil { - return err - } - } else { - out.Marketplace = nil - } - // WARNING: in.ComputeGallery requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_LoadBalancerProfile_To_v1beta1_LoadBalancerProfile(in *LoadBalancerProfile, out *v1beta1.LoadBalancerProfile, s conversion.Scope) error { - out.ManagedOutboundIPs = (*int32)(unsafe.Pointer(in.ManagedOutboundIPs)) - out.OutboundIPPrefixes = *(*[]string)(unsafe.Pointer(&in.OutboundIPPrefixes)) - out.OutboundIPs = *(*[]string)(unsafe.Pointer(&in.OutboundIPs)) - out.AllocatedOutboundPorts = (*int32)(unsafe.Pointer(in.AllocatedOutboundPorts)) - out.IdleTimeoutInMinutes = (*int32)(unsafe.Pointer(in.IdleTimeoutInMinutes)) - return nil -} - -// Convert_v1alpha4_LoadBalancerProfile_To_v1beta1_LoadBalancerProfile is an autogenerated conversion function. -func Convert_v1alpha4_LoadBalancerProfile_To_v1beta1_LoadBalancerProfile(in *LoadBalancerProfile, out *v1beta1.LoadBalancerProfile, s conversion.Scope) error { - return autoConvert_v1alpha4_LoadBalancerProfile_To_v1beta1_LoadBalancerProfile(in, out, s) -} - -func autoConvert_v1beta1_LoadBalancerProfile_To_v1alpha4_LoadBalancerProfile(in *v1beta1.LoadBalancerProfile, out *LoadBalancerProfile, s conversion.Scope) error { - out.ManagedOutboundIPs = (*int32)(unsafe.Pointer(in.ManagedOutboundIPs)) - out.OutboundIPPrefixes = *(*[]string)(unsafe.Pointer(&in.OutboundIPPrefixes)) - out.OutboundIPs = *(*[]string)(unsafe.Pointer(&in.OutboundIPs)) - out.AllocatedOutboundPorts = (*int32)(unsafe.Pointer(in.AllocatedOutboundPorts)) - out.IdleTimeoutInMinutes = (*int32)(unsafe.Pointer(in.IdleTimeoutInMinutes)) - return nil -} - -// Convert_v1beta1_LoadBalancerProfile_To_v1alpha4_LoadBalancerProfile is an autogenerated conversion function. -func Convert_v1beta1_LoadBalancerProfile_To_v1alpha4_LoadBalancerProfile(in *v1beta1.LoadBalancerProfile, out *LoadBalancerProfile, s conversion.Scope) error { - return autoConvert_v1beta1_LoadBalancerProfile_To_v1alpha4_LoadBalancerProfile(in, out, s) -} - -func autoConvert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(in *LoadBalancerSpec, out *v1beta1.LoadBalancerSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - // WARNING: in.SKU requires manual conversion: does not exist in peer-type - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]v1beta1.FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_FrontendIP_To_v1beta1_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - // WARNING: in.Type requires manual conversion: does not exist in peer-type - out.FrontendIPsCount = (*int32)(unsafe.Pointer(in.FrontendIPsCount)) - // WARNING: in.IdleTimeoutInMinutes requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(in *v1beta1.LoadBalancerSpec, out *LoadBalancerSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]FrontendIP, len(*in)) - for i := range *in { - if err := Convert_v1beta1_FrontendIP_To_v1alpha4_FrontendIP(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.FrontendIPs = nil - } - out.FrontendIPsCount = (*int32)(unsafe.Pointer(in.FrontendIPsCount)) - // WARNING: in.BackendPool requires manual conversion: does not exist in peer-type - // WARNING: in.LoadBalancerClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(in *ManagedControlPlaneSubnet, out *v1beta1.ManagedControlPlaneSubnet, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - return nil -} - -// Convert_v1alpha4_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet is an autogenerated conversion function. -func Convert_v1alpha4_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(in *ManagedControlPlaneSubnet, out *v1beta1.ManagedControlPlaneSubnet, s conversion.Scope) error { - return autoConvert_v1alpha4_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(in, out, s) -} - -func autoConvert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha4_ManagedControlPlaneSubnet(in *v1beta1.ManagedControlPlaneSubnet, out *ManagedControlPlaneSubnet, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - // WARNING: in.ServiceEndpoints requires manual conversion: does not exist in peer-type - // WARNING: in.PrivateEndpoints requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(in *ManagedControlPlaneVirtualNetwork, out *v1beta1.ManagedControlPlaneVirtualNetwork, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - if err := Convert_v1alpha4_ManagedControlPlaneSubnet_To_v1beta1_ManagedControlPlaneSubnet(&in.Subnet, &out.Subnet, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork is an autogenerated conversion function. -func Convert_v1alpha4_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(in *ManagedControlPlaneVirtualNetwork, out *v1beta1.ManagedControlPlaneVirtualNetwork, s conversion.Scope) error { - return autoConvert_v1alpha4_ManagedControlPlaneVirtualNetwork_To_v1beta1_ManagedControlPlaneVirtualNetwork(in, out, s) -} - -func autoConvert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha4_ManagedControlPlaneVirtualNetwork(in *v1beta1.ManagedControlPlaneVirtualNetwork, out *ManagedControlPlaneVirtualNetwork, s conversion.Scope) error { - out.Name = in.Name - out.CIDRBlock = in.CIDRBlock - if err := Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha4_ManagedControlPlaneSubnet(&in.Subnet, &out.Subnet, s); err != nil { - return err - } - // WARNING: in.ResourceGroup requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_ManagedDiskParameters_To_v1beta1_ManagedDiskParameters(in *ManagedDiskParameters, out *v1beta1.ManagedDiskParameters, s conversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - out.DiskEncryptionSet = (*v1beta1.DiskEncryptionSetParameters)(unsafe.Pointer(in.DiskEncryptionSet)) - return nil -} - -// Convert_v1alpha4_ManagedDiskParameters_To_v1beta1_ManagedDiskParameters is an autogenerated conversion function. -func Convert_v1alpha4_ManagedDiskParameters_To_v1beta1_ManagedDiskParameters(in *ManagedDiskParameters, out *v1beta1.ManagedDiskParameters, s conversion.Scope) error { - return autoConvert_v1alpha4_ManagedDiskParameters_To_v1beta1_ManagedDiskParameters(in, out, s) -} - -func autoConvert_v1beta1_ManagedDiskParameters_To_v1alpha4_ManagedDiskParameters(in *v1beta1.ManagedDiskParameters, out *ManagedDiskParameters, s conversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - out.DiskEncryptionSet = (*DiskEncryptionSetParameters)(unsafe.Pointer(in.DiskEncryptionSet)) - return nil -} - -// Convert_v1beta1_ManagedDiskParameters_To_v1alpha4_ManagedDiskParameters is an autogenerated conversion function. -func Convert_v1beta1_ManagedDiskParameters_To_v1alpha4_ManagedDiskParameters(in *v1beta1.ManagedDiskParameters, out *ManagedDiskParameters, s conversion.Scope) error { - return autoConvert_v1beta1_ManagedDiskParameters_To_v1alpha4_ManagedDiskParameters(in, out, s) -} - -func autoConvert_v1alpha4_NatGateway_To_v1beta1_NatGateway(in *NatGateway, out *v1beta1.NatGateway, s conversion.Scope) error { - out.ID = in.ID - // WARNING: in.Name requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(&in.NatGatewayIP, &out.NatGatewayIP, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_NatGateway_To_v1alpha4_NatGateway(in *v1beta1.NatGateway, out *NatGateway, s conversion.Scope) error { - out.ID = in.ID - if err := Convert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(&in.NatGatewayIP, &out.NatGatewayIP, s); err != nil { - return err - } - // WARNING: in.NatGatewayClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(v1beta1.Subnets, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Subnets = nil - } - if err := Convert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(&in.APIServerLB, &out.APIServerLB, s); err != nil { - return err - } - if in.NodeOutboundLB != nil { - in, out := &in.NodeOutboundLB, &out.NodeOutboundLB - *out = new(v1beta1.LoadBalancerSpec) - if err := Convert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(*in, *out, s); err != nil { - return err - } - } else { - out.NodeOutboundLB = nil - } - if in.ControlPlaneOutboundLB != nil { - in, out := &in.ControlPlaneOutboundLB, &out.ControlPlaneOutboundLB - *out = new(v1beta1.LoadBalancerSpec) - if err := Convert_v1alpha4_LoadBalancerSpec_To_v1beta1_LoadBalancerSpec(*in, *out, s); err != nil { - return err - } - } else { - out.ControlPlaneOutboundLB = nil - } - // WARNING: in.PrivateDNSZoneName requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(Subnets, len(*in)) - for i := range *in { - if err := Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Subnets = nil - } - if err := Convert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(&in.APIServerLB, &out.APIServerLB, s); err != nil { - return err - } - if in.NodeOutboundLB != nil { - in, out := &in.NodeOutboundLB, &out.NodeOutboundLB - *out = new(LoadBalancerSpec) - if err := Convert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(*in, *out, s); err != nil { - return err - } - } else { - out.NodeOutboundLB = nil - } - if in.ControlPlaneOutboundLB != nil { - in, out := &in.ControlPlaneOutboundLB, &out.ControlPlaneOutboundLB - *out = new(LoadBalancerSpec) - if err := Convert_v1beta1_LoadBalancerSpec_To_v1alpha4_LoadBalancerSpec(*in, *out, s); err != nil { - return err - } - } else { - out.ControlPlaneOutboundLB = nil - } - // WARNING: in.NetworkClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_OSDisk_To_v1beta1_OSDisk(in *OSDisk, out *v1beta1.OSDisk, s conversion.Scope) error { - out.OSType = in.OSType - out.DiskSizeGB = (*int32)(unsafe.Pointer(in.DiskSizeGB)) - out.ManagedDisk = (*v1beta1.ManagedDiskParameters)(unsafe.Pointer(in.ManagedDisk)) - out.DiffDiskSettings = (*v1beta1.DiffDiskSettings)(unsafe.Pointer(in.DiffDiskSettings)) - out.CachingType = in.CachingType - return nil -} - -// Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk is an autogenerated conversion function. -func Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(in *OSDisk, out *v1beta1.OSDisk, s conversion.Scope) error { - return autoConvert_v1alpha4_OSDisk_To_v1beta1_OSDisk(in, out, s) -} - -func autoConvert_v1beta1_OSDisk_To_v1alpha4_OSDisk(in *v1beta1.OSDisk, out *OSDisk, s conversion.Scope) error { - out.OSType = in.OSType - out.DiskSizeGB = (*int32)(unsafe.Pointer(in.DiskSizeGB)) - out.ManagedDisk = (*ManagedDiskParameters)(unsafe.Pointer(in.ManagedDisk)) - out.DiffDiskSettings = (*DiffDiskSettings)(unsafe.Pointer(in.DiffDiskSettings)) - out.CachingType = in.CachingType - return nil -} - -// Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk is an autogenerated conversion function. -func Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(in *v1beta1.OSDisk, out *OSDisk, s conversion.Scope) error { - return autoConvert_v1beta1_OSDisk_To_v1alpha4_OSDisk(in, out, s) -} - -func autoConvert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(in *PublicIPSpec, out *v1beta1.PublicIPSpec, s conversion.Scope) error { - out.Name = in.Name - out.DNSName = in.DNSName - return nil -} - -// Convert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec is an autogenerated conversion function. -func Convert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(in *PublicIPSpec, out *v1beta1.PublicIPSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_PublicIPSpec_To_v1beta1_PublicIPSpec(in, out, s) -} - -func autoConvert_v1beta1_PublicIPSpec_To_v1alpha4_PublicIPSpec(in *v1beta1.PublicIPSpec, out *PublicIPSpec, s conversion.Scope) error { - out.Name = in.Name - out.DNSName = in.DNSName - // WARNING: in.IPTags requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_RateLimitConfig_To_v1beta1_RateLimitConfig(in *RateLimitConfig, out *v1beta1.RateLimitConfig, s conversion.Scope) error { - out.CloudProviderRateLimit = in.CloudProviderRateLimit - out.CloudProviderRateLimitQPS = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderRateLimitQPS)) - out.CloudProviderRateLimitBucket = in.CloudProviderRateLimitBucket - out.CloudProviderRateLimitQPSWrite = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderRateLimitQPSWrite)) - out.CloudProviderRateLimitBucketWrite = in.CloudProviderRateLimitBucketWrite - return nil -} - -// Convert_v1alpha4_RateLimitConfig_To_v1beta1_RateLimitConfig is an autogenerated conversion function. -func Convert_v1alpha4_RateLimitConfig_To_v1beta1_RateLimitConfig(in *RateLimitConfig, out *v1beta1.RateLimitConfig, s conversion.Scope) error { - return autoConvert_v1alpha4_RateLimitConfig_To_v1beta1_RateLimitConfig(in, out, s) -} - -func autoConvert_v1beta1_RateLimitConfig_To_v1alpha4_RateLimitConfig(in *v1beta1.RateLimitConfig, out *RateLimitConfig, s conversion.Scope) error { - out.CloudProviderRateLimit = in.CloudProviderRateLimit - out.CloudProviderRateLimitQPS = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderRateLimitQPS)) - out.CloudProviderRateLimitBucket = in.CloudProviderRateLimitBucket - out.CloudProviderRateLimitQPSWrite = (*resource.Quantity)(unsafe.Pointer(in.CloudProviderRateLimitQPSWrite)) - out.CloudProviderRateLimitBucketWrite = in.CloudProviderRateLimitBucketWrite - return nil -} - -// Convert_v1beta1_RateLimitConfig_To_v1alpha4_RateLimitConfig is an autogenerated conversion function. -func Convert_v1beta1_RateLimitConfig_To_v1alpha4_RateLimitConfig(in *v1beta1.RateLimitConfig, out *RateLimitConfig, s conversion.Scope) error { - return autoConvert_v1beta1_RateLimitConfig_To_v1alpha4_RateLimitConfig(in, out, s) -} - -func autoConvert_v1alpha4_RateLimitSpec_To_v1beta1_RateLimitSpec(in *RateLimitSpec, out *v1beta1.RateLimitSpec, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1alpha4_RateLimitConfig_To_v1beta1_RateLimitConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_RateLimitSpec_To_v1beta1_RateLimitSpec is an autogenerated conversion function. -func Convert_v1alpha4_RateLimitSpec_To_v1beta1_RateLimitSpec(in *RateLimitSpec, out *v1beta1.RateLimitSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_RateLimitSpec_To_v1beta1_RateLimitSpec(in, out, s) -} - -func autoConvert_v1beta1_RateLimitSpec_To_v1alpha4_RateLimitSpec(in *v1beta1.RateLimitSpec, out *RateLimitSpec, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1beta1_RateLimitConfig_To_v1alpha4_RateLimitConfig(&in.Config, &out.Config, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_RateLimitSpec_To_v1alpha4_RateLimitSpec is an autogenerated conversion function. -func Convert_v1beta1_RateLimitSpec_To_v1alpha4_RateLimitSpec(in *v1beta1.RateLimitSpec, out *RateLimitSpec, s conversion.Scope) error { - return autoConvert_v1beta1_RateLimitSpec_To_v1alpha4_RateLimitSpec(in, out, s) -} - -func autoConvert_v1alpha4_RouteTable_To_v1beta1_RouteTable(in *RouteTable, out *v1beta1.RouteTable, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - return nil -} - -// Convert_v1alpha4_RouteTable_To_v1beta1_RouteTable is an autogenerated conversion function. -func Convert_v1alpha4_RouteTable_To_v1beta1_RouteTable(in *RouteTable, out *v1beta1.RouteTable, s conversion.Scope) error { - return autoConvert_v1alpha4_RouteTable_To_v1beta1_RouteTable(in, out, s) -} - -func autoConvert_v1beta1_RouteTable_To_v1alpha4_RouteTable(in *v1beta1.RouteTable, out *RouteTable, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - return nil -} - -// Convert_v1beta1_RouteTable_To_v1alpha4_RouteTable is an autogenerated conversion function. -func Convert_v1beta1_RouteTable_To_v1alpha4_RouteTable(in *v1beta1.RouteTable, out *RouteTable, s conversion.Scope) error { - return autoConvert_v1beta1_RouteTable_To_v1alpha4_RouteTable(in, out, s) -} - -func autoConvert_v1alpha4_SecurityGroup_To_v1beta1_SecurityGroup(in *SecurityGroup, out *v1beta1.SecurityGroup, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - // WARNING: in.SecurityRules requires manual conversion: does not exist in peer-type - // WARNING: in.Tags requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_SecurityGroup_To_v1alpha4_SecurityGroup(in *v1beta1.SecurityGroup, out *SecurityGroup, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - // WARNING: in.SecurityGroupClass requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_SecurityProfile_To_v1beta1_SecurityProfile(in *SecurityProfile, out *v1beta1.SecurityProfile, s conversion.Scope) error { - out.EncryptionAtHost = (*bool)(unsafe.Pointer(in.EncryptionAtHost)) - return nil -} - -// Convert_v1alpha4_SecurityProfile_To_v1beta1_SecurityProfile is an autogenerated conversion function. -func Convert_v1alpha4_SecurityProfile_To_v1beta1_SecurityProfile(in *SecurityProfile, out *v1beta1.SecurityProfile, s conversion.Scope) error { - return autoConvert_v1alpha4_SecurityProfile_To_v1beta1_SecurityProfile(in, out, s) -} - -func autoConvert_v1beta1_SecurityProfile_To_v1alpha4_SecurityProfile(in *v1beta1.SecurityProfile, out *SecurityProfile, s conversion.Scope) error { - out.EncryptionAtHost = (*bool)(unsafe.Pointer(in.EncryptionAtHost)) - return nil -} - -// Convert_v1beta1_SecurityProfile_To_v1alpha4_SecurityProfile is an autogenerated conversion function. -func Convert_v1beta1_SecurityProfile_To_v1alpha4_SecurityProfile(in *v1beta1.SecurityProfile, out *SecurityProfile, s conversion.Scope) error { - return autoConvert_v1beta1_SecurityProfile_To_v1alpha4_SecurityProfile(in, out, s) -} - -func autoConvert_v1alpha4_SecurityRule_To_v1beta1_SecurityRule(in *SecurityRule, out *v1beta1.SecurityRule, s conversion.Scope) error { - out.Name = in.Name - out.Description = in.Description - out.Protocol = v1beta1.SecurityGroupProtocol(in.Protocol) - out.Direction = v1beta1.SecurityRuleDirection(in.Direction) - out.Priority = in.Priority - out.SourcePorts = (*string)(unsafe.Pointer(in.SourcePorts)) - out.DestinationPorts = (*string)(unsafe.Pointer(in.DestinationPorts)) - out.Source = (*string)(unsafe.Pointer(in.Source)) - out.Destination = (*string)(unsafe.Pointer(in.Destination)) - return nil -} - -// Convert_v1alpha4_SecurityRule_To_v1beta1_SecurityRule is an autogenerated conversion function. -func Convert_v1alpha4_SecurityRule_To_v1beta1_SecurityRule(in *SecurityRule, out *v1beta1.SecurityRule, s conversion.Scope) error { - return autoConvert_v1alpha4_SecurityRule_To_v1beta1_SecurityRule(in, out, s) -} - -func autoConvert_v1beta1_SecurityRule_To_v1alpha4_SecurityRule(in *v1beta1.SecurityRule, out *SecurityRule, s conversion.Scope) error { - out.Name = in.Name - out.Description = in.Description - out.Protocol = SecurityGroupProtocol(in.Protocol) - out.Direction = SecurityRuleDirection(in.Direction) - out.Priority = in.Priority - out.SourcePorts = (*string)(unsafe.Pointer(in.SourcePorts)) - out.DestinationPorts = (*string)(unsafe.Pointer(in.DestinationPorts)) - out.Source = (*string)(unsafe.Pointer(in.Source)) - out.Destination = (*string)(unsafe.Pointer(in.Destination)) - return nil -} - -// Convert_v1beta1_SecurityRule_To_v1alpha4_SecurityRule is an autogenerated conversion function. -func Convert_v1beta1_SecurityRule_To_v1alpha4_SecurityRule(in *v1beta1.SecurityRule, out *SecurityRule, s conversion.Scope) error { - return autoConvert_v1beta1_SecurityRule_To_v1alpha4_SecurityRule(in, out, s) -} - -func autoConvert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(in *SpotVMOptions, out *v1beta1.SpotVMOptions, s conversion.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - return nil -} - -// Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions is an autogenerated conversion function. -func Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(in *SpotVMOptions, out *v1beta1.SpotVMOptions, s conversion.Scope) error { - return autoConvert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(in, out, s) -} - -func autoConvert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(in *v1beta1.SpotVMOptions, out *SpotVMOptions, s conversion.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - // WARNING: in.EvictionPolicy requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *v1beta1.SubnetSpec, s conversion.Scope) error { - // WARNING: in.Role requires manual conversion: does not exist in peer-type - out.ID = in.ID - // WARNING: in.Name requires manual conversion: does not exist in peer-type - // WARNING: in.CIDRBlocks requires manual conversion: does not exist in peer-type - if err := Convert_v1alpha4_SecurityGroup_To_v1beta1_SecurityGroup(&in.SecurityGroup, &out.SecurityGroup, s); err != nil { - return err - } - if err := Convert_v1alpha4_RouteTable_To_v1beta1_RouteTable(&in.RouteTable, &out.RouteTable, s); err != nil { - return err - } - if err := Convert_v1alpha4_NatGateway_To_v1beta1_NatGateway(&in.NatGateway, &out.NatGateway, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(in *v1beta1.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { - out.ID = in.ID - if err := Convert_v1beta1_SecurityGroup_To_v1alpha4_SecurityGroup(&in.SecurityGroup, &out.SecurityGroup, s); err != nil { - return err - } - if err := Convert_v1beta1_RouteTable_To_v1alpha4_RouteTable(&in.RouteTable, &out.RouteTable, s); err != nil { - return err - } - if err := Convert_v1beta1_NatGateway_To_v1alpha4_NatGateway(&in.NatGateway, &out.NatGateway, s); err != nil { - return err - } - // WARNING: in.SubnetClassSpec requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(in *UserAssignedIdentity, out *v1beta1.UserAssignedIdentity, s conversion.Scope) error { - out.ProviderID = in.ProviderID - return nil -} - -// Convert_v1alpha4_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity is an autogenerated conversion function. -func Convert_v1alpha4_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(in *UserAssignedIdentity, out *v1beta1.UserAssignedIdentity, s conversion.Scope) error { - return autoConvert_v1alpha4_UserAssignedIdentity_To_v1beta1_UserAssignedIdentity(in, out, s) -} - -func autoConvert_v1beta1_UserAssignedIdentity_To_v1alpha4_UserAssignedIdentity(in *v1beta1.UserAssignedIdentity, out *UserAssignedIdentity, s conversion.Scope) error { - out.ProviderID = in.ProviderID - return nil -} - -// Convert_v1beta1_UserAssignedIdentity_To_v1alpha4_UserAssignedIdentity is an autogenerated conversion function. -func Convert_v1beta1_UserAssignedIdentity_To_v1alpha4_UserAssignedIdentity(in *v1beta1.UserAssignedIdentity, out *UserAssignedIdentity, s conversion.Scope) error { - return autoConvert_v1beta1_UserAssignedIdentity_To_v1alpha4_UserAssignedIdentity(in, out, s) -} - -func autoConvert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *v1beta1.VnetSpec, s conversion.Scope) error { - out.ResourceGroup = in.ResourceGroup - out.ID = in.ID - out.Name = in.Name - // WARNING: in.CIDRBlocks requires manual conversion: does not exist in peer-type - // WARNING: in.Tags requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(in *v1beta1.VnetSpec, out *VnetSpec, s conversion.Scope) error { - out.ResourceGroup = in.ResourceGroup - out.ID = in.ID - out.Name = in.Name - // WARNING: in.Peerings requires manual conversion: does not exist in peer-type - // WARNING: in.VnetClassSpec requires manual conversion: does not exist in peer-type - return nil -} diff --git a/api/v1alpha4/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go deleted file mode 100644 index b1c23279006..00000000000 --- a/api/v1alpha4/zz_generated.deepcopy.go +++ /dev/null @@ -1,1819 +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 controller-gen. DO NOT EDIT. - -package v1alpha4 - -import ( - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/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 *AADProfile) DeepCopyInto(out *AADProfile) { - *out = *in - if in.AdminGroupObjectIDs != nil { - in, out := &in.AdminGroupObjectIDs, &out.AdminGroupObjectIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AADProfile. -func (in *AADProfile) DeepCopy() *AADProfile { - if in == nil { - return nil - } - out := new(AADProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AKSSku) DeepCopyInto(out *AKSSku) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AKSSku. -func (in *AKSSku) DeepCopy() *AKSSku { - if in == nil { - return nil - } - out := new(AKSSku) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServerAccessProfile) DeepCopyInto(out *APIServerAccessProfile) { - *out = *in - if in.AuthorizedIPRanges != nil { - in, out := &in.AuthorizedIPRanges, &out.AuthorizedIPRanges - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EnablePrivateCluster != nil { - in, out := &in.EnablePrivateCluster, &out.EnablePrivateCluster - *out = new(bool) - **out = **in - } - if in.PrivateDNSZone != nil { - in, out := &in.PrivateDNSZone, &out.PrivateDNSZone - *out = new(string) - **out = **in - } - if in.EnablePrivateClusterPublicFQDN != nil { - in, out := &in.EnablePrivateClusterPublicFQDN, &out.EnablePrivateClusterPublicFQDN - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerAccessProfile. -func (in *APIServerAccessProfile) DeepCopy() *APIServerAccessProfile { - if in == nil { - return nil - } - out := new(APIServerAccessProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressRecord) DeepCopyInto(out *AddressRecord) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressRecord. -func (in *AddressRecord) DeepCopy() *AddressRecord { - if in == nil { - return nil - } - out := new(AddressRecord) - 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 - if in.NamespaceList != nil { - in, out := &in.NamespaceList, &out.NamespaceList - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } -} - -// 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 *AzureBastion) DeepCopyInto(out *AzureBastion) { - *out = *in - in.Subnet.DeepCopyInto(&out.Subnet) - out.PublicIP = in.PublicIP -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureBastion. -func (in *AzureBastion) DeepCopy() *AzureBastion { - if in == nil { - return nil - } - out := new(AzureBastion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureCluster) DeepCopyInto(out *AzureCluster) { - *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 AzureCluster. -func (in *AzureCluster) DeepCopy() *AzureCluster { - if in == nil { - return nil - } - out := new(AzureCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureCluster) 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 *AzureClusterIdentity) DeepCopyInto(out *AzureClusterIdentity) { - *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 AzureClusterIdentity. -func (in *AzureClusterIdentity) DeepCopy() *AzureClusterIdentity { - if in == nil { - return nil - } - out := new(AzureClusterIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureClusterIdentity) 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 *AzureClusterIdentityList) DeepCopyInto(out *AzureClusterIdentityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureClusterIdentity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterIdentityList. -func (in *AzureClusterIdentityList) DeepCopy() *AzureClusterIdentityList { - if in == nil { - return nil - } - out := new(AzureClusterIdentityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureClusterIdentityList) 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 *AzureClusterIdentitySpec) DeepCopyInto(out *AzureClusterIdentitySpec) { - *out = *in - out.ClientSecret = in.ClientSecret - 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 AzureClusterIdentitySpec. -func (in *AzureClusterIdentitySpec) DeepCopy() *AzureClusterIdentitySpec { - if in == nil { - return nil - } - out := new(AzureClusterIdentitySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureClusterIdentityStatus) DeepCopyInto(out *AzureClusterIdentityStatus) { - *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 AzureClusterIdentityStatus. -func (in *AzureClusterIdentityStatus) DeepCopy() *AzureClusterIdentityStatus { - if in == nil { - return nil - } - out := new(AzureClusterIdentityStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureClusterList) DeepCopyInto(out *AzureClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterList. -func (in *AzureClusterList) DeepCopy() *AzureClusterList { - if in == nil { - return nil - } - out := new(AzureClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureClusterList) 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 *AzureClusterSpec) DeepCopyInto(out *AzureClusterSpec) { - *out = *in - in.NetworkSpec.DeepCopyInto(&out.NetworkSpec) - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.IdentityRef != nil { - in, out := &in.IdentityRef, &out.IdentityRef - *out = new(v1.ObjectReference) - **out = **in - } - in.BastionSpec.DeepCopyInto(&out.BastionSpec) - if in.CloudProviderConfigOverrides != nil { - in, out := &in.CloudProviderConfigOverrides, &out.CloudProviderConfigOverrides - *out = new(CloudProviderConfigOverrides) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterSpec. -func (in *AzureClusterSpec) DeepCopy() *AzureClusterSpec { - if in == nil { - return nil - } - out := new(AzureClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureClusterStatus) DeepCopyInto(out *AzureClusterStatus) { - *out = *in - 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() - } - } - 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.LongRunningOperationStates != nil { - in, out := &in.LongRunningOperationStates, &out.LongRunningOperationStates - *out = make(Futures, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureClusterStatus. -func (in *AzureClusterStatus) DeepCopy() *AzureClusterStatus { - if in == nil { - return nil - } - out := new(AzureClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachine) DeepCopyInto(out *AzureMachine) { - *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 AzureMachine. -func (in *AzureMachine) DeepCopy() *AzureMachine { - if in == nil { - return nil - } - out := new(AzureMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachine) 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 *AzureMachineList) DeepCopyInto(out *AzureMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineList. -func (in *AzureMachineList) DeepCopy() *AzureMachineList { - if in == nil { - return nil - } - out := new(AzureMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineList) 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 *AzureMachineSpec) DeepCopyInto(out *AzureMachineSpec) { - *out = *in - 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 - } - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(Image) - (*in).DeepCopyInto(*out) - } - if in.UserAssignedIdentities != nil { - in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities - *out = make([]UserAssignedIdentity, len(*in)) - copy(*out, *in) - } - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]DataDisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.AcceleratedNetworking != nil { - in, out := &in.AcceleratedNetworking, &out.AcceleratedNetworking - *out = new(bool) - **out = **in - } - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(SpotVMOptions) - (*in).DeepCopyInto(*out) - } - if in.SecurityProfile != nil { - in, out := &in.SecurityProfile, &out.SecurityProfile - *out = new(SecurityProfile) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineSpec. -func (in *AzureMachineSpec) DeepCopy() *AzureMachineSpec { - if in == nil { - return nil - } - out := new(AzureMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineStatus) DeepCopyInto(out *AzureMachineStatus) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]v1.NodeAddress, len(*in)) - copy(*out, *in) - } - if in.VMState != nil { - in, out := &in.VMState, &out.VMState - *out = new(ProvisioningState) - **out = **in - } - 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]) - } - } - if in.LongRunningOperationStates != nil { - in, out := &in.LongRunningOperationStates, &out.LongRunningOperationStates - *out = make(Futures, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineStatus. -func (in *AzureMachineStatus) DeepCopy() *AzureMachineStatus { - if in == nil { - return nil - } - out := new(AzureMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineTemplate) DeepCopyInto(out *AzureMachineTemplate) { - *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 AzureMachineTemplate. -func (in *AzureMachineTemplate) DeepCopy() *AzureMachineTemplate { - if in == nil { - return nil - } - out := new(AzureMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineTemplate) 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 *AzureMachineTemplateList) DeepCopyInto(out *AzureMachineTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachineTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineTemplateList. -func (in *AzureMachineTemplateList) DeepCopy() *AzureMachineTemplateList { - if in == nil { - return nil - } - out := new(AzureMachineTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineTemplateList) 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 *AzureMachineTemplateResource) DeepCopyInto(out *AzureMachineTemplateResource) { - *out = *in - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineTemplateResource. -func (in *AzureMachineTemplateResource) DeepCopy() *AzureMachineTemplateResource { - if in == nil { - return nil - } - out := new(AzureMachineTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineTemplateSpec) DeepCopyInto(out *AzureMachineTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineTemplateSpec. -func (in *AzureMachineTemplateSpec) DeepCopy() *AzureMachineTemplateSpec { - if in == nil { - return nil - } - out := new(AzureMachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedCluster) DeepCopyInto(out *AzureManagedCluster) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedCluster. -func (in *AzureManagedCluster) DeepCopy() *AzureManagedCluster { - if in == nil { - return nil - } - out := new(AzureManagedCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedCluster) 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 *AzureManagedClusterList) DeepCopyInto(out *AzureManagedClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterList. -func (in *AzureManagedClusterList) DeepCopy() *AzureManagedClusterList { - if in == nil { - return nil - } - out := new(AzureManagedClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedClusterList) 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 *AzureManagedClusterSpec) DeepCopyInto(out *AzureManagedClusterSpec) { - *out = *in - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterSpec. -func (in *AzureManagedClusterSpec) DeepCopy() *AzureManagedClusterSpec { - if in == nil { - return nil - } - out := new(AzureManagedClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedClusterStatus) DeepCopyInto(out *AzureManagedClusterStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedClusterStatus. -func (in *AzureManagedClusterStatus) DeepCopy() *AzureManagedClusterStatus { - if in == nil { - return nil - } - out := new(AzureManagedClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedControlPlane) DeepCopyInto(out *AzureManagedControlPlane) { - *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 AzureManagedControlPlane. -func (in *AzureManagedControlPlane) DeepCopy() *AzureManagedControlPlane { - if in == nil { - return nil - } - out := new(AzureManagedControlPlane) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedControlPlane) 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 *AzureManagedControlPlaneList) DeepCopyInto(out *AzureManagedControlPlaneList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedControlPlane, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneList. -func (in *AzureManagedControlPlaneList) DeepCopy() *AzureManagedControlPlaneList { - if in == nil { - return nil - } - out := new(AzureManagedControlPlaneList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedControlPlaneList) 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 *AzureManagedControlPlaneSpec) DeepCopyInto(out *AzureManagedControlPlaneSpec) { - *out = *in - out.VirtualNetwork = in.VirtualNetwork - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.NetworkPlugin != nil { - in, out := &in.NetworkPlugin, &out.NetworkPlugin - *out = new(string) - **out = **in - } - if in.NetworkPolicy != nil { - in, out := &in.NetworkPolicy, &out.NetworkPolicy - *out = new(string) - **out = **in - } - if in.DNSServiceIP != nil { - in, out := &in.DNSServiceIP, &out.DNSServiceIP - *out = new(string) - **out = **in - } - if in.LoadBalancerSKU != nil { - in, out := &in.LoadBalancerSKU, &out.LoadBalancerSKU - *out = new(string) - **out = **in - } - if in.IdentityRef != nil { - in, out := &in.IdentityRef, &out.IdentityRef - *out = new(v1.ObjectReference) - **out = **in - } - if in.AADProfile != nil { - in, out := &in.AADProfile, &out.AADProfile - *out = new(AADProfile) - (*in).DeepCopyInto(*out) - } - if in.SKU != nil { - in, out := &in.SKU, &out.SKU - *out = new(AKSSku) - **out = **in - } - if in.LoadBalancerProfile != nil { - in, out := &in.LoadBalancerProfile, &out.LoadBalancerProfile - *out = new(LoadBalancerProfile) - (*in).DeepCopyInto(*out) - } - if in.APIServerAccessProfile != nil { - in, out := &in.APIServerAccessProfile, &out.APIServerAccessProfile - *out = new(APIServerAccessProfile) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneSpec. -func (in *AzureManagedControlPlaneSpec) DeepCopy() *AzureManagedControlPlaneSpec { - if in == nil { - return nil - } - out := new(AzureManagedControlPlaneSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedControlPlaneStatus) DeepCopyInto(out *AzureManagedControlPlaneStatus) { - *out = *in - if in.LongRunningOperationStates != nil { - in, out := &in.LongRunningOperationStates, &out.LongRunningOperationStates - *out = make(Futures, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedControlPlaneStatus. -func (in *AzureManagedControlPlaneStatus) DeepCopy() *AzureManagedControlPlaneStatus { - if in == nil { - return nil - } - out := new(AzureManagedControlPlaneStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedMachinePool) DeepCopyInto(out *AzureManagedMachinePool) { - *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 AzureManagedMachinePool. -func (in *AzureManagedMachinePool) DeepCopy() *AzureManagedMachinePool { - if in == nil { - return nil - } - out := new(AzureManagedMachinePool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedMachinePool) 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 *AzureManagedMachinePoolList) DeepCopyInto(out *AzureManagedMachinePoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureManagedMachinePool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolList. -func (in *AzureManagedMachinePoolList) DeepCopy() *AzureManagedMachinePoolList { - if in == nil { - return nil - } - out := new(AzureManagedMachinePoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureManagedMachinePoolList) 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 *AzureManagedMachinePoolSpec) DeepCopyInto(out *AzureManagedMachinePoolSpec) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.OSDiskSizeGB != nil { - in, out := &in.OSDiskSizeGB, &out.OSDiskSizeGB - *out = new(int32) - **out = **in - } - if in.ProviderIDList != nil { - in, out := &in.ProviderIDList, &out.ProviderIDList - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolSpec. -func (in *AzureManagedMachinePoolSpec) DeepCopy() *AzureManagedMachinePoolSpec { - if in == nil { - return nil - } - out := new(AzureManagedMachinePoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureManagedMachinePoolStatus) DeepCopyInto(out *AzureManagedMachinePoolStatus) { - *out = *in - if in.ErrorReason != nil { - in, out := &in.ErrorReason, &out.ErrorReason - *out = new(errors.MachineStatusError) - **out = **in - } - if in.ErrorMessage != nil { - in, out := &in.ErrorMessage, &out.ErrorMessage - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureManagedMachinePoolStatus. -func (in *AzureManagedMachinePoolStatus) DeepCopy() *AzureManagedMachinePoolStatus { - if in == nil { - return nil - } - out := new(AzureManagedMachinePoolStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMarketplaceImage) DeepCopyInto(out *AzureMarketplaceImage) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMarketplaceImage. -func (in *AzureMarketplaceImage) DeepCopy() *AzureMarketplaceImage { - if in == nil { - return nil - } - out := new(AzureMarketplaceImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureSharedGalleryImage) DeepCopyInto(out *AzureSharedGalleryImage) { - *out = *in - if in.Publisher != nil { - in, out := &in.Publisher, &out.Publisher - *out = new(string) - **out = **in - } - if in.Offer != nil { - in, out := &in.Offer, &out.Offer - *out = new(string) - **out = **in - } - if in.SKU != nil { - in, out := &in.SKU, &out.SKU - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSharedGalleryImage. -func (in *AzureSharedGalleryImage) DeepCopy() *AzureSharedGalleryImage { - if in == nil { - return nil - } - out := new(AzureSharedGalleryImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackOffConfig) DeepCopyInto(out *BackOffConfig) { - *out = *in - if in.CloudProviderBackoffExponent != nil { - in, out := &in.CloudProviderBackoffExponent, &out.CloudProviderBackoffExponent - x := (*in).DeepCopy() - *out = &x - } - if in.CloudProviderBackoffJitter != nil { - in, out := &in.CloudProviderBackoffJitter, &out.CloudProviderBackoffJitter - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackOffConfig. -func (in *BackOffConfig) DeepCopy() *BackOffConfig { - if in == nil { - return nil - } - out := new(BackOffConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BastionSpec) DeepCopyInto(out *BastionSpec) { - *out = *in - if in.AzureBastion != nil { - in, out := &in.AzureBastion, &out.AzureBastion - *out = new(AzureBastion) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BastionSpec. -func (in *BastionSpec) DeepCopy() *BastionSpec { - if in == nil { - return nil - } - out := new(BastionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildParams) DeepCopyInto(out *BuildParams) { - *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Role != nil { - in, out := &in.Role, &out.Role - *out = new(string) - **out = **in - } - if in.Additional != nil { - in, out := &in.Additional, &out.Additional - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildParams. -func (in *BuildParams) DeepCopy() *BuildParams { - if in == nil { - return nil - } - out := new(BuildParams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudProviderConfigOverrides) DeepCopyInto(out *CloudProviderConfigOverrides) { - *out = *in - if in.RateLimits != nil { - in, out := &in.RateLimits, &out.RateLimits - *out = make([]RateLimitSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.BackOffs.DeepCopyInto(&out.BackOffs) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudProviderConfigOverrides. -func (in *CloudProviderConfigOverrides) DeepCopy() *CloudProviderConfigOverrides { - if in == nil { - return nil - } - out := new(CloudProviderConfigOverrides) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DataDisk) DeepCopyInto(out *DataDisk) { - *out = *in - if in.ManagedDisk != nil { - in, out := &in.ManagedDisk, &out.ManagedDisk - *out = new(ManagedDiskParameters) - (*in).DeepCopyInto(*out) - } - if in.Lun != nil { - in, out := &in.Lun, &out.Lun - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDisk. -func (in *DataDisk) DeepCopy() *DataDisk { - if in == nil { - return nil - } - out := new(DataDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DiffDiskSettings) DeepCopyInto(out *DiffDiskSettings) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiffDiskSettings. -func (in *DiffDiskSettings) DeepCopy() *DiffDiskSettings { - if in == nil { - return nil - } - out := new(DiffDiskSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DiskEncryptionSetParameters) DeepCopyInto(out *DiskEncryptionSetParameters) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSetParameters. -func (in *DiskEncryptionSetParameters) DeepCopy() *DiskEncryptionSetParameters { - if in == nil { - return nil - } - out := new(DiskEncryptionSetParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FrontendIP) DeepCopyInto(out *FrontendIP) { - *out = *in - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(PublicIPSpec) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendIP. -func (in *FrontendIP) DeepCopy() *FrontendIP { - if in == nil { - return nil - } - out := new(FrontendIP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Future) DeepCopyInto(out *Future) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Future. -func (in *Future) DeepCopy() *Future { - if in == nil { - return nil - } - out := new(Future) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Futures) DeepCopyInto(out *Futures) { - { - in := &in - *out = make(Futures, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Futures. -func (in Futures) DeepCopy() Futures { - if in == nil { - return nil - } - out := new(Futures) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Image) DeepCopyInto(out *Image) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.SharedGallery != nil { - in, out := &in.SharedGallery, &out.SharedGallery - *out = new(AzureSharedGalleryImage) - (*in).DeepCopyInto(*out) - } - if in.Marketplace != nil { - in, out := &in.Marketplace, &out.Marketplace - *out = new(AzureMarketplaceImage) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. -func (in *Image) DeepCopy() *Image { - if in == nil { - return nil - } - out := new(Image) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerProfile) DeepCopyInto(out *LoadBalancerProfile) { - *out = *in - if in.ManagedOutboundIPs != nil { - in, out := &in.ManagedOutboundIPs, &out.ManagedOutboundIPs - *out = new(int32) - **out = **in - } - if in.OutboundIPPrefixes != nil { - in, out := &in.OutboundIPPrefixes, &out.OutboundIPPrefixes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OutboundIPs != nil { - in, out := &in.OutboundIPs, &out.OutboundIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllocatedOutboundPorts != nil { - in, out := &in.AllocatedOutboundPorts, &out.AllocatedOutboundPorts - *out = new(int32) - **out = **in - } - if in.IdleTimeoutInMinutes != nil { - in, out := &in.IdleTimeoutInMinutes, &out.IdleTimeoutInMinutes - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerProfile. -func (in *LoadBalancerProfile) DeepCopy() *LoadBalancerProfile { - if in == nil { - return nil - } - out := new(LoadBalancerProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerSpec) DeepCopyInto(out *LoadBalancerSpec) { - *out = *in - if in.FrontendIPs != nil { - in, out := &in.FrontendIPs, &out.FrontendIPs - *out = make([]FrontendIP, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FrontendIPsCount != nil { - in, out := &in.FrontendIPsCount, &out.FrontendIPsCount - *out = new(int32) - **out = **in - } - if in.IdleTimeoutInMinutes != nil { - in, out := &in.IdleTimeoutInMinutes, &out.IdleTimeoutInMinutes - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSpec. -func (in *LoadBalancerSpec) DeepCopy() *LoadBalancerSpec { - if in == nil { - return nil - } - out := new(LoadBalancerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedControlPlaneSubnet) DeepCopyInto(out *ManagedControlPlaneSubnet) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedControlPlaneSubnet. -func (in *ManagedControlPlaneSubnet) DeepCopy() *ManagedControlPlaneSubnet { - if in == nil { - return nil - } - out := new(ManagedControlPlaneSubnet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedControlPlaneVirtualNetwork) DeepCopyInto(out *ManagedControlPlaneVirtualNetwork) { - *out = *in - out.Subnet = in.Subnet -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedControlPlaneVirtualNetwork. -func (in *ManagedControlPlaneVirtualNetwork) DeepCopy() *ManagedControlPlaneVirtualNetwork { - if in == nil { - return nil - } - out := new(ManagedControlPlaneVirtualNetwork) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedDiskParameters) DeepCopyInto(out *ManagedDiskParameters) { - *out = *in - if in.DiskEncryptionSet != nil { - in, out := &in.DiskEncryptionSet, &out.DiskEncryptionSet - *out = new(DiskEncryptionSetParameters) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedDiskParameters. -func (in *ManagedDiskParameters) DeepCopy() *ManagedDiskParameters { - if in == nil { - return nil - } - out := new(ManagedDiskParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NatGateway) DeepCopyInto(out *NatGateway) { - *out = *in - out.NatGatewayIP = in.NatGatewayIP -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatGateway. -func (in *NatGateway) DeepCopy() *NatGateway { - if in == nil { - return nil - } - out := new(NatGateway) - 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 - in.Vnet.DeepCopyInto(&out.Vnet) - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(Subnets, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.APIServerLB.DeepCopyInto(&out.APIServerLB) - if in.NodeOutboundLB != nil { - in, out := &in.NodeOutboundLB, &out.NodeOutboundLB - *out = new(LoadBalancerSpec) - (*in).DeepCopyInto(*out) - } - if in.ControlPlaneOutboundLB != nil { - in, out := &in.ControlPlaneOutboundLB, &out.ControlPlaneOutboundLB - *out = new(LoadBalancerSpec) - (*in).DeepCopyInto(*out) - } -} - -// 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 *OSDisk) DeepCopyInto(out *OSDisk) { - *out = *in - if in.DiskSizeGB != nil { - in, out := &in.DiskSizeGB, &out.DiskSizeGB - *out = new(int32) - **out = **in - } - if in.ManagedDisk != nil { - in, out := &in.ManagedDisk, &out.ManagedDisk - *out = new(ManagedDiskParameters) - (*in).DeepCopyInto(*out) - } - if in.DiffDiskSettings != nil { - in, out := &in.DiffDiskSettings, &out.DiffDiskSettings - *out = new(DiffDiskSettings) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSDisk. -func (in *OSDisk) DeepCopy() *OSDisk { - if in == nil { - return nil - } - out := new(OSDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PublicIPSpec) DeepCopyInto(out *PublicIPSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublicIPSpec. -func (in *PublicIPSpec) DeepCopy() *PublicIPSpec { - if in == nil { - return nil - } - out := new(PublicIPSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitConfig) DeepCopyInto(out *RateLimitConfig) { - *out = *in - if in.CloudProviderRateLimitQPS != nil { - in, out := &in.CloudProviderRateLimitQPS, &out.CloudProviderRateLimitQPS - x := (*in).DeepCopy() - *out = &x - } - if in.CloudProviderRateLimitQPSWrite != nil { - in, out := &in.CloudProviderRateLimitQPSWrite, &out.CloudProviderRateLimitQPSWrite - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitConfig. -func (in *RateLimitConfig) DeepCopy() *RateLimitConfig { - if in == nil { - return nil - } - out := new(RateLimitConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitSpec) DeepCopyInto(out *RateLimitSpec) { - *out = *in - in.Config.DeepCopyInto(&out.Config) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitSpec. -func (in *RateLimitSpec) DeepCopy() *RateLimitSpec { - if in == nil { - return nil - } - out := new(RateLimitSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteTable) DeepCopyInto(out *RouteTable) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTable. -func (in *RouteTable) DeepCopy() *RouteTable { - if in == nil { - return nil - } - out := new(RouteTable) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroup) DeepCopyInto(out *SecurityGroup) { - *out = *in - if in.SecurityRules != nil { - in, out := &in.SecurityRules, &out.SecurityRules - *out = make(SecurityRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroup. -func (in *SecurityGroup) DeepCopy() *SecurityGroup { - if in == nil { - return nil - } - out := new(SecurityGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityProfile) DeepCopyInto(out *SecurityProfile) { - *out = *in - if in.EncryptionAtHost != nil { - in, out := &in.EncryptionAtHost, &out.EncryptionAtHost - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfile. -func (in *SecurityProfile) DeepCopy() *SecurityProfile { - if in == nil { - return nil - } - out := new(SecurityProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityRule) DeepCopyInto(out *SecurityRule) { - *out = *in - if in.SourcePorts != nil { - in, out := &in.SourcePorts, &out.SourcePorts - *out = new(string) - **out = **in - } - if in.DestinationPorts != nil { - in, out := &in.DestinationPorts, &out.DestinationPorts - *out = new(string) - **out = **in - } - if in.Source != nil { - in, out := &in.Source, &out.Source - *out = new(string) - **out = **in - } - if in.Destination != nil { - in, out := &in.Destination, &out.Destination - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityRule. -func (in *SecurityRule) DeepCopy() *SecurityRule { - if in == nil { - return nil - } - out := new(SecurityRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in SecurityRules) DeepCopyInto(out *SecurityRules) { - { - in := &in - *out = make(SecurityRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityRules. -func (in SecurityRules) DeepCopy() SecurityRules { - if in == nil { - return nil - } - out := new(SecurityRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SpotVMOptions) DeepCopyInto(out *SpotVMOptions) { - *out = *in - if in.MaxPrice != nil { - in, out := &in.MaxPrice, &out.MaxPrice - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpotVMOptions. -func (in *SpotVMOptions) DeepCopy() *SpotVMOptions { - if in == nil { - return nil - } - out := new(SpotVMOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec) { - *out = *in - if in.CIDRBlocks != nil { - in, out := &in.CIDRBlocks, &out.CIDRBlocks - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.SecurityGroup.DeepCopyInto(&out.SecurityGroup) - out.RouteTable = in.RouteTable - out.NatGateway = in.NatGateway -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetSpec. -func (in *SubnetSpec) DeepCopy() *SubnetSpec { - if in == nil { - return nil - } - out := new(SubnetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Subnets) DeepCopyInto(out *Subnets) { - { - in := &in - *out = make(Subnets, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnets. -func (in Subnets) DeepCopy() Subnets { - if in == nil { - return nil - } - out := new(Subnets) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Tags) DeepCopyInto(out *Tags) { - { - in := &in - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tags. -func (in Tags) DeepCopy() Tags { - if in == nil { - return nil - } - out := new(Tags) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAssignedIdentity) DeepCopyInto(out *UserAssignedIdentity) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentity. -func (in *UserAssignedIdentity) DeepCopy() *UserAssignedIdentity { - if in == nil { - return nil - } - out := new(UserAssignedIdentity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VM) DeepCopyInto(out *VM) { - *out = *in - in.Image.DeepCopyInto(&out.Image) - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]v1.NodeAddress, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VM. -func (in *VM) DeepCopy() *VM { - if in == nil { - return nil - } - out := new(VM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VnetSpec) DeepCopyInto(out *VnetSpec) { - *out = *in - if in.CIDRBlocks != nil { - in, out := &in.CIDRBlocks, &out.CIDRBlocks - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VnetSpec. -func (in *VnetSpec) DeepCopy() *VnetSpec { - if in == nil { - return nil - } - out := new(VnetSpec) - in.DeepCopyInto(out) - return out -} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml index 5f78d92e64f..6d0333e5f03 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusteridentities.yaml @@ -17,304 +17,6 @@ spec: singular: azureclusteridentity scope: Namespaced versions: - - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureClusterIdentity is the Schema for the azureclustersidentities - API. - 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: AzureClusterIdentitySpec defines the parameters that are - used to create an AzureIdentity. - properties: - allowedNamespaces: - description: "AllowedNamespaces is an array of namespaces that AzureClusters - can use this Identity from. \n An empty list (default) indicates - that AzureClusters can use this Identity from any namespace. This - field is intentionally not a pointer because the nil behavior (no - namespaces) is undesirable here." - items: - type: string - type: array - clientID: - description: Both User Assigned MSI and SP can use this field. - type: string - clientSecret: - description: ClientSecret is a secret reference which should contain - either a Service Principal password or certificate secret. - properties: - name: - description: name is unique within a namespace to reference a - secret resource. - type: string - namespace: - description: namespace defines the space within which the secret - name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - resourceID: - description: User assigned MSI resource id. - type: string - tenantID: - description: Service principal primary tenant id. - type: string - type: - description: UserAssignedMSI or Service Principal - enum: - - ServicePrincipal - - UserAssignedMSI - type: string - required: - - clientID - - tenantID - - type - type: object - status: - description: AzureClusterIdentityStatus defines the observed state of - AzureClusterIdentity. - properties: - conditions: - description: Conditions defines current service state of the AzureClusterIdentity. - 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 - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureClusterIdentity is the Schema for the azureclustersidentities - API. - 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: AzureClusterIdentitySpec defines the parameters that are - used to create an AzureIdentity. - properties: - allowedNamespaces: - description: AllowedNamespaces is used to identify the namespaces - the clusters are allowed to use the identity from. Namespaces can - be selected either using an array of namespaces or with label selector. - An empty allowedNamespaces object indicates that AzureClusters can - use this identity from any namespace. If this object is nil, no - namespaces will be allowed (default behaviour, if this field is - not provided) A namespace should be either in the NamespaceList - or match with Selector to use the identity. - nullable: true - properties: - list: - description: A nil or empty list indicates that AzureCluster cannot - use the identity from any namespace. - items: - type: string - nullable: true - type: array - selector: - description: "Selector is a selector of namespaces that AzureCluster - can use this Identity from. This is a standard Kubernetes LabelSelector, - a label query over a set of resources. The result of matchLabels - and matchExpressions are ANDed. \n A nil or empty selector indicates - that AzureCluster cannot use this AzureClusterIdentity from - any namespace." - 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 - clientID: - description: Both User Assigned MSI and SP can use this field. - type: string - clientSecret: - description: ClientSecret is a secret reference which should contain - either a Service Principal password or certificate secret. - properties: - name: - description: name is unique within a namespace to reference a - secret resource. - type: string - namespace: - description: namespace defines the space within which the secret - name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - resourceID: - description: User assigned MSI resource id. - type: string - tenantID: - description: Service principal primary tenant id. - type: string - type: - description: UserAssignedMSI or Service Principal - enum: - - ServicePrincipal - - UserAssignedMSI - type: string - required: - - clientID - - tenantID - - type - type: object - status: - description: AzureClusterIdentityStatus defines the observed state of - AzureClusterIdentity. - properties: - conditions: - description: Conditions defines current service state of the AzureClusterIdentity. - 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 - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Type of Azure Identity jsonPath: .spec.type diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml index 78c516c0657..310404d7052 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azureclusters.yaml @@ -17,1229 +17,6 @@ spec: singular: azurecluster scope: Namespaced versions: - - additionalPrinterColumns: - - description: Cluster to which this AzureCluster belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - jsonPath: .status.ready - name: Ready - type: boolean - - jsonPath: .spec.resourceGroup - name: Resource Group - priority: 1 - type: string - - jsonPath: .spec.subscriptionID - name: SubscriptionID - priority: 1 - type: string - - jsonPath: .spec.location - name: Location - priority: 1 - type: string - - description: Control Plane Endpoint - jsonPath: .spec.controlPlaneEndpoint.host - name: Endpoint - priority: 1 - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureCluster is the Schema for the azureclusters API. - 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: AzureClusterSpec defines the desired state of AzureCluster. - properties: - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to Azure - resources managed by the Azure provider, in addition to the ones - added by default. - 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 a AzureIdentity to be used - when reconciling this cluster - 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 - location: - type: string - networkSpec: - description: NetworkSpec encapsulates all things related to Azure - network. - properties: - apiServerLB: - description: APIServerLB is the configuration for the control-plane - load balancer. - properties: - frontendIPs: - items: - description: FrontendIP defines a load balancer frontend - IP configuration. - properties: - name: - minLength: 1 - type: string - privateIP: - type: string - publicIP: - description: PublicIPSpec defines the inputs to create - an Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - required: - - name - type: object - type: array - id: - type: string - name: - type: string - sku: - description: SKU defines an Azure load balancer SKU. - type: string - type: - description: LBType defines an Azure load balancer Type. - type: string - type: object - subnets: - description: Subnets is the configuration for the control-plane - subnet and the node subnet. - items: - description: SubnetSpec configures an Azure subnet. - properties: - cidrBlock: - description: 'CidrBlock is the CIDR block to be used when - the provider creates a managed Vnet. Deprecated: Use CIDRBlocks - instead' - type: string - cidrBlocks: - description: CIDRBlocks defines the subnet's address space, - specified as one or more address prefixes in CIDR notation. - items: - type: string - type: array - id: - description: ID defines a unique identifier to reference - this resource. - type: string - internalLBIPAddress: - description: 'InternalLBIPAddress is the IP address that - will be used as the internal LB private IP. For the control - plane subnet only. Deprecated: Use LoadBalancer private - IP instead' - type: string - name: - description: Name defines a name for the subnet resource. - type: string - role: - description: Role defines the subnet role (eg. Node, ControlPlane) - type: string - routeTable: - description: RouteTable defines the route table that should - be attached to this subnet. - properties: - id: - type: string - name: - type: string - type: object - securityGroup: - description: SecurityGroup defines the NSG (network security - group) that should be attached to this subnet. - properties: - id: - type: string - ingressRule: - description: IngressRules is a slice of Azure ingress - rules for security groups. - items: - description: IngressRule defines an Azure ingress - rule for security groups. - properties: - description: - type: string - destination: - description: Destination - The destination address - prefix. CIDR or destination IP range. Asterix - '*' can also be used to match all source IPs. - Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' - and 'Internet' can also be used. - type: string - destinationPorts: - description: DestinationPorts - The destination - port or range. Integer or range between 0 and - 65535. Asterix '*' can also be used to match - all ports. - type: string - name: - type: string - priority: - description: Priority - A number between 100 and - 4096. Each rule should have a unique value for - priority. Rules are processed in priority order, - with lower numbers processed before higher numbers. - Once traffic matches a rule, processing stops. - format: int32 - type: integer - protocol: - description: SecurityGroupProtocol defines the - protocol type for a security group rule. - type: string - source: - description: Source - The CIDR or source IP range. - Asterix '*' can also be used to match all source - IPs. Default tags such as 'VirtualNetwork', - 'AzureLoadBalancer' and 'Internet' can also - be used. If this is an ingress rule, specifies - where network traffic originates from. - type: string - sourcePorts: - description: SourcePorts - The source port or - range. Integer or range between 0 and 65535. - Asterix '*' can also be used to match all ports. - type: string - required: - - description - - name - - protocol - type: object - type: array - name: - type: string - tags: - additionalProperties: - type: string - description: Tags defines a map of tags. - type: object - type: object - required: - - name - type: object - type: array - vnet: - description: Vnet is the configuration for the Azure virtual network. - properties: - cidrBlock: - description: 'CidrBlock is the CIDR block to be used when - the provider creates a managed virtual network. Deprecated: - Use CIDRBlocks instead' - type: string - cidrBlocks: - description: CIDRBlocks defines the virtual network's address - space, specified as one or more address prefixes in CIDR - notation. - items: - type: string - type: array - id: - description: ID is the identifier of the virtual network this - provider should use to create resources. - type: string - name: - description: Name defines a name for the virtual network resource. - type: string - resourceGroup: - description: ResourceGroup is the name of the resource group - of the existing virtual network or the resource group where - a managed virtual network should be created. - type: string - tags: - additionalProperties: - type: string - description: Tags is a collection of tags describing the resource. - type: object - required: - - name - type: object - type: object - resourceGroup: - type: string - subscriptionID: - type: string - required: - - location - type: object - status: - description: AzureClusterStatus defines the observed state of AzureCluster. - properties: - conditions: - description: Conditions defines current service state of the AzureCluster. - 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 specifies the list of unique failure - domains for the location/region of the cluster. A FailureDomain - maps to Availability Zone with an Azure Region (if the region support - them). An Availability Zone is a separate data center within a region - and they can be used to ensure the cluster is more resilient to - failure. See: https://learn.microsoft.com/azure/reliability/availability-zones-overview - This list will be used by Cluster API to try and spread the machines - across the failure domains.' - type: object - 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 AzureCluster belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: Ready - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].reason - name: Reason - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].message - name: Message - priority: 1 - type: string - - jsonPath: .spec.resourceGroup - name: Resource Group - priority: 1 - type: string - - jsonPath: .spec.subscriptionID - name: SubscriptionID - priority: 1 - type: string - - jsonPath: .spec.location - name: Location - priority: 1 - type: string - - description: Control Plane Endpoint - jsonPath: .spec.controlPlaneEndpoint.host - name: Endpoint - priority: 1 - type: string - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureCluster is the Schema for the azureclusters API. - 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: AzureClusterSpec defines the desired state of AzureCluster. - properties: - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to Azure - resources managed by the Azure provider, in addition to the ones - added by default. - type: object - azureEnvironment: - description: 'AzureEnvironment is the name of the AzureCloud to be - used. The default value that would be used by most users is "AzurePublicCloud", - other values are: - ChinaCloud: "AzureChinaCloud" - GermanCloud: - "AzureGermanCloud" - PublicCloud: "AzurePublicCloud" - USGovernmentCloud: - "AzureUSGovernmentCloud"' - type: string - bastionSpec: - description: BastionSpec encapsulates all things related to the Bastions - in the cluster. - properties: - azureBastion: - description: AzureBastion specifies how the Azure Bastion cloud - component should be configured. - properties: - name: - type: string - publicIP: - description: PublicIPSpec defines the inputs to create an - Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - subnet: - description: SubnetSpec configures an Azure subnet. - properties: - cidrBlocks: - description: CIDRBlocks defines the subnet's address space, - specified as one or more address prefixes in CIDR notation. - items: - type: string - type: array - id: - description: ID defines a unique identifier to reference - this resource. - type: string - name: - description: Name defines a name for the subnet resource. - type: string - natGateway: - description: NatGateway associated with this subnet. - properties: - id: - type: string - ip: - description: PublicIPSpec defines the inputs to create - an Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - name: - type: string - type: object - role: - description: Role defines the subnet role (eg. Node, ControlPlane) - type: string - routeTable: - description: RouteTable defines the route table that should - be attached to this subnet. - properties: - id: - type: string - name: - type: string - type: object - securityGroup: - description: SecurityGroup defines the NSG (network security - group) that should be attached to this subnet. - properties: - id: - type: string - name: - type: string - securityRules: - description: SecurityRules is a slice of Azure security - rules for security groups. - items: - description: SecurityRule defines an Azure security - rule for security groups. - properties: - description: - description: A description for this rule. Restricted - to 140 chars. - type: string - destination: - description: Destination is the destination - address prefix. CIDR or destination IP range. - Asterix '*' can also be used to match all - source IPs. Default tags such as 'VirtualNetwork', - 'AzureLoadBalancer' and 'Internet' can also - be used. - type: string - destinationPorts: - description: DestinationPorts specifies the - destination port or range. Integer or range - between 0 and 65535. Asterix '*' can also - be used to match all ports. - type: string - direction: - description: Direction indicates whether the - rule applies to inbound, or outbound traffic. - "Inbound" or "Outbound". - enum: - - Inbound - - Outbound - type: string - name: - description: Name is a unique name within the - network security group. - type: string - priority: - description: Priority is a number between 100 - and 4096. Each rule should have a unique value - for priority. Rules are processed in priority - order, with lower numbers processed before - higher numbers. Once traffic matches a rule, - processing stops. - format: int32 - type: integer - protocol: - description: Protocol specifies the protocol - type. "Tcp", "Udp", "Icmp", or "*". - enum: - - Tcp - - Udp - - Icmp - - '*' - type: string - source: - description: Source specifies the CIDR or source - IP range. Asterix '*' can also be used to - match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and - 'Internet' can also be used. If this is an - ingress rule, specifies where network traffic - originates from. - type: string - sourcePorts: - description: SourcePorts specifies source port - or range. Integer or range between 0 and 65535. - Asterix '*' can also be used to match all - ports. - type: string - required: - - description - - direction - - name - - protocol - type: object - type: array - tags: - additionalProperties: - type: string - description: Tags defines a map of tags. - type: object - type: object - required: - - name - type: object - type: object - type: object - cloudProviderConfigOverrides: - description: 'CloudProviderConfigOverrides is an optional set of configuration - values that can be overridden in azure cloud provider config. This - is only a subset of options that are available in azure cloud provider - config. Some values for the cloud provider config are inferred from - other parts of cluster api provider azure spec, and may not be available - for overrides. See: https://kubernetes-sigs.github.io/cloud-provider-azure/install/configs - Note: All cloud provider config values can be customized by creating - the secret beforehand. CloudProviderConfigOverrides is only used - when the secret is managed by the Azure Provider.' - properties: - backOffs: - description: BackOffConfig indicates the back-off config options. - properties: - cloudProviderBackoff: - type: boolean - cloudProviderBackoffDuration: - type: integer - cloudProviderBackoffExponent: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - cloudProviderBackoffJitter: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - cloudProviderBackoffRetries: - type: integer - type: object - rateLimits: - items: - description: 'RateLimitSpec represents the rate limit configuration - for a particular kind of resource. Eg. loadBalancerRateLimit - is used to configure rate limits for load balancers. This - eventually gets converted to CloudProviderRateLimitConfig - that cloud-provider-azure expects. See: https://github.com/kubernetes-sigs/cloud-provider-azure/blob/d585c2031925b39c925624302f22f8856e29e352/pkg/provider/azure_ratelimit.go#L25 - We cannot use CloudProviderRateLimitConfig directly because - floating point values are not supported in controller-tools. - See: https://github.com/kubernetes-sigs/controller-tools/issues/245' - properties: - config: - description: RateLimitConfig indicates the rate limit config - options. - properties: - cloudProviderRateLimit: - type: boolean - cloudProviderRateLimitBucket: - type: integer - cloudProviderRateLimitBucketWrite: - type: integer - cloudProviderRateLimitQPS: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - cloudProviderRateLimitQPSWrite: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - name: - description: Name is the name of the rate limit spec. - enum: - - defaultRateLimit - - routeRateLimit - - subnetsRateLimit - - interfaceRateLimit - - routeTableRateLimit - - loadBalancerRateLimit - - publicIPAddressRateLimit - - securityGroupRateLimit - - virtualMachineRateLimit - - storageAccountRateLimit - - diskRateLimit - - snapshotRateLimit - - virtualMachineScaleSetRateLimit - - virtualMachineSizesRateLimit - - availabilitySetRateLimit - type: string - type: object - type: array - 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 an AzureIdentity to be - used when reconciling this cluster - 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 - location: - type: string - networkSpec: - description: NetworkSpec encapsulates all things related to Azure - network. - properties: - apiServerLB: - description: APIServerLB is the configuration for the control-plane - load balancer. - properties: - frontendIPs: - items: - description: FrontendIP defines a load balancer frontend - IP configuration. - properties: - name: - minLength: 1 - type: string - privateIP: - type: string - publicIP: - description: PublicIPSpec defines the inputs to create - an Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - required: - - name - type: object - type: array - frontendIPsCount: - description: FrontendIPsCount specifies the number of frontend - IP addresses for the load balancer. - format: int32 - type: integer - id: - type: string - idleTimeoutInMinutes: - description: IdleTimeoutInMinutes specifies the timeout for - the TCP idle connection. - format: int32 - type: integer - name: - type: string - sku: - description: SKU defines an Azure load balancer SKU. - type: string - type: - description: LBType defines an Azure load balancer Type. - type: string - type: object - controlPlaneOutboundLB: - description: ControlPlaneOutboundLB is the configuration for the - control-plane outbound load balancer. This is different from - APIServerLB, and is used only in private clusters (optionally) - for enabling outbound traffic. - properties: - frontendIPs: - items: - description: FrontendIP defines a load balancer frontend - IP configuration. - properties: - name: - minLength: 1 - type: string - privateIP: - type: string - publicIP: - description: PublicIPSpec defines the inputs to create - an Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - required: - - name - type: object - type: array - frontendIPsCount: - description: FrontendIPsCount specifies the number of frontend - IP addresses for the load balancer. - format: int32 - type: integer - id: - type: string - idleTimeoutInMinutes: - description: IdleTimeoutInMinutes specifies the timeout for - the TCP idle connection. - format: int32 - type: integer - name: - type: string - sku: - description: SKU defines an Azure load balancer SKU. - type: string - type: - description: LBType defines an Azure load balancer Type. - type: string - type: object - nodeOutboundLB: - description: NodeOutboundLB is the configuration for the node - outbound load balancer. - properties: - frontendIPs: - items: - description: FrontendIP defines a load balancer frontend - IP configuration. - properties: - name: - minLength: 1 - type: string - privateIP: - type: string - publicIP: - description: PublicIPSpec defines the inputs to create - an Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - required: - - name - type: object - type: array - frontendIPsCount: - description: FrontendIPsCount specifies the number of frontend - IP addresses for the load balancer. - format: int32 - type: integer - id: - type: string - idleTimeoutInMinutes: - description: IdleTimeoutInMinutes specifies the timeout for - the TCP idle connection. - format: int32 - type: integer - name: - type: string - sku: - description: SKU defines an Azure load balancer SKU. - type: string - type: - description: LBType defines an Azure load balancer Type. - type: string - type: object - privateDNSZoneName: - description: PrivateDNSZoneName defines the zone name for the - Azure Private DNS. - type: string - subnets: - description: Subnets is the configuration for the control-plane - subnet and the node subnet. - items: - description: SubnetSpec configures an Azure subnet. - properties: - cidrBlocks: - description: CIDRBlocks defines the subnet's address space, - specified as one or more address prefixes in CIDR notation. - items: - type: string - type: array - id: - description: ID defines a unique identifier to reference - this resource. - type: string - name: - description: Name defines a name for the subnet resource. - type: string - natGateway: - description: NatGateway associated with this subnet. - properties: - id: - type: string - ip: - description: PublicIPSpec defines the inputs to create - an Azure public IP address. - properties: - dnsName: - type: string - name: - type: string - required: - - name - type: object - name: - type: string - type: object - role: - description: Role defines the subnet role (eg. Node, ControlPlane) - type: string - routeTable: - description: RouteTable defines the route table that should - be attached to this subnet. - properties: - id: - type: string - name: - type: string - type: object - securityGroup: - description: SecurityGroup defines the NSG (network security - group) that should be attached to this subnet. - properties: - id: - type: string - name: - type: string - securityRules: - description: SecurityRules is a slice of Azure security - rules for security groups. - items: - description: SecurityRule defines an Azure security - rule for security groups. - properties: - description: - description: A description for this rule. Restricted - to 140 chars. - type: string - destination: - description: Destination is the destination address - prefix. CIDR or destination IP range. Asterix - '*' can also be used to match all source IPs. - Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' - and 'Internet' can also be used. - type: string - destinationPorts: - description: DestinationPorts specifies the destination - port or range. Integer or range between 0 and - 65535. Asterix '*' can also be used to match - all ports. - type: string - direction: - description: Direction indicates whether the rule - applies to inbound, or outbound traffic. "Inbound" - or "Outbound". - enum: - - Inbound - - Outbound - type: string - name: - description: Name is a unique name within the - network security group. - type: string - priority: - description: Priority is a number between 100 - and 4096. Each rule should have a unique value - for priority. Rules are processed in priority - order, with lower numbers processed before higher - numbers. Once traffic matches a rule, processing - stops. - format: int32 - type: integer - protocol: - description: Protocol specifies the protocol type. - "Tcp", "Udp", "Icmp", or "*". - enum: - - Tcp - - Udp - - Icmp - - '*' - type: string - source: - description: Source specifies the CIDR or source - IP range. Asterix '*' can also be used to match - all source IPs. Default tags such as 'VirtualNetwork', - 'AzureLoadBalancer' and 'Internet' can also - be used. If this is an ingress rule, specifies - where network traffic originates from. - type: string - sourcePorts: - description: SourcePorts specifies source port - or range. Integer or range between 0 and 65535. - Asterix '*' can also be used to match all ports. - type: string - required: - - description - - direction - - name - - protocol - type: object - type: array - tags: - additionalProperties: - type: string - description: Tags defines a map of tags. - type: object - type: object - required: - - name - type: object - type: array - vnet: - description: Vnet is the configuration for the Azure virtual network. - properties: - cidrBlocks: - description: CIDRBlocks defines the virtual network's address - space, specified as one or more address prefixes in CIDR - notation. - items: - type: string - type: array - id: - description: ID is the identifier of the virtual network this - provider should use to create resources. - type: string - name: - description: Name defines a name for the virtual network resource. - type: string - resourceGroup: - description: ResourceGroup is the name of the resource group - of the existing virtual network or the resource group where - a managed virtual network should be created. - type: string - tags: - additionalProperties: - type: string - description: Tags is a collection of tags describing the resource. - type: object - required: - - name - type: object - type: object - resourceGroup: - type: string - subscriptionID: - type: string - required: - - location - type: object - status: - description: AzureClusterStatus defines the observed state of AzureCluster. - properties: - conditions: - description: Conditions defines current service state of the AzureCluster. - 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 specifies the list of unique failure - domains for the location/region of the cluster. A FailureDomain - maps to Availability Zone with an Azure Region (if the region support - them). An Availability Zone is a separate data center within a region - and they can be used to ensure the cluster is more resilient to - failure. See: https://learn.microsoft.com/azure/reliability/availability-zones-overview - This list will be used by Cluster API to try and spread the machines - across the failure domains.' - type: object - longRunningOperationStates: - description: LongRunningOperationStates saves the states for Azure - long-running operations so they can be continued on the next reconciliation - loop. - items: - description: Future contains the data needed for an Azure long-running - operation to continue across reconcile loops. - properties: - data: - description: Data is the base64 url encoded json Azure AutoRest - Future. - type: string - name: - description: Name is the name of the Azure resource. Together - with the service name, this forms the unique identifier for - the future. - type: string - resourceGroup: - description: ResourceGroup is the Azure resource group for the - resource. - type: string - serviceName: - description: ServiceName is the name of the Azure service. Together - with the name of the resource, this forms the unique identifier - for the future. - type: string - type: - description: Type describes the type of future, such as update, - create, delete, etc. - type: string - required: - - name - - serviceName - - type - 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 AzureCluster belongs jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml index eab638aadbd..c4ef3f3bf30 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepoolmachines.yaml @@ -19,228 +19,6 @@ spec: singular: azuremachinepoolmachine scope: Namespaced versions: - - additionalPrinterColumns: - - description: Kubernetes version - jsonPath: .status.version - name: Version - type: string - - description: Flag indicating infrastructure is successfully provisioned - jsonPath: .status.ready - name: Ready - type: string - - description: Azure VMSS VM provisioning state - jsonPath: .status.provisioningState - name: State - type: string - - description: Cluster to which this AzureMachinePoolMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - priority: 1 - type: string - - description: Azure VMSS VM ID - jsonPath: .spec.providerID - name: VMSS VM ID - priority: 1 - type: string - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureMachinePoolMachine is the Schema for the azuremachinepoolmachines - API. - 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: AzureMachinePoolMachineSpec defines the desired state of - AzureMachinePoolMachine. - properties: - instanceID: - description: InstanceID is the identification of the Machine Instance - within the VMSS - type: string - providerID: - description: ProviderID is the identification ID of the Virtual Machine - Scale Set - type: string - required: - - instanceID - - providerID - type: object - status: - description: AzureMachinePoolMachineStatus defines the observed state - of AzureMachinePoolMachine. - properties: - conditions: - description: Conditions defines current service state of the AzureMachinePool. - 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 MachinePool and will contain - a more verbose string suitable for logging and human consumption. - \n Any transient errors that occur during the reconciliation of - MachinePools can be added as events to the MachinePool 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 MachinePool machine and will - contain a succinct value suitable for machine interpretation. \n - Any transient errors that occur during the reconciliation of MachinePools - can be added as events to the MachinePool object and/or logged in - the controller's output." - type: string - instanceName: - description: InstanceName is the name of the Machine Instance within - the VMSS - type: string - latestModelApplied: - description: LatestModelApplied indicates the instance is running - the most up-to-date VMSS model. A VMSS model describes the image - version the VM is running. If the instance is not running the latest - model, it means the instance may not be running the version of Kubernetes - the Machine Pool has specified and needs to be updated. - type: boolean - longRunningOperationStates: - description: LongRunningOperationStates saves the state for Azure - long running operations so they can be continued on the next reconciliation - loop. - items: - description: Future contains the data needed for an Azure long-running - operation to continue across reconcile loops. - properties: - data: - description: Data is the base64 url encoded json Azure AutoRest - Future. - type: string - name: - description: Name is the name of the Azure resource. Together - with the service name, this forms the unique identifier for - the future. - type: string - resourceGroup: - description: ResourceGroup is the Azure resource group for the - resource. - type: string - serviceName: - description: ServiceName is the name of the Azure service. Together - with the name of the resource, this forms the unique identifier - for the future. - type: string - type: - description: Type describes the type of future, such as update, - create, delete, etc. - type: string - required: - - name - - serviceName - - type - type: object - type: array - nodeRef: - description: NodeRef will point to the corresponding Node if it exists. - 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 - provisioningState: - description: ProvisioningState is the provisioning state of the Azure - virtual machine instance. - type: string - ready: - description: Ready is true when the provider resource is ready. - type: boolean - version: - description: Version defines the Kubernetes version for the VM Instance - type: string - required: - - latestModelApplied - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: Kubernetes version jsonPath: .status.version diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml index e1bfcd5d61b..38491aa737f 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinepools.yaml @@ -19,1280 +19,6 @@ spec: singular: azuremachinepool scope: Namespaced versions: - - additionalPrinterColumns: - - description: AzureMachinePool replicas count - jsonPath: .status.replicas - name: Replicas - type: string - - description: AzureMachinePool replicas count - jsonPath: .status.ready - name: Ready - type: string - - description: Azure VMSS provisioning state - jsonPath: .status.provisioningState - name: State - type: string - - description: Cluster to which this AzureMachinePool belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - priority: 1 - type: string - - description: MachinePool object to which this AzureMachinePool belongs - jsonPath: .metadata.ownerReferences[?(@.kind=="MachinePool")].name - name: MachinePool - priority: 1 - type: string - - description: Azure VMSS ID - jsonPath: .spec.providerID - name: VMSS ID - priority: 1 - type: string - - description: Azure VM Size - jsonPath: .spec.template.vmSize - name: VM Size - priority: 1 - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureMachinePool is the Schema for the azuremachinepools API. - 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: AzureMachinePoolSpec defines the desired state of AzureMachinePool. - properties: - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to an - instance, in addition to the ones added by default by the Azure - provider. If both the AzureCluster and the AzureMachine specify - the same tag name with different values, the AzureMachine's value - takes precedence. - type: object - identity: - default: None - description: Identity is the type of identity used for the Virtual - Machine Scale Set. The type 'SystemAssigned' is an implicitly created - identity. The generated identity will be assigned a Subscription - contributor role. The type 'UserAssigned' is a standalone Azure - resource provided by the user and assigned to the VM - enum: - - None - - SystemAssigned - - UserAssigned - type: string - location: - description: Location is the Azure region location e.g. westus2 - type: string - providerID: - description: ProviderID is the identification ID of the Virtual Machine - Scale Set - type: string - providerIDList: - description: ProviderIDList are the identification IDs of machine - instances provided by the provider. This field must match the provider - IDs as seen on the node objects corresponding to a machine pool's - machine instances. - items: - type: string - type: array - roleAssignmentName: - description: RoleAssignmentName is the name of the role assignment - to create for a system assigned identity. It can be any valid GUID. - If not specified, a random GUID will be generated. - type: string - template: - description: Template contains the details used to build a replica - virtual machine within the Machine Pool. - properties: - acceleratedNetworking: - description: AcceleratedNetworking enables or disables Azure accelerated - networking. If omitted, it will be set based on whether the - requested VMSize supports accelerated networking. If AcceleratedNetworking - is set to true with a VMSize that does not support it, Azure - will return an error. - type: boolean - dataDisks: - description: DataDisks specifies the list of data disks to be - created for a Virtual Machine - items: - description: DataDisk specifies the parameters that are used - to add one or more data disks to the machine. - properties: - cachingType: - type: string - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to the - data disk. - format: int32 - type: integer - lun: - description: Lun Specifies the logical unit number of the - data disk. This value is used to identify data disks within - the VM and therefore must be unique for each data disk - attached to a VM. The value must be between 0 and 63. - format: int32 - type: integer - managedDisk: - description: ManagedDisk defines the managed disk options - for a VM. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk - encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - required: - - storageAccountType - type: object - nameSuffix: - description: NameSuffix is the suffix to be appended to - the machine name to generate the disk name. Each disk - name will be in format _. - type: string - required: - - diskSizeGB - - nameSuffix - type: object - type: array - image: - description: Image is used to provide details of an image to use - during Virtual Machine creation. If image details are omitted - the image will default the Azure Marketplace "capi" offer, which - is based on Ubuntu. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from the - Azure Marketplace - properties: - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization - that created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such - as a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is published - by a third party publisher and a Plan will be generated - for it. - type: boolean - version: - description: Version specifies the version of an image - sku. The allowed formats are Major.Minor.Build or 'latest'. - Major, Minor, and Build are decimal numbers. Specify - 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image - will not automatically update after deploy time even - if a new version becomes available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from - an Azure Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared - image gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - resourceGroup: - description: ResourceGroup specifies the resource group - containing the shared image gallery - minLength: 1 - type: string - subscriptionID: - description: SubscriptionID is the identifier of the subscription - that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the marketplace - image. The allowed formats are Major.Minor.Build or - 'latest'. Major, Minor, and Build are decimal numbers. - Specify 'latest' to use the latest version of an image - available at deploy time. Even if you use 'latest', - the VM image will not automatically update after deploy - time even if a new version becomes available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - osDisk: - description: OSDisk contains the operating system disk information - for a Virtual Machine - properties: - cachingType: - type: string - diffDiskSettings: - description: DiffDiskSettings describe ephemeral disk settings - for the os disk. - properties: - option: - description: Option enables ephemeral OS when set to "Local" - See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks - for full details - enum: - - Local - type: string - required: - - option - type: object - diskSizeGB: - format: int32 - type: integer - managedDisk: - description: ManagedDisk defines the managed disk options - for a VM. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk - encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - required: - - storageAccountType - type: object - osType: - type: string - required: - - diskSizeGB - - managedDisk - - osType - type: object - securityProfile: - description: SecurityProfile specifies the Security profile settings - for a virtual machine. - properties: - encryptionAtHost: - description: This field indicates whether Host Encryption - should be enabled or disabled for a virtual machine or virtual - machine scale set. Default is disabled. - type: boolean - type: object - spotVMOptions: - description: SpotVMOptions allows the ability to specify the Machine - should use a Spot VM - properties: - maxPrice: - anyOf: - - type: integer - - type: string - description: MaxPrice defines the maximum price the user is - willing to pay for Spot VM instances - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - sshPublicKey: - description: SSHPublicKey is the SSH public key string base64 - encoded to add to a Virtual Machine - type: string - terminateNotificationTimeout: - description: TerminateNotificationTimeout enables or disables - VMSS scheduled events termination notification with specified - timeout allowed values are between 5 and 15 (mins) - type: integer - vmSize: - description: VMSize is the size of the Virtual Machine to build. - See https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#virtualmachinesizetypes - type: string - required: - - osDisk - - sshPublicKey - - vmSize - type: object - userAssignedIdentities: - description: UserAssignedIdentities is a list of standalone Azure - identities provided by the user The lifecycle of a user-assigned - identity is managed separately from the lifecycle of the AzureMachinePool. - See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - items: - description: UserAssignedIdentity defines the user-assigned identities - provided by the user to be assigned to Azure resources. - properties: - providerID: - description: 'ProviderID is the identification ID of the user-assigned - Identity, the format of an identity is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''' - type: string - required: - - providerID - type: object - type: array - required: - - location - - template - type: object - status: - description: AzureMachinePoolStatus defines the observed state of AzureMachinePool. - properties: - conditions: - description: Conditions defines current service state of the AzureMachinePool. - 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 MachinePool 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 MachinePool'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 MachinePools can be added as - events to the MachinePool 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 MachinePool 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 MachinePool'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 MachinePools can be added as - events to the MachinePool object and/or logged in the controller's - output." - type: string - instances: - description: Instances is the VM instance status for each VM in the - VMSS - items: - description: AzureMachinePoolInstanceStatus provides status information - for each instance in the VMSS. - properties: - instanceID: - description: InstanceID is the identification of the Machine - Instance within the VMSS - type: string - instanceName: - description: InstanceName is the name of the Machine Instance - within the VMSS - type: string - latestModelApplied: - description: LatestModelApplied indicates the instance is running - the most up-to-date VMSS model. A VMSS model describes the - image version the VM is running. If the instance is not running - the latest model, it means the instance may not be running - the version of Kubernetes the Machine Pool has specified and - needs to be updated. - type: boolean - providerID: - description: ProviderID is the provider identification of the - VMSS Instance - type: string - provisioningState: - description: ProvisioningState is the provisioning state of - the Azure virtual machine instance. - type: string - version: - description: Version defines the Kubernetes version for the - VM Instance - type: string - required: - - latestModelApplied - type: object - type: array - longRunningOperationState: - description: LongRunningOperationState saves the state for an Azure - long running operations so it can be continued on the next reconciliation - loop. - properties: - futureData: - description: FutureData is the base64 url encoded json Azure AutoRest - Future. - type: string - name: - description: Name is the name of the Azure resource. - type: string - resourceGroup: - description: ResourceGroup is the Azure resource group for the - resource. - type: string - type: - description: Type describes the type of future, update, create, - delete, etc. - type: string - required: - - type - type: object - provisioningState: - description: ProvisioningState is the provisioning state of the Azure - virtual machine. - type: string - ready: - description: Ready is true when the provider resource is ready. - type: boolean - replicas: - description: Replicas is the most recently observed number of replicas. - format: int32 - type: integer - version: - description: Version is the Kubernetes version for the current VMSS - model - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: AzureMachinePool replicas count - jsonPath: .status.replicas - name: Replicas - type: string - - description: AzureMachinePool replicas count - jsonPath: .status.ready - name: Ready - type: string - - description: Azure VMSS provisioning state - jsonPath: .status.provisioningState - name: State - type: string - - description: Cluster to which this AzureMachinePool belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - priority: 1 - type: string - - description: MachinePool object to which this AzureMachinePool belongs - jsonPath: .metadata.ownerReferences[?(@.kind=="MachinePool")].name - name: MachinePool - priority: 1 - type: string - - description: Azure VMSS ID - jsonPath: .spec.providerID - name: VMSS ID - priority: 1 - type: string - - description: Azure VM Size - jsonPath: .spec.template.vmSize - name: VM Size - priority: 1 - type: string - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureMachinePool is the Schema for the azuremachinepools API. - 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: AzureMachinePoolSpec defines the desired state of AzureMachinePool. - properties: - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to an - instance, in addition to the ones added by default by the Azure - provider. If both the AzureCluster and the AzureMachine specify - the same tag name with different values, the AzureMachine's value - takes precedence. - type: object - identity: - default: None - description: Identity is the type of identity used for the Virtual - Machine Scale Set. The type 'SystemAssigned' is an implicitly created - identity. The generated identity will be assigned a Subscription - contributor role. The type 'UserAssigned' is a standalone Azure - resource provided by the user and assigned to the VM - enum: - - None - - SystemAssigned - - UserAssigned - type: string - location: - description: Location is the Azure region location e.g. westus2 - type: string - nodeDrainTimeout: - description: 'NodeDrainTimeout is the total amount of time that the - controller will spend on draining a node. The default value is 0, - meaning that the node can be drained without any time limitations. - NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`' - type: string - providerID: - description: ProviderID is the identification ID of the Virtual Machine - Scale Set - type: string - providerIDList: - description: ProviderIDList are the identification IDs of machine - instances provided by the provider. This field must match the provider - IDs as seen on the node objects corresponding to a machine pool's - machine instances. - items: - type: string - type: array - roleAssignmentName: - description: RoleAssignmentName is the name of the role assignment - to create for a system assigned identity. It can be any valid GUID. - If not specified, a random GUID will be generated. - type: string - strategy: - default: - rollingUpdate: - deletePolicy: Oldest - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - description: The deployment strategy to use to replace existing AzureMachinePoolMachines - with new ones. - properties: - rollingUpdate: - description: Rolling update config params. Present only if MachineDeploymentStrategyType - = RollingUpdate. - properties: - deletePolicy: - default: Oldest - description: DeletePolicy defines the policy used by the MachineDeployment - to identify nodes to delete when downscaling. Valid values - are "Random, "Newest", "Oldest" When no value is supplied, - the default is Oldest - enum: - - Random - - Newest - - Oldest - type: string - maxSurge: - anyOf: - - type: integer - - type: string - default: 1 - description: 'The maximum number of machines that can be scheduled - above the desired number of machines. Value can be an absolute - number (ex: 5) or a percentage of desired machines (ex: - 10%). This can not be 0 if MaxUnavailable is 0. Absolute - number is calculated from percentage by rounding up. Defaults - to 1. Example: when this is set to 30%, the new MachineSet - can be scaled up immediately when the rolling update starts, - such that the total number of old and new machines do not - exceed 130% of desired machines. Once old machines have - been killed, new MachineSet can be scaled up further, ensuring - that total number of machines running at any time during - the update is at most 130% of desired machines.' - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - default: 0 - description: 'The maximum number of machines that can be unavailable - during the update. Value can be an absolute number (ex: - 5) or a percentage of desired machines (ex: 10%). Absolute - number is calculated from percentage by rounding down. This - can not be 0 if MaxSurge is 0. Defaults to 0. Example: when - this is set to 30%, the old MachineSet can be scaled down - to 70% of desired machines immediately when the rolling - update starts. Once new machines are ready, old MachineSet - can be scaled down further, followed by scaling up the new - MachineSet, ensuring that the total number of machines available - at all times during the update is at least 70% of desired - machines.' - x-kubernetes-int-or-string: true - type: object - type: - default: RollingUpdate - description: Type of deployment. Currently the only supported - strategy is RollingUpdate - enum: - - RollingUpdate - type: string - type: object - template: - description: Template contains the details used to build a replica - virtual machine within the Machine Pool - properties: - acceleratedNetworking: - description: AcceleratedNetworking enables or disables Azure accelerated - networking. If omitted, it will be set based on whether the - requested VMSize supports accelerated networking. If AcceleratedNetworking - is set to true with a VMSize that does not support it, Azure - will return an error. - type: boolean - dataDisks: - description: DataDisks specifies the list of data disks to be - created for a Virtual Machine - items: - description: DataDisk specifies the parameters that are used - to add one or more data disks to the machine. - properties: - cachingType: - description: CachingType specifies the caching requirements. - enum: - - None - - ReadOnly - - ReadWrite - type: string - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to the - data disk. - format: int32 - type: integer - lun: - description: Lun Specifies the logical unit number of the - data disk. This value is used to identify data disks within - the VM and therefore must be unique for each data disk - attached to a VM. The value must be between 0 and 63. - format: int32 - type: integer - managedDisk: - description: ManagedDisk specifies the Managed Disk parameters - for the data disk. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk - encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - type: object - nameSuffix: - description: NameSuffix is the suffix to be appended to - the machine name to generate the disk name. Each disk - name will be in format _. - type: string - required: - - diskSizeGB - - nameSuffix - type: object - type: array - image: - description: Image is used to provide details of an image to use - during VM creation. If image details are omitted the image will - default the Azure Marketplace "capi" offer, which is based on - Ubuntu. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from the - Azure Marketplace - properties: - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization - that created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such - as a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is published - by a third party publisher and a Plan will be generated - for it. - type: boolean - version: - description: Version specifies the version of an image - sku. The allowed formats are Major.Minor.Build or 'latest'. - Major, Minor, and Build are decimal numbers. Specify - 'latest' to use the latest version of an image available - at deploy time. Even if you use 'latest', the VM image - will not automatically update after deploy time even - if a new version becomes available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from - an Azure Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared - image gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer This value will be used to add a `Plan` - in the API request when creating the VM/VMSS resource. - This is needed when the source image from which this - SIG image was built requires the `Plan` to be used. - type: string - publisher: - description: Publisher is the name of the organization - that created the image. This value will be used to add - a `Plan` in the API request when creating the VM/VMSS - resource. This is needed when the source image from - which this SIG image was built requires the `Plan` to - be used. - type: string - resourceGroup: - description: ResourceGroup specifies the resource group - containing the shared image gallery - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such - as a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter This value will be used to add a `Plan` - in the API request when creating the VM/VMSS resource. - This is needed when the source image from which this - SIG image was built requires the `Plan` to be used. - type: string - subscriptionID: - description: SubscriptionID is the identifier of the subscription - that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the marketplace - image. The allowed formats are Major.Minor.Build or - 'latest'. Major, Minor, and Build are decimal numbers. - Specify 'latest' to use the latest version of an image - available at deploy time. Even if you use 'latest', - the VM image will not automatically update after deploy - time even if a new version becomes available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - osDisk: - description: OSDisk contains the operating system disk information - for a Virtual Machine - properties: - cachingType: - description: CachingType specifies the caching requirements. - enum: - - None - - ReadOnly - - ReadWrite - type: string - diffDiskSettings: - description: DiffDiskSettings describe ephemeral disk settings - for the os disk. - properties: - option: - description: Option enables ephemeral OS when set to "Local" - See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks - for full details - enum: - - Local - type: string - required: - - option - type: object - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to the - OS disk. Will have a default of 30GB if not provided - format: int32 - type: integer - managedDisk: - description: ManagedDisk specifies the Managed Disk parameters - for the OS disk. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk - encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - type: object - osType: - type: string - required: - - osType - type: object - securityProfile: - description: SecurityProfile specifies the Security profile settings - for a virtual machine. - properties: - encryptionAtHost: - description: This field indicates whether Host Encryption - should be enabled or disabled for a virtual machine or virtual - machine scale set. Default is disabled. - type: boolean - type: object - spotVMOptions: - description: SpotVMOptions allows the ability to specify the Machine - should use a Spot VM - properties: - maxPrice: - anyOf: - - type: integer - - type: string - description: MaxPrice defines the maximum price the user is - willing to pay for Spot VM instances - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - sshPublicKey: - description: SSHPublicKey is the SSH public key string base64 - encoded to add to a Virtual Machine - type: string - subnetName: - description: SubnetName selects the Subnet where the VMSS will - be placed - type: string - terminateNotificationTimeout: - description: TerminateNotificationTimeout enables or disables - VMSS scheduled events termination notification with specified - timeout allowed values are between 5 and 15 (mins) - type: integer - vmSize: - description: VMSize is the size of the Virtual Machine to build. - See https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#virtualmachinesizetypes - type: string - required: - - osDisk - - sshPublicKey - - vmSize - type: object - userAssignedIdentities: - description: UserAssignedIdentities is a list of standalone Azure - identities provided by the user The lifecycle of a user-assigned - identity is managed separately from the lifecycle of the AzureMachinePool. - See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - items: - description: UserAssignedIdentity defines the user-assigned identities - provided by the user to be assigned to Azure resources. - properties: - providerID: - description: 'ProviderID is the identification ID of the user-assigned - Identity, the format of an identity is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''' - type: string - required: - - providerID - type: object - type: array - required: - - location - - template - type: object - status: - description: AzureMachinePoolStatus defines the observed state of AzureMachinePool. - properties: - conditions: - description: Conditions defines current service state of the AzureMachinePool. - 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 MachinePool 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 MachinePool'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 MachinePools can be added as - events to the MachinePool 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 MachinePool 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 MachinePool'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 MachinePools can be added as - events to the MachinePool object and/or logged in the controller's - output." - type: string - image: - description: Image is the current image used in the AzureMachinePool. - When the spec image is nil, this image is populated with the details - of the defaulted Azure Marketplace "capi" offer. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from the Azure - Marketplace - properties: - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization that - created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such as - a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is published - by a third party publisher and a Plan will be generated - for it. - type: boolean - version: - description: Version specifies the version of an image sku. - The allowed formats are Major.Minor.Build or 'latest'. Major, - Minor, and Build are decimal numbers. Specify 'latest' to - use the latest version of an image available at deploy time. - Even if you use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from an Azure - Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared image - gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer This value will be used to add a `Plan` in - the API request when creating the VM/VMSS resource. This - is needed when the source image from which this SIG image - was built requires the `Plan` to be used. - type: string - publisher: - description: Publisher is the name of the organization that - created the image. This value will be used to add a `Plan` - in the API request when creating the VM/VMSS resource. This - is needed when the source image from which this SIG image - was built requires the `Plan` to be used. - type: string - resourceGroup: - description: ResourceGroup specifies the resource group containing - the shared image gallery - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such as - a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter This value will be used to add a `Plan` - in the API request when creating the VM/VMSS resource. This - is needed when the source image from which this SIG image - was built requires the `Plan` to be used. - type: string - subscriptionID: - description: SubscriptionID is the identifier of the subscription - that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the marketplace - image. The allowed formats are Major.Minor.Build or 'latest'. - Major, Minor, and Build are decimal numbers. Specify 'latest' - to use the latest version of an image available at deploy - time. Even if you use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - instances: - description: Instances is the VM instance status for each VM in the - VMSS - items: - description: AzureMachinePoolInstanceStatus provides status information - for each instance in the VMSS. - properties: - instanceID: - description: InstanceID is the identification of the Machine - Instance within the VMSS - type: string - instanceName: - description: InstanceName is the name of the Machine Instance - within the VMSS - type: string - latestModelApplied: - description: LatestModelApplied indicates the instance is running - the most up-to-date VMSS model. A VMSS model describes the - image version the VM is running. If the instance is not running - the latest model, it means the instance may not be running - the version of Kubernetes the Machine Pool has specified and - needs to be updated. - type: boolean - providerID: - description: ProviderID is the provider identification of the - VMSS Instance - type: string - provisioningState: - description: ProvisioningState is the provisioning state of - the Azure virtual machine instance. - type: string - version: - description: Version defines the Kubernetes version for the - VM Instance - type: string - required: - - latestModelApplied - type: object - type: array - longRunningOperationStates: - description: LongRunningOperationStates saves the state for Azure - long-running operations so they can be continued on the next reconciliation - loop. - items: - description: Future contains the data needed for an Azure long-running - operation to continue across reconcile loops. - properties: - data: - description: Data is the base64 url encoded json Azure AutoRest - Future. - type: string - name: - description: Name is the name of the Azure resource. Together - with the service name, this forms the unique identifier for - the future. - type: string - resourceGroup: - description: ResourceGroup is the Azure resource group for the - resource. - type: string - serviceName: - description: ServiceName is the name of the Azure service. Together - with the name of the resource, this forms the unique identifier - for the future. - type: string - type: - description: Type describes the type of future, such as update, - create, delete, etc. - type: string - required: - - name - - serviceName - - type - type: object - type: array - provisioningState: - description: ProvisioningState is the provisioning state of the Azure - virtual machine. - type: string - ready: - description: Ready is true when the provider resource is ready. - type: boolean - replicas: - description: Replicas is the most recently observed number of replicas. - format: int32 - type: integer - version: - description: Version is the Kubernetes version for the current VMSS - model - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - description: AzureMachinePool replicas count jsonPath: .status.replicas diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml index db1b61af662..74baeb5becc 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachines.yaml @@ -17,977 +17,6 @@ spec: singular: azuremachine scope: Namespaced versions: - - additionalPrinterColumns: - - description: AzureMachine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: Azure VM provisioning state - jsonPath: .status.vmState - name: State - type: string - - description: Cluster to which this AzureMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - priority: 1 - type: string - - description: Machine object to which this AzureMachine belongs - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Azure VM ID - jsonPath: .spec.providerID - name: VM ID - priority: 1 - type: string - - description: Azure VM Size - jsonPath: .spec.vmSize - name: VM Size - priority: 1 - type: string - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureMachine is the Schema for the azuremachines API. - 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: AzureMachineSpec defines the desired state of AzureMachine. - properties: - acceleratedNetworking: - description: AcceleratedNetworking enables or disables Azure accelerated - networking. If omitted, it will be set based on whether the requested - VMSize supports accelerated networking. If AcceleratedNetworking - is set to true with a VMSize that does not support it, Azure will - return an error. - type: boolean - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to an - instance, in addition to the ones added by default by the Azure - provider. If both the AzureCluster and the AzureMachine specify - the same tag name with different values, the AzureMachine's value - takes precedence. - type: object - allocatePublicIP: - description: AllocatePublicIP allows the ability to create dynamic - public ips for machines where this value is true. - type: boolean - availabilityZone: - description: 'Deprecated: use FailureDomain instead' - properties: - enabled: - type: boolean - id: - type: string - type: object - dataDisks: - description: DataDisk specifies the parameters that are used to add - one or more data disks to the machine - items: - description: DataDisk specifies the parameters that are used to - add one or more data disks to the machine. - properties: - cachingType: - type: string - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to the data - disk. - format: int32 - type: integer - lun: - description: Lun Specifies the logical unit number of the data - disk. This value is used to identify data disks within the - VM and therefore must be unique for each data disk attached - to a VM. The value must be between 0 and 63. - format: int32 - type: integer - managedDisk: - description: ManagedDisk defines the managed disk options for - a VM. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk encryption - options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - required: - - storageAccountType - type: object - nameSuffix: - description: NameSuffix is the suffix to be appended to the - machine name to generate the disk name. Each disk name will - be in format _. - type: string - required: - - diskSizeGB - - nameSuffix - type: object - type: array - enableIPForwarding: - description: EnableIPForwarding enables IP Forwarding in Azure which - is required for some CNI's to send traffic from a pods on one machine - to another. This is required for IpV6 with Calico in combination - with User Defined Routes (set by the Azure Cloud Controller manager). - Default is false for disabled. - type: boolean - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster API. This - relates to an Azure Availability Zone - type: string - identity: - default: None - description: Identity is the type of identity used for the virtual - machine. The type 'SystemAssigned' is an implicitly created identity. - The generated identity will be assigned a Subscription contributor - role. The type 'UserAssigned' is a standalone Azure resource provided - by the user and assigned to the VM - enum: - - None - - SystemAssigned - - UserAssigned - type: string - image: - description: Image is used to provide details of an image to use during - VM creation. If image details are omitted the image will default - the Azure Marketplace "capi" offer, which is based on Ubuntu. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from the Azure - Marketplace - properties: - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization that - created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such as - a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is published - by a third party publisher and a Plan will be generated - for it. - type: boolean - version: - description: Version specifies the version of an image sku. - The allowed formats are Major.Minor.Build or 'latest'. Major, - Minor, and Build are decimal numbers. Specify 'latest' to - use the latest version of an image available at deploy time. - Even if you use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from an Azure - Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared image - gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - resourceGroup: - description: ResourceGroup specifies the resource group containing - the shared image gallery - minLength: 1 - type: string - subscriptionID: - description: SubscriptionID is the identifier of the subscription - that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the marketplace - image. The allowed formats are Major.Minor.Build or 'latest'. - Major, Minor, and Build are decimal numbers. Specify 'latest' - to use the latest version of an image available at deploy - time. Even if you use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - location: - description: 'Deprecated: to support old clients, will be removed - in v1alpha4/v1beta1' - type: string - osDisk: - description: OSDisk specifies the parameters for the operating system - disk of the machine - properties: - cachingType: - type: string - diffDiskSettings: - description: DiffDiskSettings describe ephemeral disk settings - for the os disk. - properties: - option: - description: Option enables ephemeral OS when set to "Local" - See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks - for full details - enum: - - Local - type: string - required: - - option - type: object - diskSizeGB: - format: int32 - type: integer - managedDisk: - description: ManagedDisk defines the managed disk options for - a VM. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk encryption - options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - required: - - storageAccountType - type: object - osType: - type: string - required: - - diskSizeGB - - managedDisk - - osType - type: object - providerID: - description: ProviderID is the unique identifier as specified by the - cloud provider. - type: string - roleAssignmentName: - description: RoleAssignmentName is the name of the role assignment - to create for a system assigned identity. It can be any valid GUID. - If not specified, a random GUID will be generated. - type: string - securityProfile: - description: SecurityProfile specifies the Security profile settings - for a virtual machine. - properties: - encryptionAtHost: - description: This field indicates whether Host Encryption should - be enabled or disabled for a virtual machine or virtual machine - scale set. Default is disabled. - type: boolean - type: object - spotVMOptions: - description: SpotVMOptions allows the ability to specify the Machine - should use a Spot VM. - properties: - maxPrice: - anyOf: - - type: integer - - type: string - description: MaxPrice defines the maximum price the user is willing - to pay for Spot VM instances - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - sshPublicKey: - type: string - userAssignedIdentities: - description: UserAssignedIdentities is a list of standalone Azure - identities provided by the user The lifecycle of a user-assigned - identity is managed separately from the lifecycle of the AzureMachine. - See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - items: - description: UserAssignedIdentity defines the user-assigned identities - provided by the user to be assigned to Azure resources. - properties: - providerID: - description: 'ProviderID is the identification ID of the user-assigned - Identity, the format of an identity is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''' - type: string - required: - - providerID - type: object - type: array - vmSize: - type: string - required: - - location - - osDisk - - sshPublicKey - - vmSize - type: object - status: - description: AzureMachineStatus defines the observed state of AzureMachine. - properties: - addresses: - description: Addresses contains the Azure instance associated addresses. - items: - description: NodeAddress contains information for the node's address. - properties: - address: - description: The node address. - type: string - type: - description: Node 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 AzureMachine. - 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: "ErrorMessage 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: "ErrorReason 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 - ready: - description: Ready is true when the provider resource is ready. - type: boolean - vmState: - description: VMState is the provisioning state of the Azure virtual - machine. - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: AzureMachine ready status - jsonPath: .status.ready - name: Ready - type: string - - description: Azure VM provisioning state - jsonPath: .status.vmState - name: State - type: string - - description: Cluster to which this AzureMachine belongs - jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name - name: Cluster - priority: 1 - type: string - - description: Machine object to which this AzureMachine belongs - jsonPath: .metadata.ownerReferences[?(@.kind=="Machine")].name - name: Machine - priority: 1 - type: string - - description: Azure VM ID - jsonPath: .spec.providerID - name: VM ID - priority: 1 - type: string - - description: Azure VM Size - jsonPath: .spec.vmSize - name: VM Size - priority: 1 - type: string - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureMachine is the Schema for the azuremachines API. - 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: AzureMachineSpec defines the desired state of AzureMachine. - properties: - acceleratedNetworking: - description: AcceleratedNetworking enables or disables Azure accelerated - networking. If omitted, it will be set based on whether the requested - VMSize supports accelerated networking. If AcceleratedNetworking - is set to true with a VMSize that does not support it, Azure will - return an error. - type: boolean - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to an - instance, in addition to the ones added by default by the Azure - provider. If both the AzureCluster and the AzureMachine specify - the same tag name with different values, the AzureMachine's value - takes precedence. - type: object - allocatePublicIP: - description: AllocatePublicIP allows the ability to create dynamic - public ips for machines where this value is true. - type: boolean - dataDisks: - description: DataDisk specifies the parameters that are used to add - one or more data disks to the machine - items: - description: DataDisk specifies the parameters that are used to - add one or more data disks to the machine. - properties: - cachingType: - description: CachingType specifies the caching requirements. - enum: - - None - - ReadOnly - - ReadWrite - type: string - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to the data - disk. - format: int32 - type: integer - lun: - description: Lun Specifies the logical unit number of the data - disk. This value is used to identify data disks within the - VM and therefore must be unique for each data disk attached - to a VM. The value must be between 0 and 63. - format: int32 - type: integer - managedDisk: - description: ManagedDisk specifies the Managed Disk parameters - for the data disk. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk encryption - options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - type: object - nameSuffix: - description: NameSuffix is the suffix to be appended to the - machine name to generate the disk name. Each disk name will - be in format _. - type: string - required: - - diskSizeGB - - nameSuffix - type: object - type: array - enableIPForwarding: - description: EnableIPForwarding enables IP Forwarding in Azure which - is required for some CNI's to send traffic from a pods on one machine - to another. This is required for IpV6 with Calico in combination - with User Defined Routes (set by the Azure Cloud Controller manager). - Default is false for disabled. - type: boolean - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster API. This - relates to an Azure Availability Zone - type: string - identity: - default: None - description: Identity is the type of identity used for the virtual - machine. The type 'SystemAssigned' is an implicitly created identity. - The generated identity will be assigned a Subscription contributor - role. The type 'UserAssigned' is a standalone Azure resource provided - by the user and assigned to the VM - enum: - - None - - SystemAssigned - - UserAssigned - type: string - image: - description: Image is used to provide details of an image to use during - VM creation. If image details are omitted the image will default - the Azure Marketplace "capi" offer, which is based on Ubuntu. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from the Azure - Marketplace - properties: - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization that - created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such as - a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is published - by a third party publisher and a Plan will be generated - for it. - type: boolean - version: - description: Version specifies the version of an image sku. - The allowed formats are Major.Minor.Build or 'latest'. Major, - Minor, and Build are decimal numbers. Specify 'latest' to - use the latest version of an image available at deploy time. - Even if you use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from an Azure - Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared image - gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - offer: - description: Offer specifies the name of a group of related - images created by the publisher. For example, UbuntuServer, - WindowsServer This value will be used to add a `Plan` in - the API request when creating the VM/VMSS resource. This - is needed when the source image from which this SIG image - was built requires the `Plan` to be used. - type: string - publisher: - description: Publisher is the name of the organization that - created the image. This value will be used to add a `Plan` - in the API request when creating the VM/VMSS resource. This - is needed when the source image from which this SIG image - was built requires the `Plan` to be used. - type: string - resourceGroup: - description: ResourceGroup specifies the resource group containing - the shared image gallery - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, such as - a major release of a distribution. For example, 18.04-LTS, - 2019-Datacenter This value will be used to add a `Plan` - in the API request when creating the VM/VMSS resource. This - is needed when the source image from which this SIG image - was built requires the `Plan` to be used. - type: string - subscriptionID: - description: SubscriptionID is the identifier of the subscription - that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the marketplace - image. The allowed formats are Major.Minor.Build or 'latest'. - Major, Minor, and Build are decimal numbers. Specify 'latest' - to use the latest version of an image available at deploy - time. Even if you use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - osDisk: - description: OSDisk specifies the parameters for the operating system - disk of the machine - properties: - cachingType: - description: CachingType specifies the caching requirements. - enum: - - None - - ReadOnly - - ReadWrite - type: string - diffDiskSettings: - description: DiffDiskSettings describe ephemeral disk settings - for the os disk. - properties: - option: - description: Option enables ephemeral OS when set to "Local" - See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks - for full details - enum: - - Local - type: string - required: - - option - type: object - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to the OS - disk. Will have a default of 30GB if not provided - format: int32 - type: integer - managedDisk: - description: ManagedDisk specifies the Managed Disk parameters - for the OS disk. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk encryption - options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - type: object - osType: - type: string - required: - - osType - type: object - providerID: - description: ProviderID is the unique identifier as specified by the - cloud provider. - type: string - roleAssignmentName: - description: RoleAssignmentName is the name of the role assignment - to create for a system assigned identity. It can be any valid GUID. - If not specified, a random GUID will be generated. - type: string - securityProfile: - description: SecurityProfile specifies the Security profile settings - for a virtual machine. - properties: - encryptionAtHost: - description: This field indicates whether Host Encryption should - be enabled or disabled for a virtual machine or virtual machine - scale set. Default is disabled. - type: boolean - type: object - spotVMOptions: - description: SpotVMOptions allows the ability to specify the Machine - should use a Spot VM - properties: - maxPrice: - anyOf: - - type: integer - - type: string - description: MaxPrice defines the maximum price the user is willing - to pay for Spot VM instances - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - sshPublicKey: - type: string - subnetName: - description: SubnetName selects the Subnet where the VM will be placed - type: string - userAssignedIdentities: - description: UserAssignedIdentities is a list of standalone Azure - identities provided by the user The lifecycle of a user-assigned - identity is managed separately from the lifecycle of the AzureMachine. - See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - items: - description: UserAssignedIdentity defines the user-assigned identities - provided by the user to be assigned to Azure resources. - properties: - providerID: - description: 'ProviderID is the identification ID of the user-assigned - Identity, the format of an identity is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''' - type: string - required: - - providerID - type: object - type: array - vmSize: - type: string - required: - - osDisk - - sshPublicKey - - vmSize - type: object - status: - description: AzureMachineStatus defines the observed state of AzureMachine. - properties: - addresses: - description: Addresses contains the Azure instance associated addresses. - items: - description: NodeAddress contains information for the node's address. - properties: - address: - description: The node address. - type: string - type: - description: Node 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 AzureMachine. - 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: "ErrorMessage 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: "ErrorReason 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 - longRunningOperationStates: - description: LongRunningOperationStates saves the states for Azure - long-running operations so they can be continued on the next reconciliation - loop. - items: - description: Future contains the data needed for an Azure long-running - operation to continue across reconcile loops. - properties: - data: - description: Data is the base64 url encoded json Azure AutoRest - Future. - type: string - name: - description: Name is the name of the Azure resource. Together - with the service name, this forms the unique identifier for - the future. - type: string - resourceGroup: - description: ResourceGroup is the Azure resource group for the - resource. - type: string - serviceName: - description: ServiceName is the name of the Azure service. Together - with the name of the resource, this forms the unique identifier - for the future. - type: string - type: - description: Type describes the type of future, such as update, - create, delete, etc. - type: string - required: - - name - - serviceName - - type - type: object - type: array - ready: - description: Ready is true when the provider resource is ready. - type: boolean - vmState: - description: VMState is the provisioning state of the Azure virtual - machine. - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - jsonPath: .status.conditions[?(@.type=='Ready')].status name: Ready diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml index bcf10582ad2..c03e2cecb18 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremachinetemplates.yaml @@ -17,729 +17,6 @@ spec: singular: azuremachinetemplate scope: Namespaced versions: - - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureMachineTemplate is the Schema for the azuremachinetemplates - API. - 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: AzureMachineTemplateSpec defines the desired state of AzureMachineTemplate. - properties: - template: - description: AzureMachineTemplateResource describes the data needed - to create an AzureMachine from a template. - properties: - spec: - description: Spec is the specification of the desired behavior - of the machine. - properties: - acceleratedNetworking: - description: AcceleratedNetworking enables or disables Azure - accelerated networking. If omitted, it will be set based - on whether the requested VMSize supports accelerated networking. - If AcceleratedNetworking is set to true with a VMSize that - does not support it, Azure will return an error. - type: boolean - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to - add to an instance, in addition to the ones added by default - by the Azure provider. If both the AzureCluster and the - AzureMachine specify the same tag name with different values, - the AzureMachine's value takes precedence. - type: object - allocatePublicIP: - description: AllocatePublicIP allows the ability to create - dynamic public ips for machines where this value is true. - type: boolean - availabilityZone: - description: 'Deprecated: use FailureDomain instead' - properties: - enabled: - type: boolean - id: - type: string - type: object - dataDisks: - description: DataDisk specifies the parameters that are used - to add one or more data disks to the machine - items: - description: DataDisk specifies the parameters that are - used to add one or more data disks to the machine. - properties: - cachingType: - type: string - diskSizeGB: - description: DiskSizeGB is the size in GB to assign - to the data disk. - format: int32 - type: integer - lun: - description: Lun Specifies the logical unit number of - the data disk. This value is used to identify data - disks within the VM and therefore must be unique for - each data disk attached to a VM. The value must be - between 0 and 63. - format: int32 - type: integer - managedDisk: - description: ManagedDisk defines the managed disk options - for a VM. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines - disk encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - required: - - storageAccountType - type: object - nameSuffix: - description: NameSuffix is the suffix to be appended - to the machine name to generate the disk name. Each - disk name will be in format _. - type: string - required: - - diskSizeGB - - nameSuffix - type: object - type: array - enableIPForwarding: - description: EnableIPForwarding enables IP Forwarding in Azure - which is required for some CNI's to send traffic from a - pods on one machine to another. This is required for IpV6 - with Calico in combination with User Defined Routes (set - by the Azure Cloud Controller manager). Default is false - for disabled. - type: boolean - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster - API. This relates to an Azure Availability Zone - type: string - identity: - default: None - description: Identity is the type of identity used for the - virtual machine. The type 'SystemAssigned' is an implicitly - created identity. The generated identity will be assigned - a Subscription contributor role. The type 'UserAssigned' - is a standalone Azure resource provided by the user and - assigned to the VM - enum: - - None - - SystemAssigned - - UserAssigned - type: string - image: - description: Image is used to provide details of an image - to use during VM creation. If image details are omitted - the image will default the Azure Marketplace "capi" offer, - which is based on Ubuntu. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from - the Azure Marketplace - properties: - offer: - description: Offer specifies the name of a group of - related images created by the publisher. For example, - UbuntuServer, WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization - that created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, - such as a major release of a distribution. For example, - 18.04-LTS, 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is - published by a third party publisher and a Plan - will be generated for it. - type: boolean - version: - description: Version specifies the version of an image - sku. The allowed formats are Major.Minor.Build or - 'latest'. Major, Minor, and Build are decimal numbers. - Specify 'latest' to use the latest version of an - image available at deploy time. Even if you use - 'latest', the VM image will not automatically update - after deploy time even if a new version becomes - available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from - an Azure Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared - image gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - resourceGroup: - description: ResourceGroup specifies the resource - group containing the shared image gallery - minLength: 1 - type: string - subscriptionID: - description: SubscriptionID is the identifier of the - subscription that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the - marketplace image. The allowed formats are Major.Minor.Build - or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version - of an image available at deploy time. Even if you - use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes - available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - location: - description: 'Deprecated: to support old clients, will be - removed in v1alpha4/v1beta1' - type: string - osDisk: - description: OSDisk specifies the parameters for the operating - system disk of the machine - properties: - cachingType: - type: string - diffDiskSettings: - description: DiffDiskSettings describe ephemeral disk - settings for the os disk. - properties: - option: - description: Option enables ephemeral OS when set - to "Local" See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks - for full details - enum: - - Local - type: string - required: - - option - type: object - diskSizeGB: - format: int32 - type: integer - managedDisk: - description: ManagedDisk defines the managed disk options - for a VM. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk - encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - required: - - storageAccountType - type: object - osType: - type: string - required: - - diskSizeGB - - managedDisk - - osType - type: object - providerID: - description: ProviderID is the unique identifier as specified - by the cloud provider. - type: string - roleAssignmentName: - description: RoleAssignmentName is the name of the role assignment - to create for a system assigned identity. It can be any - valid GUID. If not specified, a random GUID will be generated. - type: string - securityProfile: - description: SecurityProfile specifies the Security profile - settings for a virtual machine. - properties: - encryptionAtHost: - description: This field indicates whether Host Encryption - should be enabled or disabled for a virtual machine - or virtual machine scale set. Default is disabled. - type: boolean - type: object - spotVMOptions: - description: SpotVMOptions allows the ability to specify the - Machine should use a Spot VM. - properties: - maxPrice: - anyOf: - - type: integer - - type: string - description: MaxPrice defines the maximum price the user - is willing to pay for Spot VM instances - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - sshPublicKey: - type: string - userAssignedIdentities: - description: UserAssignedIdentities is a list of standalone - Azure identities provided by the user The lifecycle of a - user-assigned identity is managed separately from the lifecycle - of the AzureMachine. See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - items: - description: UserAssignedIdentity defines the user-assigned - identities provided by the user to be assigned to Azure - resources. - properties: - providerID: - description: 'ProviderID is the identification ID of - the user-assigned Identity, the format of an identity - is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''' - type: string - required: - - providerID - type: object - type: array - vmSize: - type: string - required: - - location - - osDisk - - sshPublicKey - - vmSize - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: false - - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureMachineTemplate is the Schema for the azuremachinetemplates - API. - 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: AzureMachineTemplateSpec defines the desired state of AzureMachineTemplate. - properties: - template: - description: AzureMachineTemplateResource describes the data needed - to create an AzureMachine from a template. - properties: - spec: - description: Spec is the specification of the desired behavior - of the machine. - properties: - acceleratedNetworking: - description: AcceleratedNetworking enables or disables Azure - accelerated networking. If omitted, it will be set based - on whether the requested VMSize supports accelerated networking. - If AcceleratedNetworking is set to true with a VMSize that - does not support it, Azure will return an error. - type: boolean - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to - add to an instance, in addition to the ones added by default - by the Azure provider. If both the AzureCluster and the - AzureMachine specify the same tag name with different values, - the AzureMachine's value takes precedence. - type: object - allocatePublicIP: - description: AllocatePublicIP allows the ability to create - dynamic public ips for machines where this value is true. - type: boolean - dataDisks: - description: DataDisk specifies the parameters that are used - to add one or more data disks to the machine - items: - description: DataDisk specifies the parameters that are - used to add one or more data disks to the machine. - properties: - cachingType: - description: CachingType specifies the caching requirements. - enum: - - None - - ReadOnly - - ReadWrite - type: string - diskSizeGB: - description: DiskSizeGB is the size in GB to assign - to the data disk. - format: int32 - type: integer - lun: - description: Lun Specifies the logical unit number of - the data disk. This value is used to identify data - disks within the VM and therefore must be unique for - each data disk attached to a VM. The value must be - between 0 and 63. - format: int32 - type: integer - managedDisk: - description: ManagedDisk specifies the Managed Disk - parameters for the data disk. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines - disk encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - type: object - nameSuffix: - description: NameSuffix is the suffix to be appended - to the machine name to generate the disk name. Each - disk name will be in format _. - type: string - required: - - diskSizeGB - - nameSuffix - type: object - type: array - enableIPForwarding: - description: EnableIPForwarding enables IP Forwarding in Azure - which is required for some CNI's to send traffic from a - pods on one machine to another. This is required for IpV6 - with Calico in combination with User Defined Routes (set - by the Azure Cloud Controller manager). Default is false - for disabled. - type: boolean - failureDomain: - description: FailureDomain is the failure domain unique identifier - this Machine should be attached to, as defined in Cluster - API. This relates to an Azure Availability Zone - type: string - identity: - default: None - description: Identity is the type of identity used for the - virtual machine. The type 'SystemAssigned' is an implicitly - created identity. The generated identity will be assigned - a Subscription contributor role. The type 'UserAssigned' - is a standalone Azure resource provided by the user and - assigned to the VM - enum: - - None - - SystemAssigned - - UserAssigned - type: string - image: - description: Image is used to provide details of an image - to use during VM creation. If image details are omitted - the image will default the Azure Marketplace "capi" offer, - which is based on Ubuntu. - properties: - id: - description: ID specifies an image to use by ID - type: string - marketplace: - description: Marketplace specifies an image to use from - the Azure Marketplace - properties: - offer: - description: Offer specifies the name of a group of - related images created by the publisher. For example, - UbuntuServer, WindowsServer - minLength: 1 - type: string - publisher: - description: Publisher is the name of the organization - that created the image - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, - such as a major release of a distribution. For example, - 18.04-LTS, 2019-Datacenter - minLength: 1 - type: string - thirdPartyImage: - default: false - description: ThirdPartyImage indicates the image is - published by a third party publisher and a Plan - will be generated for it. - type: boolean - version: - description: Version specifies the version of an image - sku. The allowed formats are Major.Minor.Build or - 'latest'. Major, Minor, and Build are decimal numbers. - Specify 'latest' to use the latest version of an - image available at deploy time. Even if you use - 'latest', the VM image will not automatically update - after deploy time even if a new version becomes - available. - minLength: 1 - type: string - required: - - offer - - publisher - - sku - - version - type: object - sharedGallery: - description: SharedGallery specifies an image to use from - an Azure Shared Image Gallery - properties: - gallery: - description: Gallery specifies the name of the shared - image gallery that contains the image - minLength: 1 - type: string - name: - description: Name is the name of the image - minLength: 1 - type: string - offer: - description: Offer specifies the name of a group of - related images created by the publisher. For example, - UbuntuServer, WindowsServer This value will be used - to add a `Plan` in the API request when creating - the VM/VMSS resource. This is needed when the source - image from which this SIG image was built requires - the `Plan` to be used. - type: string - publisher: - description: Publisher is the name of the organization - that created the image. This value will be used - to add a `Plan` in the API request when creating - the VM/VMSS resource. This is needed when the source - image from which this SIG image was built requires - the `Plan` to be used. - type: string - resourceGroup: - description: ResourceGroup specifies the resource - group containing the shared image gallery - minLength: 1 - type: string - sku: - description: SKU specifies an instance of an offer, - such as a major release of a distribution. For example, - 18.04-LTS, 2019-Datacenter This value will be used - to add a `Plan` in the API request when creating - the VM/VMSS resource. This is needed when the source - image from which this SIG image was built requires - the `Plan` to be used. - type: string - subscriptionID: - description: SubscriptionID is the identifier of the - subscription that contains the shared image gallery - minLength: 1 - type: string - version: - description: Version specifies the version of the - marketplace image. The allowed formats are Major.Minor.Build - or 'latest'. Major, Minor, and Build are decimal - numbers. Specify 'latest' to use the latest version - of an image available at deploy time. Even if you - use 'latest', the VM image will not automatically - update after deploy time even if a new version becomes - available. - minLength: 1 - type: string - required: - - gallery - - name - - resourceGroup - - subscriptionID - - version - type: object - type: object - osDisk: - description: OSDisk specifies the parameters for the operating - system disk of the machine - properties: - cachingType: - description: CachingType specifies the caching requirements. - enum: - - None - - ReadOnly - - ReadWrite - type: string - diffDiskSettings: - description: DiffDiskSettings describe ephemeral disk - settings for the os disk. - properties: - option: - description: Option enables ephemeral OS when set - to "Local" See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks - for full details - enum: - - Local - type: string - required: - - option - type: object - diskSizeGB: - description: DiskSizeGB is the size in GB to assign to - the OS disk. Will have a default of 30GB if not provided - format: int32 - type: integer - managedDisk: - description: ManagedDisk specifies the Managed Disk parameters - for the OS disk. - properties: - diskEncryptionSet: - description: DiskEncryptionSetParameters defines disk - encryption options. - properties: - id: - description: ID defines resourceID for diskEncryptionSet - resource. It must be in the same subscription - type: string - type: object - storageAccountType: - type: string - type: object - osType: - type: string - required: - - osType - type: object - providerID: - description: ProviderID is the unique identifier as specified - by the cloud provider. - type: string - roleAssignmentName: - description: RoleAssignmentName is the name of the role assignment - to create for a system assigned identity. It can be any - valid GUID. If not specified, a random GUID will be generated. - type: string - securityProfile: - description: SecurityProfile specifies the Security profile - settings for a virtual machine. - properties: - encryptionAtHost: - description: This field indicates whether Host Encryption - should be enabled or disabled for a virtual machine - or virtual machine scale set. Default is disabled. - type: boolean - type: object - spotVMOptions: - description: SpotVMOptions allows the ability to specify the - Machine should use a Spot VM - properties: - maxPrice: - anyOf: - - type: integer - - type: string - description: MaxPrice defines the maximum price the user - is willing to pay for Spot VM instances - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - sshPublicKey: - type: string - subnetName: - description: SubnetName selects the Subnet where the VM will - be placed - type: string - userAssignedIdentities: - description: UserAssignedIdentities is a list of standalone - Azure identities provided by the user The lifecycle of a - user-assigned identity is managed separately from the lifecycle - of the AzureMachine. See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - items: - description: UserAssignedIdentity defines the user-assigned - identities provided by the user to be assigned to Azure - resources. - properties: - providerID: - description: 'ProviderID is the identification ID of - the user-assigned Identity, the format of an identity - is: ''azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''' - type: string - required: - - providerID - type: object - type: array - vmSize: - type: string - required: - - osDisk - - sshPublicKey - - vmSize - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: false - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml index 1d0f4b3a746..19c67f74c1c 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedclusters.yaml @@ -19,104 +19,6 @@ spec: singular: azuremanagedcluster scope: Namespaced versions: - - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureManagedCluster is the Schema for the azuremanagedclusters - API. - 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: AzureManagedClusterSpec defines the desired state of AzureManagedCluster. - 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 - type: object - status: - description: AzureManagedClusterStatus defines the observed state of AzureManagedCluster. - properties: - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureManagedCluster is the Schema for the azuremanagedclusters - API. - 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: AzureManagedClusterSpec defines the desired state of AzureManagedCluster. - 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 - type: object - status: - description: AzureManagedClusterStatus defines the observed state of AzureManagedCluster. - properties: - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml index 6da6f73490b..adaf16d646b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedcontrolplanes.yaml @@ -19,472 +19,6 @@ spec: singular: azuremanagedcontrolplane scope: Namespaced versions: - - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureManagedControlPlane is the Schema for the azuremanagedcontrolplanes - API. - 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: AzureManagedControlPlaneSpec defines the desired state of - AzureManagedControlPlane. - properties: - aadProfile: - description: AadProfile is Azure Active Directory configuration to - integrate with AKS for aad authentication. - properties: - adminGroupObjectIDs: - description: AdminGroupObjectIDs - AAD group object IDs that will - have admin role of the cluster. - items: - type: string - type: array - managed: - description: Managed - Whether to enable managed AAD. - type: boolean - required: - - adminGroupObjectIDs - - managed - type: object - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to Azure - resources managed by the Azure provider, in addition to the ones - added by default. - 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 - dnsServiceIP: - description: DNSServiceIP is an IP address assigned to the Kubernetes - DNS service. It must be within the Kubernetes service address range - specified in serviceCidr. - type: string - loadBalancerSKU: - description: LoadBalancerSKU is the SKU of the loadBalancer to be - provisioned. - enum: - - Basic - - Standard - type: string - location: - description: 'Location is a string matching one of the canonical Azure - region names. Examples: "westus2", "eastus".' - type: string - networkPlugin: - description: NetworkPlugin used for building Kubernetes network. - enum: - - azure - - kubenet - type: string - networkPolicy: - description: NetworkPolicy used for building Kubernetes network. - enum: - - azure - - calico - type: string - nodeResourceGroupName: - description: NodeResourceGroupName is the name of the resource group - containing cluster IaaS resources. Will be populated to default - in webhook. - type: string - resourceGroupName: - description: ResourceGroupName is the name of the Azure resource group - for this AKS Cluster. - type: string - sshPublicKey: - description: SSHPublicKey is a string literal containing an ssh public - key base64 encoded. - type: string - subscriptionID: - description: SubscriotionID is the GUID of the Azure subscription - to hold this cluster. - type: string - version: - description: Version defines the desired Kubernetes version. - minLength: 2 - type: string - virtualNetwork: - description: VirtualNetwork describes the vnet for the AKS cluster. - Will be created if it does not exist. - properties: - cidrBlock: - type: string - name: - type: string - subnet: - description: ManagedControlPlaneSubnet describes a subnet for - an AKS cluster. - properties: - cidrBlock: - type: string - name: - type: string - required: - - cidrBlock - - name - type: object - required: - - cidrBlock - - name - type: object - required: - - location - - nodeResourceGroupName - - resourceGroupName - - sshPublicKey - - version - type: object - status: - description: AzureManagedControlPlaneStatus defines the observed state - of AzureManagedControlPlane. - properties: - initialized: - description: Initialized is true when the the control plane is available - for initial contact. This may occur before the control plane is - fully ready. In the AzureManagedControlPlane implementation, these - are identical. - type: boolean - ready: - description: Ready is true when the provider resource is ready. - type: boolean - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureManagedControlPlane is the Schema for the azuremanagedcontrolplanes - API. - 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: AzureManagedControlPlaneSpec defines the desired state of - AzureManagedControlPlane. - properties: - aadProfile: - description: AadProfile is Azure Active Directory configuration to - integrate with AKS for aad authentication. - properties: - adminGroupObjectIDs: - description: AdminGroupObjectIDs - AAD group object IDs that will - have admin role of the cluster. - items: - type: string - type: array - managed: - description: Managed - Whether to enable managed AAD. - type: boolean - required: - - adminGroupObjectIDs - - managed - type: object - additionalTags: - additionalProperties: - type: string - description: AdditionalTags is an optional set of tags to add to Azure - resources managed by the Azure provider, in addition to the ones - added by default. - type: object - apiServerAccessProfile: - description: APIServerAccessProfile is the access profile for AKS - API server. - properties: - authorizedIPRanges: - description: AuthorizedIPRanges - Authorized IP Ranges to kubernetes - API server. - items: - type: string - type: array - enablePrivateCluster: - description: EnablePrivateCluster - Whether to create the cluster - as a private cluster or not. - type: boolean - enablePrivateClusterPublicFQDN: - description: EnablePrivateClusterPublicFQDN - Whether to create - additional public FQDN for private cluster or not. - type: boolean - privateDNSZone: - description: PrivateDNSZone - Private dns zone mode for private - cluster. - enum: - - System - - None - type: string - 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 - dnsServiceIP: - description: DNSServiceIP is an IP address assigned to the Kubernetes - DNS service. It must be within the Kubernetes service address range - specified in serviceCidr. - type: string - identityRef: - description: IdentityRef is a reference to a AzureClusterIdentity - to be used when reconciling this cluster - 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 - loadBalancerProfile: - description: LoadBalancerProfile is the profile of the cluster load - balancer. - properties: - allocatedOutboundPorts: - description: AllocatedOutboundPorts - Desired number of allocated - SNAT ports per VM. Allowed values must be in the range of 0 - to 64000 (inclusive). The default value is 0 which results in - Azure dynamically allocating ports. - format: int32 - type: integer - idleTimeoutInMinutes: - description: IdleTimeoutInMinutes - Desired outbound flow idle - timeout in minutes. Allowed values must be in the range of 4 - to 120 (inclusive). The default value is 30 minutes. - format: int32 - type: integer - managedOutboundIPs: - description: ManagedOutboundIPs - Desired managed outbound IPs - for the cluster load balancer. - format: int32 - type: integer - outboundIPPrefixes: - description: OutboundIPPrefixes - Desired outbound IP Prefix resources - for the cluster load balancer. - items: - type: string - type: array - outboundIPs: - description: OutboundIPs - Desired outbound IP resources for the - cluster load balancer. - items: - type: string - type: array - type: object - loadBalancerSKU: - description: LoadBalancerSKU is the SKU of the loadBalancer to be - provisioned. - enum: - - Basic - - Standard - type: string - location: - description: 'Location is a string matching one of the canonical Azure - region names. Examples: "westus2", "eastus".' - type: string - networkPlugin: - description: NetworkPlugin used for building Kubernetes network. - enum: - - azure - - kubenet - type: string - networkPolicy: - description: NetworkPolicy used for building Kubernetes network. - enum: - - azure - - calico - type: string - nodeResourceGroupName: - description: NodeResourceGroupName is the name of the resource group - containing cluster IaaS resources. Will be populated to default - in webhook. - type: string - resourceGroupName: - description: ResourceGroupName is the name of the Azure resource group - for this AKS Cluster. - type: string - sku: - description: SKU is the AKSSku of the AKS to be provisioned. - properties: - tier: - description: Tier - Tier of a managed cluster SKU. - enum: - - Free - - Paid - type: string - required: - - tier - type: object - sshPublicKey: - description: SSHPublicKey is a string literal containing an ssh public - key base64 encoded. - type: string - subscriptionID: - description: SubscriptionID is the GUID of the Azure subscription - to hold this cluster. - type: string - version: - description: Version defines the desired Kubernetes version. - minLength: 2 - type: string - virtualNetwork: - description: VirtualNetwork describes the vnet for the AKS cluster. - Will be created if it does not exist. - properties: - cidrBlock: - type: string - name: - type: string - subnet: - description: ManagedControlPlaneSubnet describes a subnet for - an AKS cluster. - properties: - cidrBlock: - type: string - name: - type: string - required: - - cidrBlock - - name - type: object - required: - - cidrBlock - - name - type: object - required: - - location - - resourceGroupName - - sshPublicKey - - version - type: object - status: - description: AzureManagedControlPlaneStatus defines the observed state - of AzureManagedControlPlane. - properties: - initialized: - description: Initialized is true when the the control plane is available - for initial contact. This may occur before the control plane is - fully ready. In the AzureManagedControlPlane implementation, these - are identical. - type: boolean - longRunningOperationStates: - description: LongRunningOperationStates saves the states for Azure - long-running operations so they can be continued on the next reconciliation - loop. - items: - description: Future contains the data needed for an Azure long-running - operation to continue across reconcile loops. - properties: - data: - description: Data is the base64 url encoded json Azure AutoRest - Future. - type: string - name: - description: Name is the name of the Azure resource. Together - with the service name, this forms the unique identifier for - the future. - type: string - resourceGroup: - description: ResourceGroup is the Azure resource group for the - resource. - type: string - serviceName: - description: ServiceName is the name of the Azure service. Together - with the name of the resource, this forms the unique identifier - for the future. - type: string - type: - description: Type describes the type of future, such as update, - create, delete, etc. - type: string - required: - - name - - serviceName - - type - 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: {} - name: v1beta1 schema: openAPIV3Schema: diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml index 4e11fd32699..c92ee8d68e4 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_azuremanagedmachinepools.yaml @@ -19,160 +19,6 @@ spec: singular: azuremanagedmachinepool scope: Namespaced versions: - - name: v1alpha3 - schema: - openAPIV3Schema: - description: AzureManagedMachinePool is the Schema for the azuremanagedmachinepools - API. - 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: AzureManagedMachinePoolSpec defines the desired state of - AzureManagedMachinePool. - properties: - mode: - description: 'Mode - represents mode of an agent pool. Possible values - include: System, User.' - enum: - - System - - User - type: string - osDiskSizeGB: - description: OSDiskSizeGB is the disk size for every machine in this - agent pool. If you specify 0, it will apply the default osDisk size - according to the vmSize specified. - format: int32 - type: integer - providerIDList: - description: ProviderIDList is the unique identifier as specified - by the cloud provider. - items: - type: string - type: array - sku: - description: SKU is the size of the VMs in the node pool. - type: string - required: - - mode - - sku - type: object - status: - description: AzureManagedMachinePoolStatus defines the observed state - of AzureManagedMachinePool. - properties: - errorMessage: - description: 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 - errorReason: - description: 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 - ready: - description: Ready is true when the provider resource is ready. - type: boolean - replicas: - description: Replicas is the most recently observed number of replicas. - format: int32 - type: integer - type: object - type: object - served: true - storage: false - subresources: - status: {} - - name: v1alpha4 - schema: - openAPIV3Schema: - description: AzureManagedMachinePool is the Schema for the azuremanagedmachinepools - API. - 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: AzureManagedMachinePoolSpec defines the desired state of - AzureManagedMachinePool. - properties: - mode: - description: 'Mode - represents mode of an agent pool. Possible values - include: System, User.' - enum: - - System - - User - type: string - name: - description: Name - name of the agent pool. If not specified, CAPZ - uses the name of the CR as the agent pool name. - type: string - osDiskSizeGB: - description: OSDiskSizeGB is the disk size for every machine in this - agent pool. If you specify 0, it will apply the default osDisk size - according to the vmSize specified. - format: int32 - type: integer - providerIDList: - description: ProviderIDList is the unique identifier as specified - by the cloud provider. - items: - type: string - type: array - sku: - description: SKU is the size of the VMs in the node pool. - type: string - required: - - mode - - sku - type: object - status: - description: AzureManagedMachinePoolStatus defines the observed state - of AzureManagedMachinePool. - properties: - errorMessage: - description: 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 - errorReason: - description: 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 - ready: - description: Ready is true when the provider resource is ready. - type: boolean - replicas: - description: Replicas is the most recently observed number of replicas. - format: int32 - type: integer - type: object - type: object - served: true - storage: false - subresources: - status: {} - additionalPrinterColumns: - jsonPath: .spec.mode name: Mode diff --git a/docs/book/src/topics/failure-domains.md b/docs/book/src/topics/failure-domains.md index 1b5bb6e1981..3eec227409f 100644 --- a/docs/book/src/topics/failure-domains.md +++ b/docs/book/src/topics/failure-domains.md @@ -134,7 +134,7 @@ You can use an `AzureMachinePool` object to deploy a Virtual Machine Scale Set w Set the **FailureDomains** field to the list of availability zones that you want to use. Be aware that not all regions have the same availability zones. You can use `az vm list-skus -l --zone -o table` to list all the available zones per vm size in that location/region. ```yaml -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1beta1 kind: MachinePool metadata: labels: @@ -152,16 +152,16 @@ spec: clusterName: my-cluster bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-vmss-0 infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachinePool name: ${CLUSTER_NAME}-vmss-0 version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachinePool metadata: labels: @@ -191,7 +191,7 @@ The availability sets created are as follows: Consider the following cluster configuration: ```yaml -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster metadata: labels: @@ -204,15 +204,15 @@ spec: cidrBlocks: - 192.168.0.0/16 controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane name: ${CLUSTER_NAME}-control-plane infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureCluster name: ${CLUSTER_NAME} --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-0 @@ -226,17 +226,17 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-md-0 clusterName: ${CLUSTER_NAME} infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate name: ${CLUSTER_NAME}-md-0 version: ${KUBERNETES_VERSION} --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-1 @@ -250,17 +250,17 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-md-1 clusterName: ${CLUSTER_NAME} infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate name: ${CLUSTER_NAME}-md-1 version: ${KUBERNETES_VERSION} --- -apiVersion: cluster.x-k8s.io/v1alpha3 +apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-2 @@ -274,12 +274,12 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-md-2 clusterName: ${CLUSTER_NAME} infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate name: ${CLUSTER_NAME}-md-2 version: ${KUBERNETES_VERSION} diff --git a/docs/book/src/topics/managedcluster.md b/docs/book/src/topics/managedcluster.md index 53fc86f7970..877eb14976b 100644 --- a/docs/book/src/topics/managedcluster.md +++ b/docs/book/src/topics/managedcluster.md @@ -595,7 +595,7 @@ In Kubernetes, the API server receives requests to perform actions in the cluste For more documentation about authorized IP address ranges refer [AKS Doc](https://docs.microsoft.com/en-us/azure/aks/api-server-authorized-ip-ranges) and [AKS REST API Doc](https://docs.microsoft.com/en-us/rest/api/aks/managed-clusters/create-or-update) ```yaml -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureManagedControlPlane metadata: name: my-cluster-control-plane diff --git a/docs/book/src/topics/ssh-access.md b/docs/book/src/topics/ssh-access.md index e7e56fb932a..87d326dbe18 100644 --- a/docs/book/src/topics/ssh-access.md +++ b/docs/book/src/topics/ssh-access.md @@ -124,7 +124,7 @@ In order to add an SSH authorized key for user `username` and provide `sudo` acc as in the following example: ```yaml -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane ... spec: @@ -146,7 +146,7 @@ spec: Similarly, you can achieve the same result for `Machine Deployments` by customizing the `KubeadmConfigTemplate` CR: ```yaml -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: name: test1-md-0 diff --git a/docs/book/src/topics/windows.md b/docs/book/src/topics/windows.md index 527ebe684b3..73f4f27e88f 100644 --- a/docs/book/src/topics/windows.md +++ b/docs/book/src/topics/windows.md @@ -107,7 +107,7 @@ It's required to specify the SSH key using the `users` property in the Kubeadm c For example like this: ```yaml -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: name: test1-md-0 diff --git a/exp/PROJECT b/exp/PROJECT index 2345197f0dc..74e3b27b1d5 100644 --- a/exp/PROJECT +++ b/exp/PROJECT @@ -4,7 +4,4 @@ version: "2" resources: - group: infrastructure kind: AzureMachinePool - version: v1alpha3 -- group: infrastructure - kind: AzureMachinePool - version: v1alpha4 + version: v1beta1 diff --git a/exp/api/v1alpha3/azuremachinepool_conversion.go b/exp/api/v1alpha3/azuremachinepool_conversion.go deleted file mode 100644 index 32550eebad1..00000000000 --- a/exp/api/v1alpha3/azuremachinepool_conversion.go +++ /dev/null @@ -1,186 +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 ( - unsafe "unsafe" - - "k8s.io/apimachinery/pkg/api/resource" - convert "k8s.io/apimachinery/pkg/conversion" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachinePool to the Hub version (v1beta1). -func (src *AzureMachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1exp.AzureMachinePool) - if err := Convert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1exp.AzureMachinePool{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - // Handle special case for conversion of ManagedDisk to pointer. - if restored.Spec.Template.OSDisk.ManagedDisk == nil && dst.Spec.Template.OSDisk.ManagedDisk != nil { - if *dst.Spec.Template.OSDisk.ManagedDisk == (infrav1.ManagedDiskParameters{}) { - // restore nil value if nothing has changed since conversion - dst.Spec.Template.OSDisk.ManagedDisk = nil - } - } - - //nolint:staticcheck // SubnetName is now deprecated, but the v1beta1 defaulting webhook will migrate it to the networkInterfaces field - dst.Spec.Template.SubnetName = restored.Spec.Template.SubnetName - - dst.Spec.Strategy.Type = restored.Spec.Strategy.Type - if restored.Spec.Strategy.RollingUpdate != nil { - if dst.Spec.Strategy.RollingUpdate == nil { - dst.Spec.Strategy.RollingUpdate = &infrav1exp.MachineRollingUpdateDeployment{} - } - - dst.Spec.Strategy.RollingUpdate.DeletePolicy = restored.Spec.Strategy.RollingUpdate.DeletePolicy - } - - if restored.Spec.NodeDrainTimeout != nil { - dst.Spec.NodeDrainTimeout = restored.Spec.NodeDrainTimeout - } - - if restored.Status.Image != nil { - dst.Status.Image = restored.Status.Image - } - - if restored.Spec.Template.Image != nil && restored.Spec.Template.Image.SharedGallery != nil { - dst.Spec.Template.Image.SharedGallery.Offer = restored.Spec.Template.Image.SharedGallery.Offer - dst.Spec.Template.Image.SharedGallery.Publisher = restored.Spec.Template.Image.SharedGallery.Publisher - dst.Spec.Template.Image.SharedGallery.SKU = restored.Spec.Template.Image.SharedGallery.SKU - } - - if dst.Spec.Template.Image != nil && restored.Spec.Template.Image.ComputeGallery != nil { - dst.Spec.Template.Image.ComputeGallery = restored.Spec.Template.Image.ComputeGallery - } - - if restored.Spec.Template.NetworkInterfaces != nil { - dst.Spec.Template.NetworkInterfaces = restored.Spec.Template.NetworkInterfaces - } - - if len(dst.Annotations) == 0 { - dst.Annotations = nil - } - - for i, r := range restored.Status.LongRunningOperationStates { - if r.Name == dst.Status.LongRunningOperationStates[i].Name { - dst.Status.LongRunningOperationStates[i].ServiceName = r.ServiceName - } - } - - if len(restored.Spec.Template.VMExtensions) > 0 { - dst.Spec.Template.VMExtensions = restored.Spec.Template.VMExtensions - } - - if restored.Spec.Template.SpotVMOptions != nil && restored.Spec.Template.SpotVMOptions.EvictionPolicy != nil { - dst.Spec.Template.SpotVMOptions.EvictionPolicy = restored.Spec.Template.SpotVMOptions.EvictionPolicy - } - - if restored.Spec.Template.Diagnostics != nil { - dst.Spec.Template.Diagnostics = restored.Spec.Template.Diagnostics - } - - // Restore orchestration mode - dst.Spec.OrchestrationMode = restored.Spec.OrchestrationMode - - if restored.Spec.SystemAssignedIdentityRole != nil { - dst.Spec.SystemAssignedIdentityRole = restored.Spec.SystemAssignedIdentityRole - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1exp.AzureMachinePool) - if err := Convert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate converts an Azure Machine Pool Machine Template from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate(in *infrav1exp.AzureMachinePoolMachineTemplate, out *AzureMachinePoolMachineTemplate, s convert.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate(in, out, s) -} - -// Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec converts an Azure Machine Pool Spec from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec(in *infrav1exp.AzureMachinePoolSpec, out *AzureMachinePoolSpec, s convert.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec(in, out, s) -} - -// Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus converts an Azure Machine Pool Status from v1beta1 to v1alpha3. -func Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus(in *infrav1exp.AzureMachinePoolStatus, out *AzureMachinePoolStatus, s convert.Scope) error { - if len(in.LongRunningOperationStates) > 0 { - if out.LongRunningOperationState == nil { - out.LongRunningOperationState = &infrav1alpha3.Future{} - } - if err := infrav1alpha3.Convert_v1beta1_Future_To_v1alpha3_Future(&in.LongRunningOperationStates[0], out.LongRunningOperationState, s); err != nil { - return err - } - } - return autoConvert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus(in, out, s) -} - -// Convert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus converts an Azure Machine Pool Status from v1alpha3 to v1beta1. -func Convert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(in *AzureMachinePoolStatus, out *infrav1exp.AzureMachinePoolStatus, s convert.Scope) error { - if in.LongRunningOperationState != nil { - f := infrav1.Future{} - if err := infrav1alpha3.Convert_v1alpha3_Future_To_v1beta1_Future(in.LongRunningOperationState, &f, s); err != nil { - return err - } - out.LongRunningOperationStates = []infrav1.Future{f} - } - return autoConvert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(in, out, s) -} - -// Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions converts a SpotVMOptions from v1beta1 to v1alpha3. -func Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(in *infrav1.SpotVMOptions, out *infrav1alpha3.SpotVMOptions, s convert.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - return nil -} - -// Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions converts a SpotVMOptions from v1alpha3 to v1beta1. -func Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(in *infrav1alpha3.SpotVMOptions, out *infrav1.SpotVMOptions, s convert.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - return nil -} - -// ConvertTo converts this AzureMachinePoolList to the Hub version (v1beta1). -func (src *AzureMachinePoolList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1exp.AzureMachinePoolList) - return Convert_v1alpha3_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachinePoolList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1exp.AzureMachinePoolList) - return Convert_v1beta1_AzureMachinePoolList_To_v1alpha3_AzureMachinePoolList(src, dst, nil) -} diff --git a/exp/api/v1alpha3/azuremachinepool_types.go b/exp/api/v1alpha3/azuremachinepool_types.go deleted file mode 100644 index a4f45e2e857..00000000000 --- a/exp/api/v1alpha3/azuremachinepool_types.go +++ /dev/null @@ -1,255 +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 ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -type ( - // AzureMachinePoolMachineTemplate defines the template for an AzureMachinePool machine. - AzureMachinePoolMachineTemplate struct { - // VMSize is the size of the Virtual Machine to build. - // See https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#virtualmachinesizetypes - VMSize string `json:"vmSize"` - - // Image is used to provide details of an image to use during Virtual Machine creation. - // If image details are omitted the image will default the Azure Marketplace "capi" offer, - // which is based on Ubuntu. - // +kubebuilder:validation:nullable - // +optional - Image *infrav1alpha3.Image `json:"image,omitempty"` - - // OSDisk contains the operating system disk information for a Virtual Machine - OSDisk infrav1alpha3.OSDisk `json:"osDisk"` - - // DataDisks specifies the list of data disks to be created for a Virtual Machine - // +optional - DataDisks []infrav1alpha3.DataDisk `json:"dataDisks,omitempty"` - - // SSHPublicKey is the SSH public key string base64 encoded to add to a Virtual Machine - SSHPublicKey string `json:"sshPublicKey"` - - // AcceleratedNetworking enables or disables Azure accelerated networking. If omitted, it will be set based on - // whether the requested VMSize supports accelerated networking. - // If AcceleratedNetworking is set to true with a VMSize that does not support it, Azure will return an error. - // +optional - AcceleratedNetworking *bool `json:"acceleratedNetworking,omitempty"` - - // TerminateNotificationTimeout enables or disables VMSS scheduled events termination notification with specified timeout - // allowed values are between 5 and 15 (mins) - // +optional - TerminateNotificationTimeout *int `json:"terminateNotificationTimeout,omitempty"` - - // SecurityProfile specifies the Security profile settings for a virtual machine. - // +optional - SecurityProfile *infrav1alpha3.SecurityProfile `json:"securityProfile,omitempty"` - - // SpotVMOptions allows the ability to specify the Machine should use a Spot VM - // +optional - SpotVMOptions *infrav1alpha3.SpotVMOptions `json:"spotVMOptions,omitempty"` - } - - // AzureMachinePoolSpec defines the desired state of AzureMachinePool. - AzureMachinePoolSpec struct { - // Location is the Azure region location e.g. westus2 - Location string `json:"location"` - - // Template contains the details used to build a replica virtual machine within the Machine Pool. - Template AzureMachinePoolMachineTemplate `json:"template"` - - // AdditionalTags is an optional set of tags to add to an instance, in addition to the ones added by default by the - // Azure provider. If both the AzureCluster and the AzureMachine specify the same tag name with different values, the - // AzureMachine's value takes precedence. - // +optional - AdditionalTags infrav1alpha3.Tags `json:"additionalTags,omitempty"` - - // ProviderID is the identification ID of the Virtual Machine Scale Set - // +optional - ProviderID string `json:"providerID,omitempty"` - - // ProviderIDList are the identification IDs of machine instances provided by the provider. - // This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. - // +optional - ProviderIDList []string `json:"providerIDList,omitempty"` - - // Identity is the type of identity used for the Virtual Machine Scale Set. - // The type 'SystemAssigned' is an implicitly created identity. - // The generated identity will be assigned a Subscription contributor role. - // The type 'UserAssigned' is a standalone Azure resource provided by the user - // and assigned to the VM - // +kubebuilder:default=None - // +optional - Identity infrav1alpha3.VMIdentity `json:"identity,omitempty"` - - // UserAssignedIdentities is a list of standalone Azure identities provided by the user - // The lifecycle of a user-assigned identity is managed separately from the lifecycle of - // the AzureMachinePool. - // See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - // +optional - UserAssignedIdentities []infrav1alpha3.UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - - // RoleAssignmentName is the name of the role assignment to create for a system assigned identity. It can be any valid GUID. - // If not specified, a random GUID will be generated. - // +optional - RoleAssignmentName string `json:"roleAssignmentName,omitempty"` - } - - // AzureMachinePoolStatus defines the observed state of AzureMachinePool. - AzureMachinePoolStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Replicas is the most recently observed number of replicas. - // +optional - Replicas int32 `json:"replicas"` - - // Instances is the VM instance status for each VM in the VMSS - // +optional - Instances []*AzureMachinePoolInstanceStatus `json:"instances,omitempty"` - - // Version is the Kubernetes version for the current VMSS model - // +optional - Version string `json:"version"` - - // ProvisioningState is the provisioning state of the Azure virtual machine. - // +optional - ProvisioningState *infrav1alpha3.VMState `json:"provisioningState,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the MachinePool 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 MachinePool'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 MachinePools - // can be added as events to the MachinePool 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 MachinePool 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 MachinePool'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 MachinePools - // can be added as events to the MachinePool object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the AzureMachinePool. - // +optional - Conditions clusterv1alpha3.Conditions `json:"conditions,omitempty"` - - // LongRunningOperationState saves the state for an Azure long running operations so it can be continued on the - // next reconciliation loop. - // +optional - LongRunningOperationState *infrav1alpha3.Future `json:"longRunningOperationState,omitempty"` - } - - // AzureMachinePoolInstanceStatus provides status information for each instance in the VMSS. - AzureMachinePoolInstanceStatus struct { - // Version defines the Kubernetes version for the VM Instance - // +optional - Version string `json:"version"` - - // ProvisioningState is the provisioning state of the Azure virtual machine instance. - // +optional - ProvisioningState *infrav1alpha3.VMState `json:"provisioningState"` - - // ProviderID is the provider identification of the VMSS Instance - // +optional - ProviderID string `json:"providerID"` - - // InstanceID is the identification of the Machine Instance within the VMSS - // +optional - InstanceID string `json:"instanceID"` - - // InstanceName is the name of the Machine Instance within the VMSS - // +optional - InstanceName string `json:"instanceName"` - - // LatestModelApplied indicates the instance is running the most up-to-date VMSS model. A VMSS model describes - // the image version the VM is running. If the instance is not running the latest model, it means the instance - // may not be running the version of Kubernetes the Machine Pool has specified and needs to be updated. - LatestModelApplied bool `json:"latestModelApplied"` - } - - // +kubebuilder:object:root=true - // +kubebuilder:subresource:status - // +kubebuilder:resource:path=azuremachinepools,scope=Namespaced,categories=cluster-api,shortName=amp - // +kubebuilder:printcolumn:name="Replicas",type="string",JSONPath=".status.replicas",description="AzureMachinePool replicas count" - // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="AzureMachinePool replicas count" - // +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.provisioningState",description="Azure VMSS provisioning state" - // +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureMachinePool belongs" - // +kubebuilder:printcolumn:name="MachinePool",type="string",priority=1,JSONPath=".metadata.ownerReferences[?(@.kind==\"MachinePool\")].name",description="MachinePool object to which this AzureMachinePool belongs" - // +kubebuilder:printcolumn:name="VMSS ID",type="string",priority=1,JSONPath=".spec.providerID",description="Azure VMSS ID" - // +kubebuilder:printcolumn:name="VM Size",type="string",priority=1,JSONPath=".spec.template.vmSize",description="Azure VM Size" - - // AzureMachinePool is the Schema for the azuremachinepools API. - AzureMachinePool struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachinePoolSpec `json:"spec,omitempty"` - Status AzureMachinePoolStatus `json:"status,omitempty"` - } - - // +kubebuilder:object:root=true - - // AzureMachinePoolList contains a list of AzureMachinePools. - AzureMachinePoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachinePool `json:"items"` - } -) - -// GetConditions returns the list of conditions for an AzureMachinePool API object. -func (amp *AzureMachinePool) GetConditions() clusterv1alpha3.Conditions { - return amp.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureMachinePool object. -func (amp *AzureMachinePool) SetConditions(conditions clusterv1alpha3.Conditions) { - amp.Status.Conditions = conditions -} - -func init() { - SchemeBuilder.Register(&AzureMachinePool{}, &AzureMachinePoolList{}) -} diff --git a/exp/api/v1alpha3/conversion.go b/exp/api/v1alpha3/conversion.go deleted file mode 100644 index 0a2c4d9a4c8..00000000000 --- a/exp/api/v1alpha3/conversion.go +++ /dev/null @@ -1,55 +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 ( - conversion "k8s.io/apimachinery/pkg/conversion" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" -) - -// Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk is a conversion function. -func Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(in *infrav1alpha3.OSDisk, out *infrav1.OSDisk, s conversion.Scope) error { - return infrav1alpha3.Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(in, out, s) -} - -// Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk is a conversion function. -func Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(in *infrav1.OSDisk, out *infrav1alpha3.OSDisk, s conversion.Scope) error { - return infrav1alpha3.Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(in, out, s) -} - -// Convert_v1alpha3_Image_To_v1beta1_Image is a conversion function. -func Convert_v1alpha3_Image_To_v1beta1_Image(in *infrav1alpha3.Image, out *infrav1.Image, s conversion.Scope) error { - return infrav1alpha3.Convert_v1alpha3_Image_To_v1beta1_Image(in, out, s) -} - -// Convert_v1beta1_Image_To_v1alpha3_Image is a conversion function. -func Convert_v1beta1_Image_To_v1alpha3_Image(in *infrav1.Image, out *infrav1alpha3.Image, s conversion.Scope) error { - return infrav1alpha3.Convert_v1beta1_Image_To_v1alpha3_Image(in, out, s) -} - -// Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *clusterv1alpha3.APIEndpoint, out *clusterv1.APIEndpoint, s conversion.Scope) error { - return clusterv1alpha3.Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -// Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *clusterv1.APIEndpoint, out *clusterv1alpha3.APIEndpoint, s conversion.Scope) error { - return clusterv1alpha3.Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) -} diff --git a/exp/api/v1alpha3/conversion_test.go b/exp/api/v1alpha3/conversion_test.go deleted file mode 100644 index 105c195e001..00000000000 --- a/exp/api/v1alpha3/conversion_test.go +++ /dev/null @@ -1,39 +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 ( - "testing" - - . "github.com/onsi/gomega" - "k8s.io/apimachinery/pkg/runtime" - infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -func TestFuzzyConversion(t *testing.T) { - g := NewWithT(t) - scheme := runtime.NewScheme() - g.Expect(AddToScheme(scheme)).To(Succeed()) - g.Expect(infrav1exp.AddToScheme(scheme)).To(Succeed()) - - t.Run("for AzureMachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1exp.AzureMachinePool{}, - Spoke: &AzureMachinePool{}, - })) -} diff --git a/exp/api/v1alpha3/doc.go b/exp/api/v1alpha3/doc.go deleted file mode 100644 index 1b94a57465b..00000000000 --- a/exp/api/v1alpha3/doc.go +++ /dev/null @@ -1,19 +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 - -// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1 diff --git a/exp/api/v1alpha3/groupversion_info.go b/exp/api/v1alpha3/groupversion_info.go deleted file mode 100644 index a9f2265eeab..00000000000 --- a/exp/api/v1alpha3/groupversion_info.go +++ /dev/null @@ -1,39 +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 contains API Schema definitions for the exp v1alpha3 API group -// +kubebuilder:object:generate=true -// +groupName=infrastructure.cluster.x-k8s.io -package v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is the group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha3"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = SchemeBuilder.SchemeBuilder -) diff --git a/exp/api/v1alpha3/zz_generated.conversion.go b/exp/api/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index bea4d377864..00000000000 --- a/exp/api/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,384 +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-v0.23.1. DO NOT EDIT. - -package v1alpha3 - -import ( - unsafe "unsafe" - - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - clusterapiproviderazureapiv1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - clusterapiproviderazureapiv1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - v1beta1 "sigs.k8s.io/cluster-api-provider-azure/exp/api/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((*AzureMachinePool)(nil), (*v1beta1.AzureMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool(a.(*AzureMachinePool), b.(*v1beta1.AzureMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePool)(nil), (*AzureMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool(a.(*v1beta1.AzureMachinePool), b.(*AzureMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolInstanceStatus)(nil), (*v1beta1.AzureMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(a.(*AzureMachinePoolInstanceStatus), b.(*v1beta1.AzureMachinePoolInstanceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolInstanceStatus)(nil), (*AzureMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha3_AzureMachinePoolInstanceStatus(a.(*v1beta1.AzureMachinePoolInstanceStatus), b.(*AzureMachinePoolInstanceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolList)(nil), (*v1beta1.AzureMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(a.(*AzureMachinePoolList), b.(*v1beta1.AzureMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolList)(nil), (*AzureMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolList_To_v1alpha3_AzureMachinePoolList(a.(*v1beta1.AzureMachinePoolList), b.(*AzureMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolMachineTemplate)(nil), (*v1beta1.AzureMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(a.(*AzureMachinePoolMachineTemplate), b.(*v1beta1.AzureMachinePoolMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolSpec)(nil), (*v1beta1.AzureMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(a.(*AzureMachinePoolSpec), b.(*v1beta1.AzureMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1alpha3.APIEndpoint)(nil), (*apiv1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(a.(*apiv1alpha3.APIEndpoint), b.(*apiv1beta1.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*AzureMachinePoolStatus)(nil), (*v1beta1.AzureMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(a.(*AzureMachinePoolStatus), b.(*v1beta1.AzureMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1alpha3.Image)(nil), (*clusterapiproviderazureapiv1beta1.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_Image_To_v1beta1_Image(a.(*clusterapiproviderazureapiv1alpha3.Image), b.(*clusterapiproviderazureapiv1beta1.Image), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1alpha3.OSDisk)(nil), (*clusterapiproviderazureapiv1beta1.OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(a.(*clusterapiproviderazureapiv1alpha3.OSDisk), b.(*clusterapiproviderazureapiv1beta1.OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1alpha3.SpotVMOptions)(nil), (*clusterapiproviderazureapiv1beta1.SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(a.(*clusterapiproviderazureapiv1alpha3.SpotVMOptions), b.(*clusterapiproviderazureapiv1beta1.SpotVMOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta1.APIEndpoint)(nil), (*apiv1alpha3.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(a.(*apiv1beta1.APIEndpoint), b.(*apiv1alpha3.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachinePoolMachineTemplate)(nil), (*AzureMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate(a.(*v1beta1.AzureMachinePoolMachineTemplate), b.(*AzureMachinePoolMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachinePoolSpec)(nil), (*AzureMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec(a.(*v1beta1.AzureMachinePoolSpec), b.(*AzureMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachinePoolStatus)(nil), (*AzureMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus(a.(*v1beta1.AzureMachinePoolStatus), b.(*AzureMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1beta1.Image)(nil), (*clusterapiproviderazureapiv1alpha3.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Image_To_v1alpha3_Image(a.(*clusterapiproviderazureapiv1beta1.Image), b.(*clusterapiproviderazureapiv1alpha3.Image), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1beta1.OSDisk)(nil), (*clusterapiproviderazureapiv1alpha3.OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(a.(*clusterapiproviderazureapiv1beta1.OSDisk), b.(*clusterapiproviderazureapiv1alpha3.OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1beta1.SpotVMOptions)(nil), (*clusterapiproviderazureapiv1alpha3.SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(a.(*clusterapiproviderazureapiv1beta1.SpotVMOptions), b.(*clusterapiproviderazureapiv1alpha3.SpotVMOptions), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool(in *AzureMachinePool, out *v1beta1.AzureMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool(in *AzureMachinePool, out *v1beta1.AzureMachinePool, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool(in *v1beta1.AzureMachinePool, out *AzureMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool(in *v1beta1.AzureMachinePool, out *AzureMachinePool, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(in *AzureMachinePoolInstanceStatus, out *v1beta1.AzureMachinePoolInstanceStatus, s conversion.Scope) error { - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1beta1.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.ProviderID = in.ProviderID - out.InstanceID = in.InstanceID - out.InstanceName = in.InstanceName - out.LatestModelApplied = in.LatestModelApplied - return nil -} - -// Convert_v1alpha3_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(in *AzureMachinePoolInstanceStatus, out *v1beta1.AzureMachinePoolInstanceStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha3_AzureMachinePoolInstanceStatus(in *v1beta1.AzureMachinePoolInstanceStatus, out *AzureMachinePoolInstanceStatus, s conversion.Scope) error { - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1alpha3.VMState)(unsafe.Pointer(in.ProvisioningState)) - out.ProviderID = in.ProviderID - out.InstanceID = in.InstanceID - out.InstanceName = in.InstanceName - out.LatestModelApplied = in.LatestModelApplied - return nil -} - -// Convert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha3_AzureMachinePoolInstanceStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha3_AzureMachinePoolInstanceStatus(in *v1beta1.AzureMachinePoolInstanceStatus, out *AzureMachinePoolInstanceStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha3_AzureMachinePoolInstanceStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(in *AzureMachinePoolList, out *v1beta1.AzureMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureMachinePool_To_v1beta1_AzureMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(in *AzureMachinePoolList, out *v1beta1.AzureMachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolList_To_v1alpha3_AzureMachinePoolList(in *v1beta1.AzureMachinePoolList, out *AzureMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureMachinePool_To_v1alpha3_AzureMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureMachinePoolList_To_v1alpha3_AzureMachinePoolList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolList_To_v1alpha3_AzureMachinePoolList(in *v1beta1.AzureMachinePoolList, out *AzureMachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolList_To_v1alpha3_AzureMachinePoolList(in, out, s) -} - -func autoConvert_v1alpha3_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(in *AzureMachinePoolMachineTemplate, out *v1beta1.AzureMachinePoolMachineTemplate, s conversion.Scope) error { - out.VMSize = in.VMSize - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(clusterapiproviderazureapiv1beta1.Image) - if err := Convert_v1alpha3_Image_To_v1beta1_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - if err := Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.DataDisks = *(*[]clusterapiproviderazureapiv1beta1.DataDisk)(unsafe.Pointer(&in.DataDisks)) - out.SSHPublicKey = in.SSHPublicKey - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - out.TerminateNotificationTimeout = (*int)(unsafe.Pointer(in.TerminateNotificationTimeout)) - out.SecurityProfile = (*clusterapiproviderazureapiv1beta1.SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(clusterapiproviderazureapiv1beta1.SpotVMOptions) - if err := Convert_v1alpha3_SpotVMOptions_To_v1beta1_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - return nil -} - -// Convert_v1alpha3_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(in *AzureMachinePoolMachineTemplate, out *v1beta1.AzureMachinePoolMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate(in *v1beta1.AzureMachinePoolMachineTemplate, out *AzureMachinePoolMachineTemplate, s conversion.Scope) error { - out.VMSize = in.VMSize - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(clusterapiproviderazureapiv1alpha3.Image) - if err := Convert_v1beta1_Image_To_v1alpha3_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - if err := Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.DataDisks = *(*[]clusterapiproviderazureapiv1alpha3.DataDisk)(unsafe.Pointer(&in.DataDisks)) - out.SSHPublicKey = in.SSHPublicKey - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - // WARNING: in.Diagnostics requires manual conversion: does not exist in peer-type - out.TerminateNotificationTimeout = (*int)(unsafe.Pointer(in.TerminateNotificationTimeout)) - out.SecurityProfile = (*clusterapiproviderazureapiv1alpha3.SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(clusterapiproviderazureapiv1alpha3.SpotVMOptions) - if err := Convert_v1beta1_SpotVMOptions_To_v1alpha3_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - // WARNING: in.SubnetName requires manual conversion: does not exist in peer-type - // WARNING: in.VMExtensions requires manual conversion: does not exist in peer-type - // WARNING: in.NetworkInterfaces requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(in *AzureMachinePoolSpec, out *v1beta1.AzureMachinePoolSpec, s conversion.Scope) error { - out.Location = in.Location - if err := Convert_v1alpha3_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { - return err - } - out.AdditionalTags = *(*clusterapiproviderazureapiv1beta1.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.ProviderID = in.ProviderID - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.Identity = clusterapiproviderazureapiv1beta1.VMIdentity(in.Identity) - out.UserAssignedIdentities = *(*[]clusterapiproviderazureapiv1beta1.UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - out.RoleAssignmentName = in.RoleAssignmentName - return nil -} - -// Convert_v1alpha3_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(in *AzureMachinePoolSpec, out *v1beta1.AzureMachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec(in *v1beta1.AzureMachinePoolSpec, out *AzureMachinePoolSpec, s conversion.Scope) error { - out.Location = in.Location - if err := Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { - return err - } - out.AdditionalTags = *(*clusterapiproviderazureapiv1alpha3.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.ProviderID = in.ProviderID - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.Identity = clusterapiproviderazureapiv1alpha3.VMIdentity(in.Identity) - // WARNING: in.SystemAssignedIdentityRole requires manual conversion: does not exist in peer-type - out.UserAssignedIdentities = *(*[]clusterapiproviderazureapiv1alpha3.UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - out.RoleAssignmentName = in.RoleAssignmentName - // WARNING: in.Strategy requires manual conversion: does not exist in peer-type - // WARNING: in.NodeDrainTimeout requires manual conversion: does not exist in peer-type - // WARNING: in.OrchestrationMode requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(in *AzureMachinePoolStatus, out *v1beta1.AzureMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.Instances = *(*[]*v1beta1.AzureMachinePoolInstanceStatus)(unsafe.Pointer(&in.Instances)) - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1beta1.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - // WARNING: in.LongRunningOperationState requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus(in *v1beta1.AzureMachinePoolStatus, out *AzureMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.Instances = *(*[]*AzureMachinePoolInstanceStatus)(unsafe.Pointer(&in.Instances)) - // WARNING: in.Image requires manual conversion: does not exist in peer-type - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1alpha3.VMState)(unsafe.Pointer(in.ProvisioningState)) - 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.LongRunningOperationStates requires manual conversion: does not exist in peer-type - return nil -} diff --git a/exp/api/v1alpha3/zz_generated.deepcopy.go b/exp/api/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index 1c55e29e266..00000000000 --- a/exp/api/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,242 +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 controller-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" - apiv1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - cluster_apiapiv1alpha3 "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 *AzureMachinePool) DeepCopyInto(out *AzureMachinePool) { - *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 AzureMachinePool. -func (in *AzureMachinePool) DeepCopy() *AzureMachinePool { - if in == nil { - return nil - } - out := new(AzureMachinePool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachinePool) 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 *AzureMachinePoolInstanceStatus) DeepCopyInto(out *AzureMachinePoolInstanceStatus) { - *out = *in - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(apiv1alpha3.VMState) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolInstanceStatus. -func (in *AzureMachinePoolInstanceStatus) DeepCopy() *AzureMachinePoolInstanceStatus { - if in == nil { - return nil - } - out := new(AzureMachinePoolInstanceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolList) DeepCopyInto(out *AzureMachinePoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachinePool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolList. -func (in *AzureMachinePoolList) DeepCopy() *AzureMachinePoolList { - if in == nil { - return nil - } - out := new(AzureMachinePoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachinePoolList) 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 *AzureMachinePoolMachineTemplate) DeepCopyInto(out *AzureMachinePoolMachineTemplate) { - *out = *in - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(apiv1alpha3.Image) - (*in).DeepCopyInto(*out) - } - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]apiv1alpha3.DataDisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AcceleratedNetworking != nil { - in, out := &in.AcceleratedNetworking, &out.AcceleratedNetworking - *out = new(bool) - **out = **in - } - if in.TerminateNotificationTimeout != nil { - in, out := &in.TerminateNotificationTimeout, &out.TerminateNotificationTimeout - *out = new(int) - **out = **in - } - if in.SecurityProfile != nil { - in, out := &in.SecurityProfile, &out.SecurityProfile - *out = new(apiv1alpha3.SecurityProfile) - (*in).DeepCopyInto(*out) - } - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(apiv1alpha3.SpotVMOptions) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineTemplate. -func (in *AzureMachinePoolMachineTemplate) DeepCopy() *AzureMachinePoolMachineTemplate { - if in == nil { - return nil - } - out := new(AzureMachinePoolMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolSpec) DeepCopyInto(out *AzureMachinePoolSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(apiv1alpha3.Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ProviderIDList != nil { - in, out := &in.ProviderIDList, &out.ProviderIDList - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.UserAssignedIdentities != nil { - in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities - *out = make([]apiv1alpha3.UserAssignedIdentity, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolSpec. -func (in *AzureMachinePoolSpec) DeepCopy() *AzureMachinePoolSpec { - if in == nil { - return nil - } - out := new(AzureMachinePoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolStatus) DeepCopyInto(out *AzureMachinePoolStatus) { - *out = *in - if in.Instances != nil { - in, out := &in.Instances, &out.Instances - *out = make([]*AzureMachinePoolInstanceStatus, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(AzureMachinePoolInstanceStatus) - (*in).DeepCopyInto(*out) - } - } - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(apiv1alpha3.VMState) - **out = **in - } - 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(cluster_apiapiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.LongRunningOperationState != nil { - in, out := &in.LongRunningOperationState, &out.LongRunningOperationState - *out = new(apiv1alpha3.Future) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolStatus. -func (in *AzureMachinePoolStatus) DeepCopy() *AzureMachinePoolStatus { - if in == nil { - return nil - } - out := new(AzureMachinePoolStatus) - in.DeepCopyInto(out) - return out -} diff --git a/exp/api/v1alpha4/azuremachinepool_conversion.go b/exp/api/v1alpha4/azuremachinepool_conversion.go deleted file mode 100644 index 582640bd94e..00000000000 --- a/exp/api/v1alpha4/azuremachinepool_conversion.go +++ /dev/null @@ -1,131 +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 ( - unsafe "unsafe" - - "k8s.io/apimachinery/pkg/api/resource" - apiconversion "k8s.io/apimachinery/pkg/conversion" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachinePool to the Hub version (v1beta1). -func (src *AzureMachinePool) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1exp.AzureMachinePool) - if err := Convert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &infrav1exp.AzureMachinePool{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - - if restored.Spec.Template.NetworkInterfaces != nil { - dst.Spec.Template.NetworkInterfaces = restored.Spec.Template.NetworkInterfaces - } - - if restored.Spec.Template.Image != nil && restored.Spec.Template.Image.ComputeGallery != nil { - dst.Spec.Template.Image.ComputeGallery = restored.Spec.Template.Image.ComputeGallery - } - - if restored.Status.Image != nil && restored.Status.Image.ComputeGallery != nil { - dst.Status.Image.ComputeGallery = restored.Status.Image.ComputeGallery - } - - if len(restored.Spec.Template.VMExtensions) > 0 { - dst.Spec.Template.VMExtensions = restored.Spec.Template.VMExtensions - } - - if restored.Spec.Template.SpotVMOptions != nil && restored.Spec.Template.SpotVMOptions.EvictionPolicy != nil { - dst.Spec.Template.SpotVMOptions.EvictionPolicy = restored.Spec.Template.SpotVMOptions.EvictionPolicy - } - - if restored.Spec.Template.Diagnostics != nil { - dst.Spec.Template.Diagnostics = restored.Spec.Template.Diagnostics - } - - for i, r := range restored.Status.LongRunningOperationStates { - if r.Name == dst.Status.LongRunningOperationStates[i].Name { - dst.Status.LongRunningOperationStates[i].ServiceName = r.ServiceName - } - } - - // Restore orchestration mode - dst.Spec.OrchestrationMode = restored.Spec.OrchestrationMode - - if restored.Spec.SystemAssignedIdentityRole != nil { - dst.Spec.SystemAssignedIdentityRole = restored.Spec.SystemAssignedIdentityRole - } - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachinePool) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1exp.AzureMachinePool) - if err := Convert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool(src, dst, nil); err != nil { - return err - } - - if err := utilconversion.MarshalData(src, dst); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha4_AzureMachinePoolSpec converts a v1beta1 AzureMachinePool.Spec to a v1alpha4 AzureMachinePool.Spec. -func Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha4_AzureMachinePoolSpec(in *infrav1exp.AzureMachinePoolSpec, out *AzureMachinePoolSpec, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolSpec_To_v1alpha4_AzureMachinePoolSpec(in, out, s) -} - -// ConvertTo converts this AzureMachinePool to the Hub version (v1beta1). -func (src *AzureMachinePoolList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1exp.AzureMachinePoolList) - return Convert_v1alpha4_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachinePoolList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1exp.AzureMachinePoolList) - return Convert_v1beta1_AzureMachinePoolList_To_v1alpha4_AzureMachinePoolList(src, dst, nil) -} - -// Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha4_AzureMachinePoolMachineTemplate converts an Azure Machine Pool Machine Template from v1beta1 to v1alpha4. -func Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha4_AzureMachinePoolMachineTemplate(in *infrav1exp.AzureMachinePoolMachineTemplate, out *AzureMachinePoolMachineTemplate, s apiconversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha4_AzureMachinePoolMachineTemplate(in, out, s) -} - -// Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions converts a SpotVMOptions from v1beta1 to v1alpha4. -func Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(in *infrav1.SpotVMOptions, out *infrav1alpha4.SpotVMOptions, s apiconversion.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - return nil -} - -// Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions converts a SpotVMOptions from v1alpha4 to v1beta1. -func Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(in *infrav1alpha4.SpotVMOptions, out *infrav1.SpotVMOptions, s apiconversion.Scope) error { - out.MaxPrice = (*resource.Quantity)(unsafe.Pointer(in.MaxPrice)) - return nil -} diff --git a/exp/api/v1alpha4/azuremachinepool_types.go b/exp/api/v1alpha4/azuremachinepool_types.go deleted file mode 100644 index a64c6084d96..00000000000 --- a/exp/api/v1alpha4/azuremachinepool_types.go +++ /dev/null @@ -1,370 +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/util/intstr" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // MachinePoolNameLabel indicates the AzureMachinePool name the AzureMachinePoolMachine belongs. - MachinePoolNameLabel = "azuremachinepool.infrastructure.cluster.x-k8s.io/machine-pool" - - // RollingUpdateAzureMachinePoolDeploymentStrategyType replaces AzureMachinePoolMachines with older models with - // AzureMachinePoolMachines based on the latest model. - // i.e. gradually scale down the old AzureMachinePoolMachines and scale up the new ones. - RollingUpdateAzureMachinePoolDeploymentStrategyType AzureMachinePoolDeploymentStrategyType = "RollingUpdate" - - // OldestDeletePolicyType will delete machines with the oldest creation date first. - OldestDeletePolicyType AzureMachinePoolDeletePolicyType = "Oldest" - // NewestDeletePolicyType will delete machines with the newest creation date first. - NewestDeletePolicyType AzureMachinePoolDeletePolicyType = "Newest" - // RandomDeletePolicyType will delete machines in random order. - RandomDeletePolicyType AzureMachinePoolDeletePolicyType = "Random" -) - -type ( - // AzureMachinePoolMachineTemplate defines the template for an AzureMachine. - AzureMachinePoolMachineTemplate struct { - // VMSize is the size of the Virtual Machine to build. - // See https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#virtualmachinesizetypes - VMSize string `json:"vmSize"` - - // Image is used to provide details of an image to use during VM creation. - // If image details are omitted the image will default the Azure Marketplace "capi" offer, - // which is based on Ubuntu. - // +kubebuilder:validation:nullable - // +optional - Image *infrav1alpha4.Image `json:"image,omitempty"` - - // OSDisk contains the operating system disk information for a Virtual Machine - OSDisk infrav1alpha4.OSDisk `json:"osDisk"` - - // DataDisks specifies the list of data disks to be created for a Virtual Machine - // +optional - DataDisks []infrav1alpha4.DataDisk `json:"dataDisks,omitempty"` - - // SSHPublicKey is the SSH public key string base64 encoded to add to a Virtual Machine - SSHPublicKey string `json:"sshPublicKey"` - - // AcceleratedNetworking enables or disables Azure accelerated networking. If omitted, it will be set based on - // whether the requested VMSize supports accelerated networking. - // If AcceleratedNetworking is set to true with a VMSize that does not support it, Azure will return an error. - // +optional - AcceleratedNetworking *bool `json:"acceleratedNetworking,omitempty"` - - // TerminateNotificationTimeout enables or disables VMSS scheduled events termination notification with specified timeout - // allowed values are between 5 and 15 (mins) - // +optional - TerminateNotificationTimeout *int `json:"terminateNotificationTimeout,omitempty"` - - // SecurityProfile specifies the Security profile settings for a virtual machine. - // +optional - SecurityProfile *infrav1alpha4.SecurityProfile `json:"securityProfile,omitempty"` - - // SpotVMOptions allows the ability to specify the Machine should use a Spot VM - // +optional - SpotVMOptions *infrav1alpha4.SpotVMOptions `json:"spotVMOptions,omitempty"` - - // SubnetName selects the Subnet where the VMSS will be placed - // +optional - SubnetName string `json:"subnetName,omitempty"` - } - - // AzureMachinePoolSpec defines the desired state of AzureMachinePool. - AzureMachinePoolSpec struct { - // Location is the Azure region location e.g. westus2 - Location string `json:"location"` - - // Template contains the details used to build a replica virtual machine within the Machine Pool - Template AzureMachinePoolMachineTemplate `json:"template"` - - // AdditionalTags is an optional set of tags to add to an instance, in addition to the ones added by default by the - // Azure provider. If both the AzureCluster and the AzureMachine specify the same tag name with different values, the - // AzureMachine's value takes precedence. - // +optional - AdditionalTags infrav1alpha4.Tags `json:"additionalTags,omitempty"` - - // ProviderID is the identification ID of the Virtual Machine Scale Set - // +optional - ProviderID string `json:"providerID,omitempty"` - - // ProviderIDList are the identification IDs of machine instances provided by the provider. - // This field must match the provider IDs as seen on the node objects corresponding to a machine pool's machine instances. - // +optional - ProviderIDList []string `json:"providerIDList,omitempty"` - - // Identity is the type of identity used for the Virtual Machine Scale Set. - // The type 'SystemAssigned' is an implicitly created identity. - // The generated identity will be assigned a Subscription contributor role. - // The type 'UserAssigned' is a standalone Azure resource provided by the user - // and assigned to the VM - // +kubebuilder:default=None - // +optional - Identity infrav1alpha4.VMIdentity `json:"identity,omitempty"` - - // UserAssignedIdentities is a list of standalone Azure identities provided by the user - // The lifecycle of a user-assigned identity is managed separately from the lifecycle of - // the AzureMachinePool. - // See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli - // +optional - UserAssignedIdentities []infrav1alpha4.UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - - // RoleAssignmentName is the name of the role assignment to create for a system assigned identity. It can be any valid GUID. - // If not specified, a random GUID will be generated. - // +optional - RoleAssignmentName string `json:"roleAssignmentName,omitempty"` - - // The deployment strategy to use to replace existing AzureMachinePoolMachines with new ones. - // +optional - // +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1, maxUnavailable: 0, deletePolicy: Oldest}} - Strategy AzureMachinePoolDeploymentStrategy `json:"strategy,omitempty"` - - // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node. - // The default value is 0, meaning that the node can be drained without any time limitations. - // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout` - // +optional - NodeDrainTimeout *metav1.Duration `json:"nodeDrainTimeout,omitempty"` - } - - // AzureMachinePoolDeploymentStrategyType is the type of deployment strategy employed to rollout a new version of - // the AzureMachinePool. - AzureMachinePoolDeploymentStrategyType string - - // AzureMachinePoolDeploymentStrategy describes how to replace existing machines with new ones. - AzureMachinePoolDeploymentStrategy struct { - // Type of deployment. Currently the only supported strategy is RollingUpdate - // +optional - // +kubebuilder:validation:Enum=RollingUpdate - // +optional - // +kubebuilder:default=RollingUpdate - Type AzureMachinePoolDeploymentStrategyType `json:"type,omitempty"` - - // Rolling update config params. Present only if - // MachineDeploymentStrategyType = RollingUpdate. - // +optional - RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"` - } - - // AzureMachinePoolDeletePolicyType is the type of DeletePolicy employed to select machines to be deleted during an - // upgrade. - AzureMachinePoolDeletePolicyType string - - // MachineRollingUpdateDeployment is used to control the desired behavior of rolling update. - MachineRollingUpdateDeployment struct { - // The maximum number of machines that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired - // machines (ex: 10%). - // Absolute number is calculated from percentage by rounding down. - // This can not be 0 if MaxSurge is 0. - // Defaults to 0. - // Example: when this is set to 30%, the old MachineSet can be scaled - // down to 70% of desired machines immediately when the rolling update - // starts. Once new machines are ready, old MachineSet can be scaled - // down further, followed by scaling up the new MachineSet, ensuring - // that the total number of machines available at all times - // during the update is at least 70% of desired machines. - // +optional - // +kubebuilder:default:=0 - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` - - // The maximum number of machines that can be scheduled above the - // desired number of machines. - // Value can be an absolute number (ex: 5) or a percentage of - // desired machines (ex: 10%). - // This can not be 0 if MaxUnavailable is 0. - // Absolute number is calculated from percentage by rounding up. - // Defaults to 1. - // Example: when this is set to 30%, the new MachineSet can be scaled - // up immediately when the rolling update starts, such that the total - // number of old and new machines do not exceed 130% of desired - // machines. Once old machines have been killed, new MachineSet can - // be scaled up further, ensuring that total number of machines running - // at any time during the update is at most 130% of desired machines. - // +optional - // +kubebuilder:default:=1 - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"` - - // DeletePolicy defines the policy used by the MachineDeployment to identify nodes to delete when downscaling. - // Valid values are "Random, "Newest", "Oldest" - // When no value is supplied, the default is Oldest - // +optional - // +kubebuilder:validation:Enum=Random;Newest;Oldest - // +kubebuilder:default:=Oldest - DeletePolicy AzureMachinePoolDeletePolicyType `json:"deletePolicy,omitempty"` - } - - // AzureMachinePoolStatus defines the observed state of AzureMachinePool. - AzureMachinePoolStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Replicas is the most recently observed number of replicas. - // +optional - Replicas int32 `json:"replicas"` - - // Instances is the VM instance status for each VM in the VMSS - // +optional - Instances []*AzureMachinePoolInstanceStatus `json:"instances,omitempty"` - - // Image is the current image used in the AzureMachinePool. When the spec image is nil, this image is populated - // with the details of the defaulted Azure Marketplace "capi" offer. - // +optional - Image *infrav1alpha4.Image `json:"image,omitempty"` - - // Version is the Kubernetes version for the current VMSS model - // +optional - Version string `json:"version"` - - // ProvisioningState is the provisioning state of the Azure virtual machine. - // +optional - ProvisioningState *infrav1alpha4.ProvisioningState `json:"provisioningState,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the MachinePool 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 MachinePool'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 MachinePools - // can be added as events to the MachinePool 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 MachinePool 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 MachinePool'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 MachinePools - // can be added as events to the MachinePool object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the AzureMachinePool. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` - - // LongRunningOperationStates saves the state for Azure long-running operations so they can be continued on the - // next reconciliation loop. - // +optional - LongRunningOperationStates infrav1alpha4.Futures `json:"longRunningOperationStates,omitempty"` - } - - // AzureMachinePoolInstanceStatus provides status information for each instance in the VMSS. - AzureMachinePoolInstanceStatus struct { - // Version defines the Kubernetes version for the VM Instance - // +optional - Version string `json:"version"` - - // ProvisioningState is the provisioning state of the Azure virtual machine instance. - // +optional - ProvisioningState *infrav1alpha4.ProvisioningState `json:"provisioningState"` - - // ProviderID is the provider identification of the VMSS Instance - // +optional - ProviderID string `json:"providerID"` - - // InstanceID is the identification of the Machine Instance within the VMSS - // +optional - InstanceID string `json:"instanceID"` - - // InstanceName is the name of the Machine Instance within the VMSS - // +optional - InstanceName string `json:"instanceName"` - - // LatestModelApplied indicates the instance is running the most up-to-date VMSS model. A VMSS model describes - // the image version the VM is running. If the instance is not running the latest model, it means the instance - // may not be running the version of Kubernetes the Machine Pool has specified and needs to be updated. - LatestModelApplied bool `json:"latestModelApplied"` - } - - // +kubebuilder:object:root=true - // +kubebuilder:subresource:status - // +kubebuilder:resource:path=azuremachinepools,scope=Namespaced,categories=cluster-api,shortName=amp - // +kubebuilder:printcolumn:name="Replicas",type="string",JSONPath=".status.replicas",description="AzureMachinePool replicas count" - // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="AzureMachinePool replicas count" - // +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.provisioningState",description="Azure VMSS provisioning state" - // +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureMachinePool belongs" - // +kubebuilder:printcolumn:name="MachinePool",type="string",priority=1,JSONPath=".metadata.ownerReferences[?(@.kind==\"MachinePool\")].name",description="MachinePool object to which this AzureMachinePool belongs" - // +kubebuilder:printcolumn:name="VMSS ID",type="string",priority=1,JSONPath=".spec.providerID",description="Azure VMSS ID" - // +kubebuilder:printcolumn:name="VM Size",type="string",priority=1,JSONPath=".spec.template.vmSize",description="Azure VM Size" - - // AzureMachinePool is the Schema for the azuremachinepools API. - AzureMachinePool struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachinePoolSpec `json:"spec,omitempty"` - Status AzureMachinePoolStatus `json:"status,omitempty"` - } - - // +kubebuilder:object:root=true - - // AzureMachinePoolList contains a list of AzureMachinePools. - AzureMachinePoolList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachinePool `json:"items"` - } -) - -// GetConditions returns the list of conditions for an AzureMachinePool API object. -func (amp *AzureMachinePool) GetConditions() clusterv1alpha4.Conditions { - return amp.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureMachinePool object. -func (amp *AzureMachinePool) SetConditions(conditions clusterv1alpha4.Conditions) { - amp.Status.Conditions = conditions -} - -// GetFutures returns the list of long running operation states for an AzureMachinePool API object. -func (amp *AzureMachinePool) GetFutures() infrav1alpha4.Futures { - return amp.Status.LongRunningOperationStates -} - -// SetFutures will set the given long running operation states on an AzureMachinePool object. -func (amp *AzureMachinePool) SetFutures(futures infrav1alpha4.Futures) { - amp.Status.LongRunningOperationStates = futures -} - -func init() { - SchemeBuilder.Register(&AzureMachinePool{}, &AzureMachinePoolList{}) -} diff --git a/exp/api/v1alpha4/azuremachinepoolmachine_conversion.go b/exp/api/v1alpha4/azuremachinepoolmachine_conversion.go deleted file mode 100644 index 5591d3f5318..00000000000 --- a/exp/api/v1alpha4/azuremachinepoolmachine_conversion.go +++ /dev/null @@ -1,62 +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 ( - infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -// ConvertTo converts this AzureMachinePoolMachine to the Hub version (v1beta1). -func (src *AzureMachinePoolMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1exp.AzureMachinePoolMachine) - if err := Convert_v1alpha4_AzureMachinePoolMachine_To_v1beta1_AzureMachinePoolMachine(src, dst, nil); err != nil { - return err - } - restored := &infrav1exp.AzureMachinePoolMachine{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - dst.Spec = restored.Spec - - return nil -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachinePoolMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1exp.AzureMachinePoolMachine) - - if err := Convert_v1beta1_AzureMachinePoolMachine_To_v1alpha4_AzureMachinePoolMachine(src, dst, nil); err != nil { - return err - } - - // Preserve Hub data on down-conversion. - return utilconversion.MarshalData(src, dst) -} - -// ConvertTo converts this AzureMachinePoolMachineList to the Hub version (v1beta1). -func (src *AzureMachinePoolMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1exp.AzureMachinePoolMachineList) - return Convert_v1alpha4_AzureMachinePoolMachineList_To_v1beta1_AzureMachinePoolMachineList(src, dst, nil) -} - -// ConvertFrom converts from the Hub version (v1beta1) to this version. -func (dst *AzureMachinePoolMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1exp.AzureMachinePoolMachineList) - return Convert_v1beta1_AzureMachinePoolMachineList_To_v1alpha4_AzureMachinePoolMachineList(src, dst, nil) -} diff --git a/exp/api/v1alpha4/azuremachinepoolmachine_types.go b/exp/api/v1alpha4/azuremachinepoolmachine_types.go deleted file mode 100644 index c864e3078b3..00000000000 --- a/exp/api/v1alpha4/azuremachinepoolmachine_types.go +++ /dev/null @@ -1,150 +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 v1alpha4 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // AzureMachinePoolMachineFinalizer is used to ensure deletion of dependencies (nodes, infra). - AzureMachinePoolMachineFinalizer = "azuremachinepoolmachine.infrastructure.cluster.x-k8s.io" -) - -type ( - - // AzureMachinePoolMachineSpec defines the desired state of AzureMachinePoolMachine. - AzureMachinePoolMachineSpec struct { - // ProviderID is the identification ID of the Virtual Machine Scale Set - ProviderID string `json:"providerID"` - - // InstanceID is the identification of the Machine Instance within the VMSS - InstanceID string `json:"instanceID"` - } - - // AzureMachinePoolMachineStatus defines the observed state of AzureMachinePoolMachine. - AzureMachinePoolMachineStatus struct { - // NodeRef will point to the corresponding Node if it exists. - // +optional - NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - - // Version defines the Kubernetes version for the VM Instance - // +optional - Version string `json:"version"` - - // ProvisioningState is the provisioning state of the Azure virtual machine instance. - // +optional - ProvisioningState *infrav1alpha4.ProvisioningState `json:"provisioningState"` - - // InstanceName is the name of the Machine Instance within the VMSS - // +optional - InstanceName string `json:"instanceName"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the MachinePool machine and will contain a succinct value suitable - // for machine interpretation. - // - // Any transient errors that occur during the reconciliation of MachinePools - // can be added as events to the MachinePool 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 MachinePool and will contain a more verbose string suitable - // for logging and human consumption. - // - // Any transient errors that occur during the reconciliation of MachinePools - // can be added as events to the MachinePool object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the AzureMachinePool. - // +optional - Conditions clusterv1alpha4.Conditions `json:"conditions,omitempty"` - - // LongRunningOperationStates saves the state for Azure long running operations so they can be continued on the - // next reconciliation loop. - // +optional - LongRunningOperationStates infrav1alpha4.Futures `json:"longRunningOperationStates,omitempty"` - - // LatestModelApplied indicates the instance is running the most up-to-date VMSS model. A VMSS model describes - // the image version the VM is running. If the instance is not running the latest model, it means the instance - // may not be running the version of Kubernetes the Machine Pool has specified and needs to be updated. - LatestModelApplied bool `json:"latestModelApplied"` - - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - } - - // +kubebuilder:object:root=true - // +kubebuilder:subresource:status - // +kubebuilder:resource:path=azuremachinepoolmachines,scope=Namespaced,categories=cluster-api,shortName=ampm - // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="Kubernetes version" - // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Flag indicating infrastructure is successfully provisioned" - // +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.provisioningState",description="Azure VMSS VM provisioning state" - // +kubebuilder:printcolumn:name="Cluster",type="string",priority=1,JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureMachinePoolMachine belongs" - // +kubebuilder:printcolumn:name="VMSS VM ID",type="string",priority=1,JSONPath=".spec.providerID",description="Azure VMSS VM ID" - - // AzureMachinePoolMachine is the Schema for the azuremachinepoolmachines API. - AzureMachinePoolMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureMachinePoolMachineSpec `json:"spec,omitempty"` - Status AzureMachinePoolMachineStatus `json:"status,omitempty"` - } - - // +kubebuilder:object:root=true - - // AzureMachinePoolMachineList contains a list of AzureMachinePoolMachines. - AzureMachinePoolMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureMachinePoolMachine `json:"items"` - } -) - -// GetConditions returns the list of conditions for an AzureMachinePool API object. -func (ampm *AzureMachinePoolMachine) GetConditions() clusterv1alpha4.Conditions { - return ampm.Status.Conditions -} - -// SetConditions will set the given conditions on an AzureMachinePool object. -func (ampm *AzureMachinePoolMachine) SetConditions(conditions clusterv1alpha4.Conditions) { - ampm.Status.Conditions = conditions -} - -// GetFutures returns the list of long running operation states for an AzureMachinePoolMachine API object. -func (ampm *AzureMachinePoolMachine) GetFutures() infrav1alpha4.Futures { - return ampm.Status.LongRunningOperationStates -} - -// SetFutures will set the given long running operation states on an AzureMachinePoolMachine object. -func (ampm *AzureMachinePoolMachine) SetFutures(futures infrav1alpha4.Futures) { - ampm.Status.LongRunningOperationStates = futures -} - -func init() { - SchemeBuilder.Register(&AzureMachinePoolMachine{}, &AzureMachinePoolMachineList{}) -} diff --git a/exp/api/v1alpha4/conversion.go b/exp/api/v1alpha4/conversion.go deleted file mode 100644 index b0c3a1ef545..00000000000 --- a/exp/api/v1alpha4/conversion.go +++ /dev/null @@ -1,55 +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 v1alpha4 - -import ( - "k8s.io/apimachinery/pkg/conversion" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" - infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" -) - -// Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk is a conversion function. -func Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(in *infrav1alpha4.OSDisk, out *infrav1.OSDisk, s conversion.Scope) error { - return infrav1alpha4.Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(in, out, s) -} - -// Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk is a conversion function. -func Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(in *infrav1.OSDisk, out *infrav1alpha4.OSDisk, s conversion.Scope) error { - return infrav1alpha4.Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(in, out, s) -} - -// Convert_v1alpha4_Image_To_v1beta1_Image is a conversion function. -func Convert_v1alpha4_Image_To_v1beta1_Image(in *infrav1alpha4.Image, out *infrav1.Image, s conversion.Scope) error { - return infrav1alpha4.Convert_v1alpha4_Image_To_v1beta1_Image(in, out, s) -} - -// Convert_v1beta1_Image_To_v1alpha4_Image is a conversion function. -func Convert_v1beta1_Image_To_v1alpha4_Image(in *infrav1.Image, out *infrav1alpha4.Image, s conversion.Scope) error { - return infrav1alpha4.Convert_v1beta1_Image_To_v1alpha4_Image(in, out, s) -} - -// Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint is an autogenerated conversion function. -func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *clusterv1alpha4.APIEndpoint, out *clusterv1.APIEndpoint, s conversion.Scope) error { - return clusterv1alpha4.Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -// Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint is an autogenerated conversion function. -func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *clusterv1.APIEndpoint, out *clusterv1alpha4.APIEndpoint, s conversion.Scope) error { - return clusterv1alpha4.Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) -} diff --git a/exp/api/v1alpha4/conversion_test.go b/exp/api/v1alpha4/conversion_test.go deleted file mode 100644 index f7b3f27fe90..00000000000 --- a/exp/api/v1alpha4/conversion_test.go +++ /dev/null @@ -1,45 +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 ( - "testing" - - . "github.com/onsi/gomega" - "k8s.io/apimachinery/pkg/runtime" - infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" - utilconversion "sigs.k8s.io/cluster-api/util/conversion" -) - -func TestFuzzyConversion(t *testing.T) { - g := NewWithT(t) - scheme := runtime.NewScheme() - g.Expect(AddToScheme(scheme)).To(Succeed()) - g.Expect(infrav1exp.AddToScheme(scheme)).To(Succeed()) - - t.Run("for AzureMachinePool", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1exp.AzureMachinePool{}, - Spoke: &AzureMachinePool{}, - })) - - t.Run("for AzureMachinePoolMachine", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Scheme: scheme, - Hub: &infrav1exp.AzureMachinePoolMachine{}, - Spoke: &AzureMachinePoolMachine{}, - })) -} diff --git a/exp/api/v1alpha4/doc.go b/exp/api/v1alpha4/doc.go deleted file mode 100644 index c13c5b77f4f..00000000000 --- a/exp/api/v1alpha4/doc.go +++ /dev/null @@ -1,19 +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 - -// +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1 diff --git a/exp/api/v1alpha4/groupversion_info.go b/exp/api/v1alpha4/groupversion_info.go deleted file mode 100644 index adb87d30049..00000000000 --- a/exp/api/v1alpha4/groupversion_info.go +++ /dev/null @@ -1,39 +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 exp v1alpha4 API group -// +kubebuilder:object:generate=true -// +groupName=infrastructure.cluster.x-k8s.io -package v1alpha4 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha4"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme - - // localSchemeBuilder is used for type conversions. - localSchemeBuilder = SchemeBuilder.SchemeBuilder -) diff --git a/exp/api/v1alpha4/zz_generated.conversion.go b/exp/api/v1alpha4/zz_generated.conversion.go deleted file mode 100644 index e15b1205d3d..00000000000 --- a/exp/api/v1alpha4/zz_generated.conversion.go +++ /dev/null @@ -1,641 +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-v0.23.1. DO NOT EDIT. - -package v1alpha4 - -import ( - unsafe "unsafe" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - intstr "k8s.io/apimachinery/pkg/util/intstr" - clusterapiproviderazureapiv1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" - clusterapiproviderazureapiv1beta1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" - v1beta1 "sigs.k8s.io/cluster-api-provider-azure/exp/api/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((*AzureMachinePool)(nil), (*v1beta1.AzureMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool(a.(*AzureMachinePool), b.(*v1beta1.AzureMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePool)(nil), (*AzureMachinePool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool(a.(*v1beta1.AzureMachinePool), b.(*AzureMachinePool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolDeploymentStrategy)(nil), (*v1beta1.AzureMachinePoolDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolDeploymentStrategy_To_v1beta1_AzureMachinePoolDeploymentStrategy(a.(*AzureMachinePoolDeploymentStrategy), b.(*v1beta1.AzureMachinePoolDeploymentStrategy), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolDeploymentStrategy)(nil), (*AzureMachinePoolDeploymentStrategy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolDeploymentStrategy_To_v1alpha4_AzureMachinePoolDeploymentStrategy(a.(*v1beta1.AzureMachinePoolDeploymentStrategy), b.(*AzureMachinePoolDeploymentStrategy), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolInstanceStatus)(nil), (*v1beta1.AzureMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(a.(*AzureMachinePoolInstanceStatus), b.(*v1beta1.AzureMachinePoolInstanceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolInstanceStatus)(nil), (*AzureMachinePoolInstanceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha4_AzureMachinePoolInstanceStatus(a.(*v1beta1.AzureMachinePoolInstanceStatus), b.(*AzureMachinePoolInstanceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolList)(nil), (*v1beta1.AzureMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(a.(*AzureMachinePoolList), b.(*v1beta1.AzureMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolList)(nil), (*AzureMachinePoolList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolList_To_v1alpha4_AzureMachinePoolList(a.(*v1beta1.AzureMachinePoolList), b.(*AzureMachinePoolList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolMachine)(nil), (*v1beta1.AzureMachinePoolMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolMachine_To_v1beta1_AzureMachinePoolMachine(a.(*AzureMachinePoolMachine), b.(*v1beta1.AzureMachinePoolMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolMachine)(nil), (*AzureMachinePoolMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolMachine_To_v1alpha4_AzureMachinePoolMachine(a.(*v1beta1.AzureMachinePoolMachine), b.(*AzureMachinePoolMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolMachineList)(nil), (*v1beta1.AzureMachinePoolMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolMachineList_To_v1beta1_AzureMachinePoolMachineList(a.(*AzureMachinePoolMachineList), b.(*v1beta1.AzureMachinePoolMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolMachineList)(nil), (*AzureMachinePoolMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolMachineList_To_v1alpha4_AzureMachinePoolMachineList(a.(*v1beta1.AzureMachinePoolMachineList), b.(*AzureMachinePoolMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolMachineSpec)(nil), (*v1beta1.AzureMachinePoolMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolMachineSpec_To_v1beta1_AzureMachinePoolMachineSpec(a.(*AzureMachinePoolMachineSpec), b.(*v1beta1.AzureMachinePoolMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolMachineSpec)(nil), (*AzureMachinePoolMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolMachineSpec_To_v1alpha4_AzureMachinePoolMachineSpec(a.(*v1beta1.AzureMachinePoolMachineSpec), b.(*AzureMachinePoolMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolMachineStatus)(nil), (*v1beta1.AzureMachinePoolMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolMachineStatus_To_v1beta1_AzureMachinePoolMachineStatus(a.(*AzureMachinePoolMachineStatus), b.(*v1beta1.AzureMachinePoolMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolMachineStatus)(nil), (*AzureMachinePoolMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolMachineStatus_To_v1alpha4_AzureMachinePoolMachineStatus(a.(*v1beta1.AzureMachinePoolMachineStatus), b.(*AzureMachinePoolMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolMachineTemplate)(nil), (*v1beta1.AzureMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(a.(*AzureMachinePoolMachineTemplate), b.(*v1beta1.AzureMachinePoolMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolSpec)(nil), (*v1beta1.AzureMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(a.(*AzureMachinePoolSpec), b.(*v1beta1.AzureMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureMachinePoolStatus)(nil), (*v1beta1.AzureMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(a.(*AzureMachinePoolStatus), b.(*v1beta1.AzureMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureMachinePoolStatus)(nil), (*AzureMachinePoolStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha4_AzureMachinePoolStatus(a.(*v1beta1.AzureMachinePoolStatus), b.(*AzureMachinePoolStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*MachineRollingUpdateDeployment)(nil), (*v1beta1.MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(a.(*MachineRollingUpdateDeployment), b.(*v1beta1.MachineRollingUpdateDeployment), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.MachineRollingUpdateDeployment)(nil), (*MachineRollingUpdateDeployment)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(a.(*v1beta1.MachineRollingUpdateDeployment), b.(*MachineRollingUpdateDeployment), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1alpha4.APIEndpoint)(nil), (*apiv1beta1.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(a.(*apiv1alpha4.APIEndpoint), b.(*apiv1beta1.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1alpha4.Image)(nil), (*clusterapiproviderazureapiv1beta1.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_Image_To_v1beta1_Image(a.(*clusterapiproviderazureapiv1alpha4.Image), b.(*clusterapiproviderazureapiv1beta1.Image), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1alpha4.OSDisk)(nil), (*clusterapiproviderazureapiv1beta1.OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(a.(*clusterapiproviderazureapiv1alpha4.OSDisk), b.(*clusterapiproviderazureapiv1beta1.OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1alpha4.SpotVMOptions)(nil), (*clusterapiproviderazureapiv1beta1.SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(a.(*clusterapiproviderazureapiv1alpha4.SpotVMOptions), b.(*clusterapiproviderazureapiv1beta1.SpotVMOptions), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiv1beta1.APIEndpoint)(nil), (*apiv1alpha4.APIEndpoint)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(a.(*apiv1beta1.APIEndpoint), b.(*apiv1alpha4.APIEndpoint), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachinePoolMachineTemplate)(nil), (*AzureMachinePoolMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha4_AzureMachinePoolMachineTemplate(a.(*v1beta1.AzureMachinePoolMachineTemplate), b.(*AzureMachinePoolMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1beta1.AzureMachinePoolSpec)(nil), (*AzureMachinePoolSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha4_AzureMachinePoolSpec(a.(*v1beta1.AzureMachinePoolSpec), b.(*AzureMachinePoolSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1beta1.Image)(nil), (*clusterapiproviderazureapiv1alpha4.Image)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_Image_To_v1alpha4_Image(a.(*clusterapiproviderazureapiv1beta1.Image), b.(*clusterapiproviderazureapiv1alpha4.Image), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1beta1.OSDisk)(nil), (*clusterapiproviderazureapiv1alpha4.OSDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(a.(*clusterapiproviderazureapiv1beta1.OSDisk), b.(*clusterapiproviderazureapiv1alpha4.OSDisk), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*clusterapiproviderazureapiv1beta1.SpotVMOptions)(nil), (*clusterapiproviderazureapiv1alpha4.SpotVMOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(a.(*clusterapiproviderazureapiv1beta1.SpotVMOptions), b.(*clusterapiproviderazureapiv1alpha4.SpotVMOptions), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool(in *AzureMachinePool, out *v1beta1.AzureMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool(in *AzureMachinePool, out *v1beta1.AzureMachinePool, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool(in *v1beta1.AzureMachinePool, out *AzureMachinePool, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha4_AzureMachinePoolSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha4_AzureMachinePoolStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool(in *v1beta1.AzureMachinePool, out *AzureMachinePool, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolDeploymentStrategy_To_v1beta1_AzureMachinePoolDeploymentStrategy(in *AzureMachinePoolDeploymentStrategy, out *v1beta1.AzureMachinePoolDeploymentStrategy, s conversion.Scope) error { - out.Type = v1beta1.AzureMachinePoolDeploymentStrategyType(in.Type) - out.RollingUpdate = (*v1beta1.MachineRollingUpdateDeployment)(unsafe.Pointer(in.RollingUpdate)) - return nil -} - -// Convert_v1alpha4_AzureMachinePoolDeploymentStrategy_To_v1beta1_AzureMachinePoolDeploymentStrategy is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolDeploymentStrategy_To_v1beta1_AzureMachinePoolDeploymentStrategy(in *AzureMachinePoolDeploymentStrategy, out *v1beta1.AzureMachinePoolDeploymentStrategy, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolDeploymentStrategy_To_v1beta1_AzureMachinePoolDeploymentStrategy(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolDeploymentStrategy_To_v1alpha4_AzureMachinePoolDeploymentStrategy(in *v1beta1.AzureMachinePoolDeploymentStrategy, out *AzureMachinePoolDeploymentStrategy, s conversion.Scope) error { - out.Type = AzureMachinePoolDeploymentStrategyType(in.Type) - out.RollingUpdate = (*MachineRollingUpdateDeployment)(unsafe.Pointer(in.RollingUpdate)) - return nil -} - -// Convert_v1beta1_AzureMachinePoolDeploymentStrategy_To_v1alpha4_AzureMachinePoolDeploymentStrategy is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolDeploymentStrategy_To_v1alpha4_AzureMachinePoolDeploymentStrategy(in *v1beta1.AzureMachinePoolDeploymentStrategy, out *AzureMachinePoolDeploymentStrategy, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolDeploymentStrategy_To_v1alpha4_AzureMachinePoolDeploymentStrategy(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(in *AzureMachinePoolInstanceStatus, out *v1beta1.AzureMachinePoolInstanceStatus, s conversion.Scope) error { - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1beta1.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.ProviderID = in.ProviderID - out.InstanceID = in.InstanceID - out.InstanceName = in.InstanceName - out.LatestModelApplied = in.LatestModelApplied - return nil -} - -// Convert_v1alpha4_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(in *AzureMachinePoolInstanceStatus, out *v1beta1.AzureMachinePoolInstanceStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolInstanceStatus_To_v1beta1_AzureMachinePoolInstanceStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha4_AzureMachinePoolInstanceStatus(in *v1beta1.AzureMachinePoolInstanceStatus, out *AzureMachinePoolInstanceStatus, s conversion.Scope) error { - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1alpha4.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.ProviderID = in.ProviderID - out.InstanceID = in.InstanceID - out.InstanceName = in.InstanceName - out.LatestModelApplied = in.LatestModelApplied - return nil -} - -// Convert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha4_AzureMachinePoolInstanceStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha4_AzureMachinePoolInstanceStatus(in *v1beta1.AzureMachinePoolInstanceStatus, out *AzureMachinePoolInstanceStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolInstanceStatus_To_v1alpha4_AzureMachinePoolInstanceStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(in *AzureMachinePoolList, out *v1beta1.AzureMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureMachinePool_To_v1beta1_AzureMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(in *AzureMachinePoolList, out *v1beta1.AzureMachinePoolList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolList_To_v1beta1_AzureMachinePoolList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolList_To_v1alpha4_AzureMachinePoolList(in *v1beta1.AzureMachinePoolList, out *AzureMachinePoolList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachinePool, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureMachinePool_To_v1alpha4_AzureMachinePool(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureMachinePoolList_To_v1alpha4_AzureMachinePoolList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolList_To_v1alpha4_AzureMachinePoolList(in *v1beta1.AzureMachinePoolList, out *AzureMachinePoolList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolList_To_v1alpha4_AzureMachinePoolList(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolMachine_To_v1beta1_AzureMachinePoolMachine(in *AzureMachinePoolMachine, out *v1beta1.AzureMachinePoolMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureMachinePoolMachineSpec_To_v1beta1_AzureMachinePoolMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureMachinePoolMachineStatus_To_v1beta1_AzureMachinePoolMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureMachinePoolMachine_To_v1beta1_AzureMachinePoolMachine is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolMachine_To_v1beta1_AzureMachinePoolMachine(in *AzureMachinePoolMachine, out *v1beta1.AzureMachinePoolMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolMachine_To_v1beta1_AzureMachinePoolMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolMachine_To_v1alpha4_AzureMachinePoolMachine(in *v1beta1.AzureMachinePoolMachine, out *AzureMachinePoolMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureMachinePoolMachineSpec_To_v1alpha4_AzureMachinePoolMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureMachinePoolMachineStatus_To_v1alpha4_AzureMachinePoolMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureMachinePoolMachine_To_v1alpha4_AzureMachinePoolMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolMachine_To_v1alpha4_AzureMachinePoolMachine(in *v1beta1.AzureMachinePoolMachine, out *AzureMachinePoolMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolMachine_To_v1alpha4_AzureMachinePoolMachine(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolMachineList_To_v1beta1_AzureMachinePoolMachineList(in *AzureMachinePoolMachineList, out *v1beta1.AzureMachinePoolMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureMachinePoolMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_AzureMachinePoolMachineList_To_v1beta1_AzureMachinePoolMachineList is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolMachineList_To_v1beta1_AzureMachinePoolMachineList(in *AzureMachinePoolMachineList, out *v1beta1.AzureMachinePoolMachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolMachineList_To_v1beta1_AzureMachinePoolMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolMachineList_To_v1alpha4_AzureMachinePoolMachineList(in *v1beta1.AzureMachinePoolMachineList, out *AzureMachinePoolMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureMachinePoolMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureMachinePoolMachineList_To_v1alpha4_AzureMachinePoolMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolMachineList_To_v1alpha4_AzureMachinePoolMachineList(in *v1beta1.AzureMachinePoolMachineList, out *AzureMachinePoolMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolMachineList_To_v1alpha4_AzureMachinePoolMachineList(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolMachineSpec_To_v1beta1_AzureMachinePoolMachineSpec(in *AzureMachinePoolMachineSpec, out *v1beta1.AzureMachinePoolMachineSpec, s conversion.Scope) error { - out.ProviderID = in.ProviderID - out.InstanceID = in.InstanceID - return nil -} - -// Convert_v1alpha4_AzureMachinePoolMachineSpec_To_v1beta1_AzureMachinePoolMachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolMachineSpec_To_v1beta1_AzureMachinePoolMachineSpec(in *AzureMachinePoolMachineSpec, out *v1beta1.AzureMachinePoolMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolMachineSpec_To_v1beta1_AzureMachinePoolMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolMachineSpec_To_v1alpha4_AzureMachinePoolMachineSpec(in *v1beta1.AzureMachinePoolMachineSpec, out *AzureMachinePoolMachineSpec, s conversion.Scope) error { - out.ProviderID = in.ProviderID - out.InstanceID = in.InstanceID - return nil -} - -// Convert_v1beta1_AzureMachinePoolMachineSpec_To_v1alpha4_AzureMachinePoolMachineSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolMachineSpec_To_v1alpha4_AzureMachinePoolMachineSpec(in *v1beta1.AzureMachinePoolMachineSpec, out *AzureMachinePoolMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolMachineSpec_To_v1alpha4_AzureMachinePoolMachineSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolMachineStatus_To_v1beta1_AzureMachinePoolMachineStatus(in *AzureMachinePoolMachineStatus, out *v1beta1.AzureMachinePoolMachineStatus, s conversion.Scope) error { - out.NodeRef = (*v1.ObjectReference)(unsafe.Pointer(in.NodeRef)) - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1beta1.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.InstanceName = in.InstanceName - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.LongRunningOperationStates = *(*clusterapiproviderazureapiv1beta1.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - out.LatestModelApplied = in.LatestModelApplied - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha4_AzureMachinePoolMachineStatus_To_v1beta1_AzureMachinePoolMachineStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolMachineStatus_To_v1beta1_AzureMachinePoolMachineStatus(in *AzureMachinePoolMachineStatus, out *v1beta1.AzureMachinePoolMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolMachineStatus_To_v1beta1_AzureMachinePoolMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolMachineStatus_To_v1alpha4_AzureMachinePoolMachineStatus(in *v1beta1.AzureMachinePoolMachineStatus, out *AzureMachinePoolMachineStatus, s conversion.Scope) error { - out.NodeRef = (*v1.ObjectReference)(unsafe.Pointer(in.NodeRef)) - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1alpha4.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.InstanceName = in.InstanceName - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - out.LongRunningOperationStates = *(*clusterapiproviderazureapiv1alpha4.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - out.LatestModelApplied = in.LatestModelApplied - out.Ready = in.Ready - return nil -} - -// Convert_v1beta1_AzureMachinePoolMachineStatus_To_v1alpha4_AzureMachinePoolMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolMachineStatus_To_v1alpha4_AzureMachinePoolMachineStatus(in *v1beta1.AzureMachinePoolMachineStatus, out *AzureMachinePoolMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolMachineStatus_To_v1alpha4_AzureMachinePoolMachineStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(in *AzureMachinePoolMachineTemplate, out *v1beta1.AzureMachinePoolMachineTemplate, s conversion.Scope) error { - out.VMSize = in.VMSize - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(clusterapiproviderazureapiv1beta1.Image) - if err := Convert_v1alpha4_Image_To_v1beta1_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - if err := Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.DataDisks = *(*[]clusterapiproviderazureapiv1beta1.DataDisk)(unsafe.Pointer(&in.DataDisks)) - out.SSHPublicKey = in.SSHPublicKey - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - out.TerminateNotificationTimeout = (*int)(unsafe.Pointer(in.TerminateNotificationTimeout)) - out.SecurityProfile = (*clusterapiproviderazureapiv1beta1.SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(clusterapiproviderazureapiv1beta1.SpotVMOptions) - if err := Convert_v1alpha4_SpotVMOptions_To_v1beta1_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - out.SubnetName = in.SubnetName - return nil -} - -// Convert_v1alpha4_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(in *AzureMachinePoolMachineTemplate, out *v1beta1.AzureMachinePoolMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha4_AzureMachinePoolMachineTemplate(in *v1beta1.AzureMachinePoolMachineTemplate, out *AzureMachinePoolMachineTemplate, s conversion.Scope) error { - out.VMSize = in.VMSize - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(clusterapiproviderazureapiv1alpha4.Image) - if err := Convert_v1beta1_Image_To_v1alpha4_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - if err := Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.DataDisks = *(*[]clusterapiproviderazureapiv1alpha4.DataDisk)(unsafe.Pointer(&in.DataDisks)) - out.SSHPublicKey = in.SSHPublicKey - out.AcceleratedNetworking = (*bool)(unsafe.Pointer(in.AcceleratedNetworking)) - // WARNING: in.Diagnostics requires manual conversion: does not exist in peer-type - out.TerminateNotificationTimeout = (*int)(unsafe.Pointer(in.TerminateNotificationTimeout)) - out.SecurityProfile = (*clusterapiproviderazureapiv1alpha4.SecurityProfile)(unsafe.Pointer(in.SecurityProfile)) - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(clusterapiproviderazureapiv1alpha4.SpotVMOptions) - if err := Convert_v1beta1_SpotVMOptions_To_v1alpha4_SpotVMOptions(*in, *out, s); err != nil { - return err - } - } else { - out.SpotVMOptions = nil - } - out.SubnetName = in.SubnetName - // WARNING: in.VMExtensions requires manual conversion: does not exist in peer-type - // WARNING: in.NetworkInterfaces requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(in *AzureMachinePoolSpec, out *v1beta1.AzureMachinePoolSpec, s conversion.Scope) error { - out.Location = in.Location - if err := Convert_v1alpha4_AzureMachinePoolMachineTemplate_To_v1beta1_AzureMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { - return err - } - out.AdditionalTags = *(*clusterapiproviderazureapiv1beta1.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.ProviderID = in.ProviderID - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.Identity = clusterapiproviderazureapiv1beta1.VMIdentity(in.Identity) - out.UserAssignedIdentities = *(*[]clusterapiproviderazureapiv1beta1.UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - out.RoleAssignmentName = in.RoleAssignmentName - if err := Convert_v1alpha4_AzureMachinePoolDeploymentStrategy_To_v1beta1_AzureMachinePoolDeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { - return err - } - out.NodeDrainTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) - return nil -} - -// Convert_v1alpha4_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(in *AzureMachinePoolSpec, out *v1beta1.AzureMachinePoolSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolSpec_To_v1beta1_AzureMachinePoolSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolSpec_To_v1alpha4_AzureMachinePoolSpec(in *v1beta1.AzureMachinePoolSpec, out *AzureMachinePoolSpec, s conversion.Scope) error { - out.Location = in.Location - if err := Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha4_AzureMachinePoolMachineTemplate(&in.Template, &out.Template, s); err != nil { - return err - } - out.AdditionalTags = *(*clusterapiproviderazureapiv1alpha4.Tags)(unsafe.Pointer(&in.AdditionalTags)) - out.ProviderID = in.ProviderID - out.ProviderIDList = *(*[]string)(unsafe.Pointer(&in.ProviderIDList)) - out.Identity = clusterapiproviderazureapiv1alpha4.VMIdentity(in.Identity) - // WARNING: in.SystemAssignedIdentityRole requires manual conversion: does not exist in peer-type - out.UserAssignedIdentities = *(*[]clusterapiproviderazureapiv1alpha4.UserAssignedIdentity)(unsafe.Pointer(&in.UserAssignedIdentities)) - out.RoleAssignmentName = in.RoleAssignmentName - if err := Convert_v1beta1_AzureMachinePoolDeploymentStrategy_To_v1alpha4_AzureMachinePoolDeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { - return err - } - out.NodeDrainTimeout = (*metav1.Duration)(unsafe.Pointer(in.NodeDrainTimeout)) - // WARNING: in.OrchestrationMode requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha4_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(in *AzureMachinePoolStatus, out *v1beta1.AzureMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.Instances = *(*[]*v1beta1.AzureMachinePoolInstanceStatus)(unsafe.Pointer(&in.Instances)) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(clusterapiproviderazureapiv1beta1.Image) - if err := Convert_v1alpha4_Image_To_v1beta1_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1beta1.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.LongRunningOperationStates = *(*clusterapiproviderazureapiv1beta1.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1alpha4_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(in *AzureMachinePoolStatus, out *v1beta1.AzureMachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureMachinePoolStatus_To_v1alpha4_AzureMachinePoolStatus(in *v1beta1.AzureMachinePoolStatus, out *AzureMachinePoolStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.Instances = *(*[]*AzureMachinePoolInstanceStatus)(unsafe.Pointer(&in.Instances)) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(clusterapiproviderazureapiv1alpha4.Image) - if err := Convert_v1beta1_Image_To_v1alpha4_Image(*in, *out, s); err != nil { - return err - } - } else { - out.Image = nil - } - out.Version = in.Version - out.ProvisioningState = (*clusterapiproviderazureapiv1alpha4.ProvisioningState)(unsafe.Pointer(in.ProvisioningState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - out.LongRunningOperationStates = *(*clusterapiproviderazureapiv1alpha4.Futures)(unsafe.Pointer(&in.LongRunningOperationStates)) - return nil -} - -// Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha4_AzureMachinePoolStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha4_AzureMachinePoolStatus(in *v1beta1.AzureMachinePoolStatus, out *AzureMachinePoolStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureMachinePoolStatus_To_v1alpha4_AzureMachinePoolStatus(in, out, s) -} - -func autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta1.MachineRollingUpdateDeployment, s conversion.Scope) error { - out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) - out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) - out.DeletePolicy = v1beta1.AzureMachinePoolDeletePolicyType(in.DeletePolicy) - return nil -} - -// Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment is an autogenerated conversion function. -func Convert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in *MachineRollingUpdateDeployment, out *v1beta1.MachineRollingUpdateDeployment, s conversion.Scope) error { - return autoConvert_v1alpha4_MachineRollingUpdateDeployment_To_v1beta1_MachineRollingUpdateDeployment(in, out, s) -} - -func autoConvert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in *v1beta1.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s conversion.Scope) error { - out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable)) - out.MaxSurge = (*intstr.IntOrString)(unsafe.Pointer(in.MaxSurge)) - out.DeletePolicy = AzureMachinePoolDeletePolicyType(in.DeletePolicy) - return nil -} - -// Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment is an autogenerated conversion function. -func Convert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in *v1beta1.MachineRollingUpdateDeployment, out *MachineRollingUpdateDeployment, s conversion.Scope) error { - return autoConvert_v1beta1_MachineRollingUpdateDeployment_To_v1alpha4_MachineRollingUpdateDeployment(in, out, s) -} diff --git a/exp/api/v1alpha4/zz_generated.deepcopy.go b/exp/api/v1alpha4/zz_generated.deepcopy.go deleted file mode 100644 index ca62d6534f9..00000000000 --- a/exp/api/v1alpha4/zz_generated.deepcopy.go +++ /dev/null @@ -1,422 +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 controller-gen. DO NOT EDIT. - -package v1alpha4 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/intstr" - apiv1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" - cluster_apiapiv1alpha4 "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 *AzureMachinePool) DeepCopyInto(out *AzureMachinePool) { - *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 AzureMachinePool. -func (in *AzureMachinePool) DeepCopy() *AzureMachinePool { - if in == nil { - return nil - } - out := new(AzureMachinePool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachinePool) 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 *AzureMachinePoolDeploymentStrategy) DeepCopyInto(out *AzureMachinePoolDeploymentStrategy) { - *out = *in - if in.RollingUpdate != nil { - in, out := &in.RollingUpdate, &out.RollingUpdate - *out = new(MachineRollingUpdateDeployment) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolDeploymentStrategy. -func (in *AzureMachinePoolDeploymentStrategy) DeepCopy() *AzureMachinePoolDeploymentStrategy { - if in == nil { - return nil - } - out := new(AzureMachinePoolDeploymentStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolInstanceStatus) DeepCopyInto(out *AzureMachinePoolInstanceStatus) { - *out = *in - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(apiv1alpha4.ProvisioningState) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolInstanceStatus. -func (in *AzureMachinePoolInstanceStatus) DeepCopy() *AzureMachinePoolInstanceStatus { - if in == nil { - return nil - } - out := new(AzureMachinePoolInstanceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolList) DeepCopyInto(out *AzureMachinePoolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachinePool, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolList. -func (in *AzureMachinePoolList) DeepCopy() *AzureMachinePoolList { - if in == nil { - return nil - } - out := new(AzureMachinePoolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachinePoolList) 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 *AzureMachinePoolMachine) DeepCopyInto(out *AzureMachinePoolMachine) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachine. -func (in *AzureMachinePoolMachine) DeepCopy() *AzureMachinePoolMachine { - if in == nil { - return nil - } - out := new(AzureMachinePoolMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachinePoolMachine) 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 *AzureMachinePoolMachineList) DeepCopyInto(out *AzureMachinePoolMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureMachinePoolMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineList. -func (in *AzureMachinePoolMachineList) DeepCopy() *AzureMachinePoolMachineList { - if in == nil { - return nil - } - out := new(AzureMachinePoolMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachinePoolMachineList) 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 *AzureMachinePoolMachineSpec) DeepCopyInto(out *AzureMachinePoolMachineSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineSpec. -func (in *AzureMachinePoolMachineSpec) DeepCopy() *AzureMachinePoolMachineSpec { - if in == nil { - return nil - } - out := new(AzureMachinePoolMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolMachineStatus) DeepCopyInto(out *AzureMachinePoolMachineStatus) { - *out = *in - if in.NodeRef != nil { - in, out := &in.NodeRef, &out.NodeRef - *out = new(corev1.ObjectReference) - **out = **in - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(apiv1alpha4.ProvisioningState) - **out = **in - } - 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(cluster_apiapiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.LongRunningOperationStates != nil { - in, out := &in.LongRunningOperationStates, &out.LongRunningOperationStates - *out = make(apiv1alpha4.Futures, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineStatus. -func (in *AzureMachinePoolMachineStatus) DeepCopy() *AzureMachinePoolMachineStatus { - if in == nil { - return nil - } - out := new(AzureMachinePoolMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolMachineTemplate) DeepCopyInto(out *AzureMachinePoolMachineTemplate) { - *out = *in - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(apiv1alpha4.Image) - (*in).DeepCopyInto(*out) - } - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]apiv1alpha4.DataDisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AcceleratedNetworking != nil { - in, out := &in.AcceleratedNetworking, &out.AcceleratedNetworking - *out = new(bool) - **out = **in - } - if in.TerminateNotificationTimeout != nil { - in, out := &in.TerminateNotificationTimeout, &out.TerminateNotificationTimeout - *out = new(int) - **out = **in - } - if in.SecurityProfile != nil { - in, out := &in.SecurityProfile, &out.SecurityProfile - *out = new(apiv1alpha4.SecurityProfile) - (*in).DeepCopyInto(*out) - } - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(apiv1alpha4.SpotVMOptions) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolMachineTemplate. -func (in *AzureMachinePoolMachineTemplate) DeepCopy() *AzureMachinePoolMachineTemplate { - if in == nil { - return nil - } - out := new(AzureMachinePoolMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolSpec) DeepCopyInto(out *AzureMachinePoolSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make(apiv1alpha4.Tags, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ProviderIDList != nil { - in, out := &in.ProviderIDList, &out.ProviderIDList - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.UserAssignedIdentities != nil { - in, out := &in.UserAssignedIdentities, &out.UserAssignedIdentities - *out = make([]apiv1alpha4.UserAssignedIdentity, len(*in)) - copy(*out, *in) - } - in.Strategy.DeepCopyInto(&out.Strategy) - if in.NodeDrainTimeout != nil { - in, out := &in.NodeDrainTimeout, &out.NodeDrainTimeout - *out = new(v1.Duration) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolSpec. -func (in *AzureMachinePoolSpec) DeepCopy() *AzureMachinePoolSpec { - if in == nil { - return nil - } - out := new(AzureMachinePoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachinePoolStatus) DeepCopyInto(out *AzureMachinePoolStatus) { - *out = *in - if in.Instances != nil { - in, out := &in.Instances, &out.Instances - *out = make([]*AzureMachinePoolInstanceStatus, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(AzureMachinePoolInstanceStatus) - (*in).DeepCopyInto(*out) - } - } - } - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(apiv1alpha4.Image) - (*in).DeepCopyInto(*out) - } - if in.ProvisioningState != nil { - in, out := &in.ProvisioningState, &out.ProvisioningState - *out = new(apiv1alpha4.ProvisioningState) - **out = **in - } - 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(cluster_apiapiv1alpha4.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.LongRunningOperationStates != nil { - in, out := &in.LongRunningOperationStates, &out.LongRunningOperationStates - *out = make(apiv1alpha4.Futures, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachinePoolStatus. -func (in *AzureMachinePoolStatus) DeepCopy() *AzureMachinePoolStatus { - if in == nil { - return nil - } - out := new(AzureMachinePoolStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineRollingUpdateDeployment) DeepCopyInto(out *MachineRollingUpdateDeployment) { - *out = *in - if in.MaxUnavailable != nil { - in, out := &in.MaxUnavailable, &out.MaxUnavailable - *out = new(intstr.IntOrString) - **out = **in - } - if in.MaxSurge != nil { - in, out := &in.MaxSurge, &out.MaxSurge - *out = new(intstr.IntOrString) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineRollingUpdateDeployment. -func (in *MachineRollingUpdateDeployment) DeepCopy() *MachineRollingUpdateDeployment { - if in == nil { - return nil - } - out := new(MachineRollingUpdateDeployment) - in.DeepCopyInto(out) - return out -} diff --git a/go.mod b/go.mod index 370d3fc8d90..44856d42cc1 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/go-logr/logr v1.2.4 github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.5.9 - github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.3.0 github.com/hashicorp/go-retryablehttp v0.7.2 github.com/hashicorp/golang-lru v0.5.4 @@ -120,6 +119,7 @@ require ( github.com/google/gnostic v0.6.9 // indirect github.com/google/go-github/v48 v48.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect diff --git a/hack/codecov-ignore.sh b/hack/codecov-ignore.sh index abd8bdcb8a9..64d85b12c3c 100755 --- a/hack/codecov-ignore.sh +++ b/hack/codecov-ignore.sh @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -echo "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3 -sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4 -sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha3 -sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha4" > codecov-ignore.txt - { find api/v1beta1 -regex '.*_conversion\.go' -exec echo sigs.k8s.io/cluster-api-provider-azure/{} \; find api/v1beta1 -regex '.*zz_generated.*\.go' -exec echo sigs.k8s.io/cluster-api-provider-azure/{} \; diff --git a/internal/test/env/env.go b/internal/test/env/env.go index 3986e70b331..3c0deb26798 100644 --- a/internal/test/env/env.go +++ b/internal/test/env/env.go @@ -35,8 +35,6 @@ import ( "k8s.io/client-go/rest" "k8s.io/klog/v2" "k8s.io/utils/pointer" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" "sigs.k8s.io/cluster-api-provider-azure/internal/test/record" @@ -61,8 +59,6 @@ func init() { utilruntime.Must(expv1.AddToScheme(scheme)) utilruntime.Must(infrav1.AddToScheme(scheme)) utilruntime.Must(infrav1exp.AddToScheme(scheme)) - utilruntime.Must(infrav1alpha3.AddToScheme(scheme)) - utilruntime.Must(infrav1alpha4.AddToScheme(scheme)) // Get the root of the current file to use in CRD paths. _, filename, _, _ := goruntime.Caller(0) //nolint:dogsled // Ignore "declaration has 3 blank identifiers" check. diff --git a/main.go b/main.go index ee81c911f1d..4cd66fbc26c 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,6 @@ limitations under the License. package main -//nolint:staticcheck // v1alpha4 is deprecated as of CAPI v1.4.0 import ( "context" "flag" @@ -37,12 +36,8 @@ import ( cgrecord "k8s.io/client-go/tools/record" "k8s.io/klog/v2" "k8s.io/klog/v2/klogr" - infrav1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3" - infrav1alpha4 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha4" infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1" "sigs.k8s.io/cluster-api-provider-azure/controllers" - infrav1alpha3exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha3" - infrav1alpha4exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1alpha4" infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1" infrav1controllersexp "sigs.k8s.io/cluster-api-provider-azure/exp/controllers" "sigs.k8s.io/cluster-api-provider-azure/feature" @@ -50,10 +45,8 @@ import ( "sigs.k8s.io/cluster-api-provider-azure/pkg/ot" "sigs.k8s.io/cluster-api-provider-azure/util/reconciler" "sigs.k8s.io/cluster-api-provider-azure/version" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" kubeadmv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1" - expv1alpha4 "sigs.k8s.io/cluster-api/exp/api/v1alpha4" expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1" capifeature "sigs.k8s.io/cluster-api/feature" "sigs.k8s.io/cluster-api/util/record" @@ -71,14 +64,8 @@ func init() { klog.InitFlags(nil) _ = clientgoscheme.AddToScheme(scheme) - _ = infrav1alpha3.AddToScheme(scheme) - _ = infrav1alpha4.AddToScheme(scheme) _ = infrav1.AddToScheme(scheme) - _ = infrav1alpha3exp.AddToScheme(scheme) - _ = infrav1alpha4exp.AddToScheme(scheme) _ = infrav1exp.AddToScheme(scheme) - _ = clusterv1alpha4.AddToScheme(scheme) - _ = expv1alpha4.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) _ = expv1.AddToScheme(scheme) _ = kubeadmv1.AddToScheme(scheme) @@ -174,7 +161,7 @@ func InitFlags(fs *pflag.FlagSet) { &watchFilterValue, "watch-filter", "", - fmt.Sprintf("Label value that the controller watches to reconcile cluster-api objects. Label key is always %s. If unspecified, the controller watches for all cluster-api objects.", clusterv1alpha4.WatchLabel), + fmt.Sprintf("Label value that the controller watches to reconcile cluster-api objects. Label key is always %s. If unspecified, the controller watches for all cluster-api objects.", clusterv1.WatchLabel), ) fs.StringVar( diff --git a/test/e2e/capi_test.go b/test/e2e/capi_test.go index 8391a1b32d7..4c33107c020 100644 --- a/test/e2e/capi_test.go +++ b/test/e2e/capi_test.go @@ -212,9 +212,9 @@ var _ = Describe("Running the Cluster API E2E tests", func() { if os.Getenv("USE_LOCAL_KIND_REGISTRY") != "true" { Context("API Version Upgrade", func() { - Context("upgrade from v1alpha4 to v1beta1, and scale workload clusters created in v1alpha4", func() { + Context("upgrade from an old version of v1beta1 to current, and scale workload clusters created in the old version", func() { BeforeEach(func() { - // Unset resource group and vnet env variables, since we capi test creates 2 clusters, + // Unset resource group and vnet env variables, since the upgrade test creates 2 clusters, // and will result in both the clusters using the same vnet and resource group. Expect(os.Unsetenv(AzureResourceGroup)).To(Succeed()) Expect(os.Unsetenv(AzureVNetName)).To(Succeed()) @@ -226,15 +226,21 @@ var _ = Describe("Running the Cluster API E2E tests", func() { }) capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput { return capi_e2e.ClusterctlUpgradeSpecInput{ - E2EConfig: e2eConfig, - ClusterctlConfigPath: clusterctlConfigPath, - BootstrapClusterProxy: bootstrapClusterProxy, - ArtifactFolder: artifactFolder, - SkipCleanup: skipCleanup, - PreInit: getPreInitFunc(ctx), + E2EConfig: e2eConfig, + ClusterctlConfigPath: clusterctlConfigPath, + BootstrapClusterProxy: bootstrapClusterProxy, + ArtifactFolder: artifactFolder, + SkipCleanup: skipCleanup, + PreInit: getPreInitFunc(ctx), + InitWithProvidersContract: "v1beta1", ControlPlaneWaiters: clusterctl.ControlPlaneWaiters{ WaitForControlPlaneInitialized: EnsureControlPlaneInitialized, }, + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.5/clusterctl-{OS}-{ARCH}", + InitWithCoreProvider: "cluster-api:v1.0.5", + InitWithBootstrapProviders: []string{"kubeadm:v1.0.5"}, + InitWithControlPlaneProviders: []string{"kubeadm:v1.0.5"}, + InitWithInfrastructureProviders: []string{"azure:v1.0.2"}, } }) }) diff --git a/test/e2e/config/azure-dev.yaml b/test/e2e/config/azure-dev.yaml index 8039f8b630c..ac5280c612a 100644 --- a/test/e2e/config/azure-dev.yaml +++ b/test/e2e/config/azure-dev.yaml @@ -14,15 +14,15 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v0.4.8 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/core-components.yaml" + - name: v1.0.5 # earliest published release in the v1beta1 series; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.5/core-components.yaml" type: "url" - contract: v1alpha4 + contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1alpha4/metadata.yaml" + - sourcePath: "../data/shared/v1beta1/metadata.yaml" - name: v1.4.1 value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.1/core-components.yaml type: url @@ -37,15 +37,15 @@ providers: - name: kubeadm type: BootstrapProvider versions: - - name: v0.4.8 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/bootstrap-components.yaml" + - name: v1.0.5 # earliest published release in the v1beta1 series; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.5/bootstrap-components.yaml" type: "url" - contract: v1alpha4 + contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1alpha4/metadata.yaml" + - sourcePath: "../data/shared/v1beta1/metadata.yaml" - name: v1.4.1 value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.1/bootstrap-components.yaml type: url @@ -59,15 +59,15 @@ providers: - name: kubeadm type: ControlPlaneProvider versions: - - name: v0.4.8 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/control-plane-components.yaml" + - name: v1.0.5 # earliest published release in the v1beta1 series; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.5/control-plane-components.yaml" type: "url" - contract: v1alpha4 + contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1alpha4/metadata.yaml" + - sourcePath: "../data/shared/v1beta1/metadata.yaml" - name: v1.4.1 value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.1/control-plane-components.yaml type: url @@ -81,13 +81,13 @@ providers: - name: azure type: InfrastructureProvider versions: - - name: v0.5.3 # latest published release in the v1alpha4 series; this is used for v1alpha4 --> v1beta1 clusterctl upgrades test only. - value: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/v0.5.3/infrastructure-components.yaml + - name: v1.0.2 # earliest published release in the v1beta1 series; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only. + value: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/v1.0.2/infrastructure-components.yaml type: url - contract: v1alpha4 + contract: v1beta1 files: - - sourcePath: "../data/shared/v1alpha4_provider/metadata.yaml" - - sourcePath: "../data/infrastructure-azure/v1alpha4/cluster-template-prow.yaml" + - sourcePath: "../data/shared/v1beta1_provider/metadata.yaml" + - sourcePath: "../data/infrastructure-azure/v1.0.2/cluster-template-prow.yaml" targetName: "cluster-template.yaml" replacements: - old: "imagePullPolicy: Always" @@ -172,9 +172,9 @@ variables: CI_VERSION: "" # NOTE: INIT_WITH_BINARY and INIT_WITH_KUBERNETES_VERSION are only used by the clusterctl upgrade test to initialize # the management cluster to be upgraded. - INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/clusterctl-{OS}-{ARCH}" - INIT_WITH_PROVIDERS_CONTRACT: "v1alpha4" - INIT_WITH_KUBERNETES_VERSION: "v1.22.9" + INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.0.5/clusterctl-{OS}-{ARCH}" + INIT_WITH_PROVIDERS_CONTRACT: "v1beta1" + INIT_WITH_KUBERNETES_VERSION: "v1.23.13" KUBETEST_CONFIGURATION: "./data/kubetest/conformance.yaml" WINDOWS_CONTAINERD_URL: "${WINDOWS_CONTAINERD_URL:-}" SECURITY_SCAN_FAIL_THRESHOLD: "${SECURITY_SCAN_FAIL_THRESHOLD:-100}" diff --git a/test/e2e/data/infrastructure-azure/v1alpha4/cluster-template-prow.yaml b/test/e2e/data/infrastructure-azure/v1.0.2/cluster-template-prow.yaml similarity index 93% rename from test/e2e/data/infrastructure-azure/v1alpha4/cluster-template-prow.yaml rename to test/e2e/data/infrastructure-azure/v1.0.2/cluster-template-prow.yaml index 5509ffe2fa3..635a29b2880 100644 --- a/test/e2e/data/infrastructure-azure/v1alpha4/cluster-template-prow.yaml +++ b/test/e2e/data/infrastructure-azure/v1.0.2/cluster-template-prow.yaml @@ -1,4 +1,4 @@ -apiVersion: cluster.x-k8s.io/v1alpha4 +apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster metadata: labels: @@ -9,17 +9,17 @@ spec: clusterNetwork: pods: cidrBlocks: - - 192.168.0.0/16 + - 192.168.0.0/16 controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane name: ${CLUSTER_NAME}-control-plane infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureCluster name: ${CLUSTER_NAME} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureCluster metadata: name: ${CLUSTER_NAME} @@ -30,24 +30,24 @@ spec: creationTimestamp: ${TIMESTAMP} jobName: ${JOB_NAME} identityRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureClusterIdentity name: ${CLUSTER_IDENTITY_NAME} location: ${AZURE_LOCATION} networkSpec: subnets: - - name: control-plane-subnet - role: control-plane - - name: node-subnet - natGateway: - name: node-natgateway - role: node + - name: control-plane-subnet + role: control-plane + - name: node-subnet + natGateway: + name: node-natgateway + role: node vnet: name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} subscriptionID: ${AZURE_SUBSCRIPTION_ID} --- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha4 +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: KubeadmControlPlane metadata: name: ${CLUSTER_NAME}-control-plane @@ -59,11 +59,12 @@ spec: extraArgs: cloud-config: /etc/kubernetes/azure.json cloud-provider: azure + feature-gates: ${K8S_FEATURE_GATES:-""} extraVolumes: - - hostPath: /etc/kubernetes/azure.json - mountPath: /etc/kubernetes/azure.json - name: cloud-config - readOnly: true + - hostPath: /etc/kubernetes/azure.json + mountPath: /etc/kubernetes/azure.json + name: cloud-config + readOnly: true timeoutForControlPlane: 20m controllerManager: extraArgs: @@ -73,10 +74,10 @@ spec: cluster-name: ${CLUSTER_NAME} v: "4" extraVolumes: - - hostPath: /etc/kubernetes/azure.json - mountPath: /etc/kubernetes/azure.json - name: cloud-config - readOnly: true + - hostPath: /etc/kubernetes/azure.json + mountPath: /etc/kubernetes/azure.json + name: cloud-config + readOnly: true etcd: local: dataDir: /var/lib/etcddisk/etcd @@ -84,29 +85,29 @@ spec: quota-backend-bytes: "8589934592" diskSetup: filesystems: - - device: /dev/disk/azure/scsi1/lun0 - extraOpts: - - -E - - lazy_itable_init=1,lazy_journal_init=1 - filesystem: ext4 - label: etcd_disk - - device: ephemeral0.1 - filesystem: ext4 - label: ephemeral0 - replaceFS: ntfs + - device: /dev/disk/azure/scsi1/lun0 + extraOpts: + - -E + - lazy_itable_init=1,lazy_journal_init=1 + filesystem: ext4 + label: etcd_disk + - device: ephemeral0.1 + filesystem: ext4 + label: ephemeral0 + replaceFS: ntfs partitions: - - device: /dev/disk/azure/scsi1/lun0 - layout: true - overwrite: false - tableType: gpt + - device: /dev/disk/azure/scsi1/lun0 + layout: true + overwrite: false + tableType: gpt files: - - contentFrom: - secret: - key: control-plane-azure.json - name: ${CLUSTER_NAME}-control-plane-azure-json - owner: root:root - path: /etc/kubernetes/azure.json - permissions: "0644" + - contentFrom: + secret: + key: control-plane-azure.json + name: ${CLUSTER_NAME}-control-plane-azure-json + owner: root:root + path: /etc/kubernetes/azure.json + permissions: "0644" initConfiguration: nodeRegistration: kubeletExtraArgs: @@ -122,19 +123,19 @@ spec: cloud-provider: azure name: '{{ ds.meta_data["local_hostname"] }}' mounts: - - - LABEL=etcd_disk - - /var/lib/etcddisk + - - LABEL=etcd_disk + - /var/lib/etcddisk postKubeadmCommands: [] preKubeadmCommands: [] machineTemplate: infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate name: ${CLUSTER_NAME}-control-plane replicas: ${CONTROL_PLANE_MACHINE_COUNT} version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate metadata: name: ${CLUSTER_NAME}-control-plane @@ -143,16 +144,16 @@ spec: template: spec: dataDisks: - - diskSizeGB: 256 - lun: 0 - nameSuffix: etcddisk + - diskSizeGB: 256 + lun: 0 + nameSuffix: etcddisk osDisk: diskSizeGB: 128 osType: Linux sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} --- -apiVersion: cluster.x-k8s.io/v1alpha4 +apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment metadata: name: ${CLUSTER_NAME}-md-0 @@ -168,17 +169,17 @@ spec: spec: bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate name: ${CLUSTER_NAME}-md-0 clusterName: ${CLUSTER_NAME} infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate name: ${CLUSTER_NAME}-md-0 version: ${KUBERNETES_VERSION} --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureMachineTemplate metadata: name: ${CLUSTER_NAME}-md-0 @@ -192,7 +193,7 @@ spec: sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} vmSize: ${AZURE_NODE_MACHINE_TYPE} --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha4 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate metadata: name: ${CLUSTER_NAME}-md-0 @@ -201,13 +202,13 @@ spec: template: spec: files: - - contentFrom: - secret: - key: worker-node-azure.json - name: ${CLUSTER_NAME}-md-0-azure-json - owner: root:root - path: /etc/kubernetes/azure.json - permissions: "0644" + - contentFrom: + secret: + key: worker-node-azure.json + name: ${CLUSTER_NAME}-md-0-azure-json + owner: root:root + path: /etc/kubernetes/azure.json + permissions: "0644" joinConfiguration: nodeRegistration: kubeletExtraArgs: @@ -217,7 +218,92 @@ spec: name: '{{ ds.meta_data["local_hostname"] }}' preKubeadmCommands: [] --- -apiVersion: cluster.x-k8s.io/v1alpha4 +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachineDeployment +metadata: + name: ${CLUSTER_NAME}-md-win + namespace: default +spec: + clusterName: ${CLUSTER_NAME} + replicas: ${WINDOWS_WORKER_MACHINE_COUNT:-0} + selector: {} + template: + spec: + bootstrap: + configRef: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + name: ${CLUSTER_NAME}-md-win + clusterName: ${CLUSTER_NAME} + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: AzureMachineTemplate + name: ${CLUSTER_NAME}-md-win + version: ${KUBERNETES_VERSION} +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: AzureMachineTemplate +metadata: + annotations: + runtime: containerd + name: ${CLUSTER_NAME}-md-win + namespace: default +spec: + template: + spec: + osDisk: + diskSizeGB: 128 + managedDisk: + storageAccountType: Premium_LRS + osType: Windows + sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} + vmSize: ${AZURE_NODE_MACHINE_TYPE} +--- +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfigTemplate +metadata: + name: ${CLUSTER_NAME}-md-win + namespace: default +spec: + template: + spec: + files: + - contentFrom: + secret: + key: worker-node-azure.json + name: ${CLUSTER_NAME}-md-win-azure-json + owner: root:root + path: c:/k/azure.json + permissions: "0644" + - content: Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe + path: C:/defender-exclude-calico.ps1 + permissions: "0744" + - content: | + # /tmp is assumed created and required for upstream e2e tests to pass + New-Item -ItemType Directory -Force -Path C:\tmp\ + path: C:/create-temp-folder.ps1 + permissions: "0744" + joinConfiguration: + nodeRegistration: + criSocket: npipe:////./pipe/containerd-containerd + kubeletExtraArgs: + azure-container-registry-config: c:/k/azure.json + cloud-config: c:/k/azure.json + cloud-provider: azure + feature-gates: WindowsHostProcessContainers=true + name: '{{ ds.meta_data["local_hostname"] }}' + postKubeadmCommands: + - nssm set kubelet start SERVICE_AUTO_START + - powershell C:/defender-exclude-calico.ps1 + preKubeadmCommands: + - powershell C:/create-temp-folder.ps1 + users: + - groups: Administrators + name: capi + sshAuthorizedKeys: + - ${AZURE_SSH_PUBLIC_KEY:=""} +--- +apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineHealthCheck metadata: name: ${CLUSTER_NAME}-mhc-0 @@ -229,11 +315,11 @@ spec: matchLabels: nodepool: pool1 unhealthyConditions: - - status: "True" - timeout: 30s - type: E2ENodeUnhealthy + - status: "True" + timeout: 30s + type: E2ENodeUnhealthy --- -apiVersion: addons.cluster.x-k8s.io/v1alpha4 +apiVersion: addons.cluster.x-k8s.io/v1beta1 kind: ClusterResourceSet metadata: name: ${CLUSTER_NAME}-calico @@ -243,11 +329,11 @@ spec: matchLabels: cni: ${CLUSTER_NAME}-calico resources: - - kind: ConfigMap - name: cni-${CLUSTER_NAME}-calico + - kind: ConfigMap + name: cni-${CLUSTER_NAME}-calico strategy: ApplyOnce --- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4 +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AzureClusterIdentity metadata: labels: @@ -265,6 +351,26 @@ spec: --- apiVersion: v1 data: + proxy: "apiVersion: apps/v1\nkind: DaemonSet\nmetadata:\n labels:\n k8s-app: + kube-proxy\n name: kube-proxy-windows\n namespace: kube-system\nspec:\n selector:\n + \ matchLabels:\n k8s-app: kube-proxy-windows\n template:\n metadata:\n + \ labels:\n k8s-app: kube-proxy-windows\n spec:\n serviceAccountName: + kube-proxy\n securityContext:\n windowsOptions:\n hostProcess: + true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n hostNetwork: + true\n containers:\n - image: sigwindowstools/kube-proxy:${KUBERNETES_VERSION/+/_}-calico-hostprocess\n + \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/kube-proxy/start.ps1\"]\n + \ workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/kube-proxy/\"\n name: + kube-proxy\n env:\n - name: NODE_NAME\n valueFrom:\n fieldRef:\n + \ apiVersion: v1\n fieldPath: spec.nodeName\n - + name: POD_IP\n valueFrom:\n fieldRef:\n fieldPath: + status.podIP\n - name: KUBEPROXY_PATH\n valueFrom:\n configMapKeyRef:\n + \ name: windows-kubeproxy-ci\n key: KUBEPROXY_PATH\n + \ optional: true\n volumeMounts:\n - mountPath: /var/lib/kube-proxy\n + \ name: kube-proxy\n nodeSelector:\n kubernetes.io/os: windows\n + \ tolerations:\n - key: CriticalAddonsOnly\n operator: Exists\n + \ - operator: Exists\n volumes:\n - configMap:\n name: + kube-proxy\n item: \n name: kube-proxy\n updateStrategy:\n + \ type: RollingUpdate\n" resources: "---\n# Source: calico/templates/calico-config.yaml\n# This ConfigMap is used to configure a self-hosted Calico installation.\nkind: ConfigMap\napiVersion: v1\nmetadata:\n name: calico-config\n namespace: kube-system\ndata:\n # Typha @@ -2699,6 +2805,99 @@ data: calico-kube-controllers\nspec:\n maxUnavailable: 1\n selector:\n matchLabels:\n \ k8s-app: calico-kube-controllers\n---\n# Source: calico/templates/calico-etcd-secrets.yaml\n\n---\n# Source: calico/templates/calico-typha.yaml\n\n---\n# Source: calico/templates/configure-canal.yaml\n" + windows-cni: "# strictAffinity required for windows\napiVersion: crd.projectcalico.org/v1\nkind: + IPAMConfig\nmetadata:\n name: default\nspec:\n autoAllocateBlocks: true\n strictAffinity: + true\n---\nkind: ConfigMap\napiVersion: v1\nmetadata:\n name: calico-static-rules\n + \ namespace: kube-system\n labels:\n tier: node\n app: calico\ndata:\n + \ static-rules.json: |\n {\n \"Provider\": \"azure\",\n \"Version\": + \"0.1\",\n \"Rules\": [\n {\n \"Name\": \"EndpointPolicy\",\n + \ \"Rule\": {\n \"Id\": \"wireserver\",\n \"Type\": + \"ACL\",\n \"Protocol\": 6,\n \"Action\": \"Block\",\n + \ \"Direction\": \"Out\",\n \"RemoteAddresses\": \"168.63.129.16/32\",\n + \ \"RemotePorts\": \"80\",\n \"Priority\": 200,\n \"RuleType\": + \"Switch\"\n }\n }\n ]\n } \n---\nkind: ConfigMap\napiVersion: + v1\nmetadata:\n name: calico-config-windows\n namespace: kube-system\n labels:\n + \ tier: node\n app: calico\ndata:\n veth_mtu: \"1350\"\n \n cni_network_config: + |\n {\n \"name\": \"Calico\",\n \"cniVersion\": \"0.3.1\",\n \"plugins\": + [\n {\n \"windows_use_single_network\": true,\n \"type\": + \"calico\",\n \"mode\": \"vxlan\",\n \"nodename\": \"__KUBERNETES_NODE_NAME__\",\n + \ \"nodename_file_optional\": true,\n \"log_file_path\": \"c:/cni.log\",\n + \ \"log_level\": \"debug\",\n\n \"vxlan_mac_prefix\": \"0E-2A\",\n + \ \"vxlan_vni\": 4096,\n \"mtu\": __CNI_MTU__,\n \"policy\": + {\n \"type\": \"k8s\"\n },\n\n \"log_level\": \"info\",\n\n + \ \"capabilities\": {\"dns\": true},\n \"DNS\": {\n \"Search\": + \ [\n \"svc.cluster.local\"\n ]\n },\n\n \"datastore_type\": + \"kubernetes\",\n\n \"kubernetes\": {\n \"kubeconfig\": \"__KUBECONFIG_FILEPATH__\"\n + \ },\n\n \"ipam\": {\n \"type\": \"calico-ipam\",\n + \ \"subnet\": \"usePodCidr\"\n },\n\n \"policies\": + \ [\n {\n \"Name\": \"EndpointPolicy\",\n \"Value\": + \ {\n \"Type\": \"OutBoundNAT\",\n \"ExceptionList\": + \ [\n \"__K8S_SERVICE_CIDR__\"\n ]\n }\n + \ },\n {\n \"Name\": \"EndpointPolicy\",\n + \ \"Value\": {\n \"Type\": \"SDNROUTE\",\n \"DestinationPrefix\": + \ \"__K8S_SERVICE_CIDR__\",\n \"NeedEncap\": true\n }\n + \ }\n ]\n }\n ]\n\n }\n---\napiVersion: apps/v1\nkind: + DaemonSet\nmetadata:\n name: calico-node-windows\n labels:\n tier: node\n + \ app: calico\n namespace: kube-system\nspec:\n selector:\n matchLabels:\n + \ app: calico\n template:\n metadata:\n labels:\n tier: node\n + \ app: calico\n spec:\n affinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n + \ nodeSelectorTerms:\n - matchExpressions:\n - + key: kubernetes.io/os\n operator: In\n values:\n + \ - windows\n - key: kubernetes.io/arch\n + \ operator: In\n values:\n - + amd64\n securityContext:\n windowsOptions:\n hostProcess: + true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n hostNetwork: + true\n serviceAccountName: calico-node\n tolerations:\n - operator: + Exists\n effect: NoSchedule\n # Mark the pod as a critical add-on + for rescheduling.\n - key: CriticalAddonsOnly\n operator: Exists\n + \ - effect: NoExecute\n operator: Exists\n initContainers:\n # + This container installs the CNI binaries\n # and CNI network config file + on each node.\n - name: install-cni\n image: sigwindowstools/calico-install:v3.20.0-hostprocess\n + \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/install.ps1\"]\n + \ imagePullPolicy: Always\n env:\n # Name of the CNI + config file to create.\n - name: CNI_CONF_NAME\n value: + \"10-calico.conflist\"\n # The CNI network config to install on each + node.\n - name: CNI_NETWORK_CONFIG\n valueFrom:\n configMapKeyRef:\n + \ name: calico-config-windows\n key: cni_network_config\n + \ # Set the hostname based on the k8s node name.\n - name: + KUBERNETES_NODE_NAME\n valueFrom:\n fieldRef:\n fieldPath: + spec.nodeName\n # CNI MTU Config variable\n - name: CNI_MTU\n + \ valueFrom:\n configMapKeyRef:\n name: + calico-config-windows\n key: veth_mtu\n # Prevents + the container from sleeping forever.\n - name: SLEEP\n value: + \"false\"\n - name: K8S_SERVICE_CIDR\n value: \"10.96.0.0/12\"\n + \ volumeMounts:\n - mountPath: /host/opt/cni/bin\n name: + cni-bin-dir\n - mountPath: /host/etc/cni/net.d\n name: + cni-net-dir\n - name: kubeadm-config\n mountPath: /etc/kubeadm-config/\n + \ securityContext:\n windowsOptions:\n hostProcess: + true\n runAsUserName: \"NT AUTHORITY\\\\system\"\n containers:\n + \ - name: calico-node-startup\n image: sigwindowstools/calico-node:v3.20.0-hostprocess\n + \ args: [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/node-service.ps1\"]\n + \ workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/\"\n imagePullPolicy: + Always\n volumeMounts:\n - name: calico-config-windows\n mountPath: + /etc/kube-calico-windows/\n env:\n - name: POD_NAME\n valueFrom:\n + \ fieldRef:\n apiVersion: v1\n fieldPath: + metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n + \ apiVersion: v1\n fieldPath: metadata.namespace\n - + name: CNI_IPAM_TYPE\n value: \"calico-ipam\"\n - name: CALICO_NETWORKING_BACKEND\n + \ value: \"vxlan\"\n - name: KUBECONFIG\n value: \"C:/etc/cni/net.d/calico-kubeconfig\"\n + \ - name: VXLAN_VNI\n value: \"4096\"\n - name: calico-node-felix\n + \ image: sigwindowstools/calico-node:v3.20.0-hostprocess\n args: + [\"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/felix-service.ps1\"]\n imagePullPolicy: + Always\n workingDir: \"$env:CONTAINER_SANDBOX_MOUNT_POINT/calico/\"\n volumeMounts:\n + \ - name: calico-config-windows\n mountPath: /etc/kube-calico-windows/\n + \ - name: calico-static-rules\n mountPath: /calico/static-rules.json\n + \ subPath: static-rules.json\n env:\n - name: POD_NAME\n + \ valueFrom:\n fieldRef:\n apiVersion: v1\n fieldPath: + metadata.name\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n + \ apiVersion: v1\n fieldPath: metadata.namespace\n - + name: VXLAN_VNI\n value: \"4096\"\n - name: KUBECONFIG\n value: + \"C:/etc/cni/net.d/calico-kubeconfig\"\n volumes:\n - name: calico-config-windows\n + \ configMap:\n name: calico-config-windows\n - name: calico-static-rules\n + \ configMap:\n name: calico-static-rules\n # Used to install + CNI.\n - name: cni-bin-dir\n hostPath:\n path: /opt/cni/bin\n + \ - name: cni-net-dir\n hostPath:\n path: /etc/cni/net.d\n + \ - name: kubeadm-config\n configMap:\n name: kubeadm-config\n" kind: ConfigMap metadata: annotations: @@ -2706,4 +2905,4 @@ metadata: labels: type: generated name: cni-${CLUSTER_NAME}-calico - namespace: default \ No newline at end of file + namespace: default diff --git a/test/e2e/data/infrastructure-azure/v1alpha3/cluster-template-prow.yaml b/test/e2e/data/infrastructure-azure/v1alpha3/cluster-template-prow.yaml deleted file mode 100644 index fe24fe5857a..00000000000 --- a/test/e2e/data/infrastructure-azure/v1alpha3/cluster-template-prow.yaml +++ /dev/null @@ -1,241 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1alpha3 -kind: Cluster -metadata: - labels: - cni: ${CLUSTER_NAME}-crs-0 - name: ${CLUSTER_NAME} - namespace: default -spec: - clusterNetwork: - pods: - cidrBlocks: - - 192.168.0.0/16 - controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 - kind: KubeadmControlPlane - name: ${CLUSTER_NAME}-control-plane - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: AzureCluster - name: ${CLUSTER_NAME} ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 -kind: AzureCluster -metadata: - name: ${CLUSTER_NAME} - namespace: default -spec: - additionalTags: - creationTimestamp: ${TIMESTAMP} - jobName: ${JOB_NAME} - location: ${AZURE_LOCATION} - networkSpec: - vnet: - name: ${AZURE_VNET_NAME:=${CLUSTER_NAME}-vnet} - resourceGroup: ${AZURE_RESOURCE_GROUP:=${CLUSTER_NAME}} - subscriptionID: ${AZURE_SUBSCRIPTION_ID} ---- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha3 -kind: KubeadmControlPlane -metadata: - name: ${CLUSTER_NAME}-control-plane - namespace: default -spec: - infrastructureTemplate: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: AzureMachineTemplate - name: ${CLUSTER_NAME}-control-plane - kubeadmConfigSpec: - clusterConfiguration: - apiServer: - extraArgs: - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure - extraVolumes: - - hostPath: /etc/kubernetes/azure.json - mountPath: /etc/kubernetes/azure.json - name: cloud-config - readOnly: true - timeoutForControlPlane: 20m - controllerManager: - extraArgs: - allocate-node-cidrs: "false" - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure - cluster-name: ${CLUSTER_NAME} - v: "4" - extraVolumes: - - hostPath: /etc/kubernetes/azure.json - mountPath: /etc/kubernetes/azure.json - name: cloud-config - readOnly: true - etcd: - local: - dataDir: /var/lib/etcddisk/etcd - diskSetup: - filesystems: - - device: /dev/disk/azure/scsi1/lun0 - extraOpts: - - -E - - lazy_itable_init=1,lazy_journal_init=1 - filesystem: ext4 - label: etcd_disk - - device: ephemeral0.1 - filesystem: ext4 - label: ephemeral0 - replaceFS: ntfs - partitions: - - device: /dev/disk/azure/scsi1/lun0 - layout: true - overwrite: false - tableType: gpt - files: - - contentFrom: - secret: - key: control-plane-azure.json - name: ${CLUSTER_NAME}-control-plane-azure-json - owner: root:root - path: /etc/kubernetes/azure.json - permissions: "0644" - initConfiguration: - nodeRegistration: - kubeletExtraArgs: - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure - name: '{{ ds.meta_data["local_hostname"] }}' - joinConfiguration: - nodeRegistration: - kubeletExtraArgs: - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure - name: '{{ ds.meta_data["local_hostname"] }}' - mounts: - - - LABEL=etcd_disk - - /var/lib/etcddisk - replicas: ${CONTROL_PLANE_MACHINE_COUNT} - version: ${KUBERNETES_VERSION} ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 -kind: AzureMachineTemplate -metadata: - name: ${CLUSTER_NAME}-control-plane - namespace: default -spec: - template: - spec: - dataDisks: - - diskSizeGB: 256 - lun: 0 - nameSuffix: etcddisk - location: ${AZURE_LOCATION} - osDisk: - diskSizeGB: 128 - managedDisk: - storageAccountType: Premium_LRS - osType: Linux - sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} - vmSize: ${AZURE_CONTROL_PLANE_MACHINE_TYPE} ---- -apiVersion: cluster.x-k8s.io/v1alpha3 -kind: MachineDeployment -metadata: - name: ${CLUSTER_NAME}-md-0 - namespace: default -spec: - clusterName: ${CLUSTER_NAME} - replicas: ${WORKER_MACHINE_COUNT} - selector: - matchLabels: null - template: - metadata: - labels: - nodepool: pool1 - spec: - bootstrap: - configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 - kind: KubeadmConfigTemplate - name: ${CLUSTER_NAME}-md-0 - clusterName: ${CLUSTER_NAME} - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 - kind: AzureMachineTemplate - name: ${CLUSTER_NAME}-md-0 - version: ${KUBERNETES_VERSION} ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3 -kind: AzureMachineTemplate -metadata: - name: ${CLUSTER_NAME}-md-0 - namespace: default -spec: - template: - spec: - location: ${AZURE_LOCATION} - osDisk: - diskSizeGB: 128 - managedDisk: - storageAccountType: Premium_LRS - osType: Linux - sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""} - vmSize: ${AZURE_NODE_MACHINE_TYPE} ---- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3 -kind: KubeadmConfigTemplate -metadata: - name: ${CLUSTER_NAME}-md-0 - namespace: default -spec: - template: - spec: - files: - - contentFrom: - secret: - key: worker-node-azure.json - name: ${CLUSTER_NAME}-md-0-azure-json - owner: root:root - path: /etc/kubernetes/azure.json - permissions: "0644" - joinConfiguration: - nodeRegistration: - kubeletExtraArgs: - cloud-config: /etc/kubernetes/azure.json - cloud-provider: azure - name: '{{ ds.meta_data["local_hostname"] }}' ---- -apiVersion: cluster.x-k8s.io/v1alpha3 -kind: MachineHealthCheck -metadata: - name: ${CLUSTER_NAME}-mhc-0 - namespace: default -spec: - clusterName: ${CLUSTER_NAME} - maxUnhealthy: 100% - selector: - matchLabels: - nodepool: pool1 - unhealthyConditions: - - status: "True" - timeout: 30s - type: E2ENodeUnhealthy ---- -apiVersion: v1 -data: ${CNI_RESOURCES} -kind: ConfigMap -metadata: - name: cni-${CLUSTER_NAME}-crs-0 - namespace: default ---- -apiVersion: addons.cluster.x-k8s.io/v1alpha3 -kind: ClusterResourceSet -metadata: - name: ${CLUSTER_NAME}-crs-0 - namespace: default -spec: - clusterSelector: - matchLabels: - cni: ${CLUSTER_NAME}-crs-0 - resources: - - kind: ConfigMap - name: cni-${CLUSTER_NAME}-crs-0 - strategy: ApplyOnce diff --git a/test/e2e/data/shared/v1beta1/metadata.yaml b/test/e2e/data/shared/v1beta1/metadata.yaml index dc701bf7f62..a270758c7e0 100644 --- a/test/e2e/data/shared/v1beta1/metadata.yaml +++ b/test/e2e/data/shared/v1beta1/metadata.yaml @@ -16,12 +16,3 @@ releaseSeries: - major: 1 minor: 0 contract: v1beta1 - - major: 0 - minor: 4 - contract: v1alpha4 - - major: 0 - minor: 3 - contract: v1alpha3 - - major: 0 - minor: 2 - contract: v1alpha2 diff --git a/test/e2e/data/shared/v1beta1_provider/metadata.yaml b/test/e2e/data/shared/v1beta1_provider/metadata.yaml index f9bc96a9043..5c8393fbabb 100644 --- a/test/e2e/data/shared/v1beta1_provider/metadata.yaml +++ b/test/e2e/data/shared/v1beta1_provider/metadata.yaml @@ -7,9 +7,9 @@ # one capz version at a time against one API version apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 releaseSeries: - - major: 0 - minor: 5 - contract: v1alpha4 + - major: 1 + minor: 0 + contract: v1beta1 - major: 1 minor: 9 contract: v1beta1