From 594476d3354bead0f731211d2632e10bf56be8fc Mon Sep 17 00:00:00 2001 From: Pavan Neerudu Date: Sun, 25 Feb 2024 10:55:22 +0530 Subject: [PATCH 1/3] Remove old APIs to help with module import problems --- .../azurestackhcicluster_conversion.go | 54 - api/v1alpha3/azurestackhcicluster_types.go | 128 -- .../azurestackhciloadbalancer_conversion.go | 43 - .../azurestackhciloadbalancer_types.go | 187 --- .../azurestackhcimachine_conversion.go | 43 - api/v1alpha3/azurestackhcimachine_types.go | 146 -- ...azurestackhcimachinetemplate_conversion.go | 43 - .../azurestackhcimachinetemplate_types.go | 57 - .../azurestackhcivirtualmachine_conversion.go | 43 - .../azurestackhcivirtualmachine_types.go | 124 -- api/v1alpha3/conditions_consts.go | 82 -- api/v1alpha3/decode.go | 37 - api/v1alpha3/doc.go | 16 - api/v1alpha3/groupversion_info.go | 40 - api/v1alpha3/phase_types.go | 82 -- api/v1alpha3/types.go | 226 --- api/v1alpha3/zz_generated.conversion.go | 1277 ----------------- api/v1alpha3/zz_generated.deepcopy.go | 881 ------------ .../azurestackhcicluster_conversion.go | 54 - api/v1alpha4/azurestackhcicluster_types.go | 128 -- .../azurestackhciloadbalancer_conversion.go | 43 - .../azurestackhciloadbalancer_types.go | 187 --- .../azurestackhcimachine_conversion.go | 43 - api/v1alpha4/azurestackhcimachine_types.go | 146 -- ...azurestackhcimachinetemplate_conversion.go | 43 - .../azurestackhcimachinetemplate_types.go | 57 - .../azurestackhcivirtualmachine_conversion.go | 43 - .../azurestackhcivirtualmachine_types.go | 124 -- api/v1alpha4/conditions_consts.go | 82 -- api/v1alpha4/decode.go | 37 - api/v1alpha4/doc.go | 16 - api/v1alpha4/groupversion_info.go | 40 - api/v1alpha4/phase_types.go | 82 -- api/v1alpha4/types.go | 226 --- api/v1alpha4/zz_generated.conversion.go | 1277 ----------------- api/v1alpha4/zz_generated.deepcopy.go | 881 ------------ cmd/manager/main.go | 4 - 37 files changed, 7022 deletions(-) delete mode 100644 api/v1alpha3/azurestackhcicluster_conversion.go delete mode 100644 api/v1alpha3/azurestackhcicluster_types.go delete mode 100644 api/v1alpha3/azurestackhciloadbalancer_conversion.go delete mode 100644 api/v1alpha3/azurestackhciloadbalancer_types.go delete mode 100644 api/v1alpha3/azurestackhcimachine_conversion.go delete mode 100644 api/v1alpha3/azurestackhcimachine_types.go delete mode 100644 api/v1alpha3/azurestackhcimachinetemplate_conversion.go delete mode 100644 api/v1alpha3/azurestackhcimachinetemplate_types.go delete mode 100644 api/v1alpha3/azurestackhcivirtualmachine_conversion.go delete mode 100644 api/v1alpha3/azurestackhcivirtualmachine_types.go delete mode 100644 api/v1alpha3/conditions_consts.go delete mode 100644 api/v1alpha3/decode.go delete mode 100644 api/v1alpha3/doc.go delete mode 100644 api/v1alpha3/groupversion_info.go delete mode 100644 api/v1alpha3/phase_types.go delete mode 100644 api/v1alpha3/types.go delete mode 100644 api/v1alpha3/zz_generated.conversion.go delete mode 100644 api/v1alpha3/zz_generated.deepcopy.go delete mode 100644 api/v1alpha4/azurestackhcicluster_conversion.go delete mode 100644 api/v1alpha4/azurestackhcicluster_types.go delete mode 100644 api/v1alpha4/azurestackhciloadbalancer_conversion.go delete mode 100644 api/v1alpha4/azurestackhciloadbalancer_types.go delete mode 100644 api/v1alpha4/azurestackhcimachine_conversion.go delete mode 100644 api/v1alpha4/azurestackhcimachine_types.go delete mode 100644 api/v1alpha4/azurestackhcimachinetemplate_conversion.go delete mode 100644 api/v1alpha4/azurestackhcimachinetemplate_types.go delete mode 100644 api/v1alpha4/azurestackhcivirtualmachine_conversion.go delete mode 100644 api/v1alpha4/azurestackhcivirtualmachine_types.go delete mode 100644 api/v1alpha4/conditions_consts.go delete mode 100644 api/v1alpha4/decode.go delete mode 100644 api/v1alpha4/doc.go delete mode 100644 api/v1alpha4/groupversion_info.go delete mode 100644 api/v1alpha4/phase_types.go delete mode 100644 api/v1alpha4/types.go delete mode 100644 api/v1alpha4/zz_generated.conversion.go delete mode 100644 api/v1alpha4/zz_generated.deepcopy.go diff --git a/api/v1alpha3/azurestackhcicluster_conversion.go b/api/v1alpha3/azurestackhcicluster_conversion.go deleted file mode 100644 index 8944db48..00000000 --- a/api/v1alpha3/azurestackhcicluster_conversion.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - apiconversion "k8s.io/apimachinery/pkg/conversion" - clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCICluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCICluster) - return Convert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(src, dst, nil) -} - -func (dst *AzureStackHCICluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCICluster) - return Convert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster(src, dst, nil) -} - -func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in *clusterv1alpha3.APIEndpoint, out *clusterv1beta1.APIEndpoint, s apiconversion.Scope) error { - return clusterv1alpha3.Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in *clusterv1beta1.APIEndpoint, out *clusterv1alpha3.APIEndpoint, s apiconversion.Scope) error { - return clusterv1alpha3.Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(in, out, s) -} - -func (src *AzureStackHCIClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIClusterList) - return Convert_v1alpha3_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(src, dst, nil) -} - -func (dst *AzureStackHCIClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIClusterList) - return Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha3_AzureStackHCIClusterList(src, dst, nil) -} diff --git a/api/v1alpha3/azurestackhcicluster_types.go b/api/v1alpha3/azurestackhcicluster_types.go deleted file mode 100644 index ee610a9a..00000000 --- a/api/v1alpha3/azurestackhcicluster_types.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" -) - -const ( - // ClusterFinalizer allows ReconcileAzureStackHCICluster to clean up Azure resources associated with AzureStackHCICluster before - // removing it from the apiserver. - ClusterFinalizer = "azurestackhcicluster.infrastructure.cluster.x-k8s.io" -) - -// AzureStackHCIClusterSpec defines the desired state of AzureStackHCICluster -type AzureStackHCIClusterSpec struct { - // NetworkSpec encapsulates all things related to Azure network. - NetworkSpec NetworkSpec `json:"networkSpec,omitempty"` - - ResourceGroup string `json:"resourceGroup"` - - Location string `json:"location"` - - // AzureStackHCILoadBalancer is used to declare the AzureStackHCILoadBalancerSpec if a LoadBalancer is desired for the AzureStackHCICluster. - AzureStackHCILoadBalancer *AzureStackHCILoadBalancerSpec `json:"azureStackHCILoadBalancer,omitempty"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` - - // Version indicates the desired Kubernetes version of the cluster. - Version *string `json:"version"` - - // Management is true when the cluster is a Management Cluster. - Management bool `json:"management,omitempty"` -} - -// AzureStackHCIClusterStatus defines the observed state of AzureStackHCICluster -type AzureStackHCIClusterStatus struct { - Bastion VM `json:"bastion,omitempty"` - - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Phase represents the current phase of cluster actuation. - // E.g. Pending, Running, Terminating, Failed etc. - // +optional - Phase string `json:"phase,omitempty"` - - // Conditions defines current service state of the AzureStackHCICluster. - // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` -} - -// SetTypedPhase sets the Phase field to the string representation of AzureStackHCIClusterPhase. -func (c *AzureStackHCIClusterStatus) SetTypedPhase(p AzureStackHCIClusterPhase) { - c.Phase = string(p) -} - -// GetTypedPhase attempts to parse the Phase field and return -// the typed AzureStackHCIClusterPhase representation as described in `types.go`. -func (c *AzureStackHCIClusterStatus) GetTypedPhase() AzureStackHCIClusterPhase { - switch phase := AzureStackHCIClusterPhase(c.Phase); phase { - case - AzureStackHCIClusterPhasePending, - AzureStackHCIClusterPhaseProvisioning, - AzureStackHCIClusterPhaseProvisioned, - AzureStackHCIClusterPhaseDeleting, - AzureStackHCIClusterPhaseFailed: - return phase - default: - return AzureStackHCIClusterPhaseUnknown - } -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhciclusters,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="AzureStackHCICluster status such as Pending/Provisioning/Provisioned/Deleting/Failed" - -// AzureStackHCICluster is the Schema for the azurestackhciclusters API -type AzureStackHCICluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIClusterSpec `json:"spec,omitempty"` - Status AzureStackHCIClusterStatus `json:"status,omitempty"` -} - -// GetConditions returns the list of conditions for AzureStackHCICluster. -func (c *AzureStackHCICluster) GetConditions() clusterv1.Conditions { - return c.Status.Conditions -} - -// SetConditions sets the conditions for AzureStackHCICluster. -func (c *AzureStackHCICluster) SetConditions(conditions clusterv1.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// AzureStackHCIClusterList contains a list of AzureStackHCICluster -type AzureStackHCIClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCICluster `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCICluster{}, &AzureStackHCIClusterList{}) -} diff --git a/api/v1alpha3/azurestackhciloadbalancer_conversion.go b/api/v1alpha3/azurestackhciloadbalancer_conversion.go deleted file mode 100644 index b5aa0244..00000000 --- a/api/v1alpha3/azurestackhciloadbalancer_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCILoadBalancer) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCILoadBalancer) - return Convert_v1alpha3_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(src, dst, nil) -} - -func (dst *AzureStackHCILoadBalancer) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCILoadBalancer) - return Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha3_AzureStackHCILoadBalancer(src, dst, nil) -} - -func (src *AzureStackHCILoadBalancerList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCILoadBalancerList) - return Convert_v1alpha3_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(src, dst, nil) -} - -func (dst *AzureStackHCILoadBalancerList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCILoadBalancerList) - return Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha3_AzureStackHCILoadBalancerList(src, dst, nil) -} diff --git a/api/v1alpha3/azurestackhciloadbalancer_types.go b/api/v1alpha3/azurestackhciloadbalancer_types.go deleted file mode 100644 index 394861c6..00000000 --- a/api/v1alpha3/azurestackhciloadbalancer_types.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // AzureStackHCILoadBalancerFinalizer allows ReconcileLoadBalancer to clean up the load balancer resources before removing it from the apiserver. - AzureStackHCILoadBalancerFinalizer = "azurestackhciloadbalancer.infrastructure.cluster.x-k8s.io" -) - -type AzureStackHCILoadBalancerSpec struct { - SSHPublicKey string `json:"sshPublicKey"` - Image Image `json:"image"` - VMSize string `json:"vmSize"` - - // Number of desired loadbalancer machines. Defaults to 1. - // This is a pointer to distinguish between explicit zero and not specified. - // +optional - // +kubebuilder:default=1 - Replicas *int32 `json:"replicas,omitempty"` -} - -type AzureStackHCILoadBalancerStatus struct { - // +optional - Ready bool `json:"ready,omitempty"` - - // Total number of non-terminated replicas for this loadbalancer - // +optional - Replicas int32 `json:"replicas,omitempty"` - - // Total number of ready (service connected) replicas for this loadbalancer - // +optional - ReadyReplicas int32 `json:"readyReplicas,omitempty"` - - // Total number of failed replicas for this loadbalancer. - // +optional - FailedReplicas int32 `json:"failedReplicas,omitempty"` - - // Address is the IP address of the load balancer. - // +optional - Address string `json:"address,omitempty"` - - // Port is the port of the azureStackHCIloadbalancers frontend. - Port int32 `json:"port,omitempty"` - - // Phase represents the current phase of loadbalancer actuation. - // E.g. Pending, Running, Terminating, Failed etc. - // +optional - Phase string `json:"phase,omitempty"` - - // Conditions defines current service state of the AzureStackHCILoadBalancer. - // +optional - Conditions clusterv1.Conditions `json:"conditions,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 - ErrorReason *errors.MachineStatusError `json:"errorReason,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 - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Selector is the label selector in string format to avoid introspection - // by clients, and is used to provide the CRD-based integration for the - // scale subresource and additional integrations for things like kubectl - // describe.. The string will be in the same format as the query-param syntax. - // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - // +optional - Selector string `json:"selector,omitempty"` -} - -// SetTypedPhase sets the Phase field to the string representation of AzureStackHCILoadBalancerPhase -func (c *AzureStackHCILoadBalancerStatus) SetTypedPhase(p AzureStackHCILoadBalancerPhase) { - c.Phase = string(p) -} - -// GetTypedPhase attempts to parse the Phase field and return -// the typed AzureStackHCILoadBalancerPhase representation as described in `types.go`. -func (c *AzureStackHCILoadBalancerStatus) GetTypedPhase() AzureStackHCILoadBalancerPhase { - switch phase := AzureStackHCILoadBalancerPhase(c.Phase); phase { - case - AzureStackHCILoadBalancerPhasePending, - AzureStackHCILoadBalancerPhaseProvisioning, - AzureStackHCILoadBalancerPhaseProvisioned, - AzureStackHCILoadBalancerPhaseScaling, - AzureStackHCILoadBalancerPhaseUpgrading, - AzureStackHCILoadBalancerPhaseDeleting, - AzureStackHCILoadBalancerPhaseFailed: - return phase - default: - return AzureStackHCILoadBalancerPhaseUnknown - } -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhciloadbalancers,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector -// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current phase/status of the loadbalancer" -// +kubebuilder:printcolumn:name="IP",type="string",JSONPath=".status.address",description="The frontend VIP address assigned to the loadbalancer" -// +kubebuilder:printcolumn:name="Port",type="integer",JSONPath=".status.port",description="The frontend port assigned to the loadbalancer" -// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.replicas",description="Total number of desired machine replicas for this loadbalancer" -// +kubebuilder:printcolumn:name="Created",type="integer",JSONPath=".status.replicas",description="Total number of machine replicas created to service this loadbalancer" -// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of machine replicas that are actively connected to the loadbalancer service" -// +kubebuilder:printcolumn:name="Unavailable",type="integer",JSONPath=".status.failedReplicas",description="Total number of machine replicas that are in a failed or unavailable state" - -// AzureStackHCILoadBalancer is the Schema for the azurestackhciloadbalancers API -type AzureStackHCILoadBalancer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCILoadBalancerSpec `json:"spec,omitempty"` - Status AzureStackHCILoadBalancerStatus `json:"status,omitempty"` -} - -// GetConditions returns the list of conditions for AzureStackHCILoadBalancer. -func (c *AzureStackHCILoadBalancer) GetConditions() clusterv1.Conditions { - return c.Status.Conditions -} - -// SetConditions sets the conditions for AzureStackHCILoadBalancer. -func (c *AzureStackHCILoadBalancer) SetConditions(conditions clusterv1.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// AzureStackHCILoadBalancerList contains a list of AzureStackHCILoadBalancers -type AzureStackHCILoadBalancerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCILoadBalancer `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCILoadBalancer{}, &AzureStackHCILoadBalancerList{}) -} diff --git a/api/v1alpha3/azurestackhcimachine_conversion.go b/api/v1alpha3/azurestackhcimachine_conversion.go deleted file mode 100644 index 62b8b801..00000000 --- a/api/v1alpha3/azurestackhcimachine_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCIMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachine) - return Convert_v1alpha3_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(src, dst, nil) -} - -func (dst *AzureStackHCIMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachine) - return Convert_v1beta1_AzureStackHCIMachine_To_v1alpha3_AzureStackHCIMachine(src, dst, nil) -} - -func (src *AzureStackHCIMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachineList) - return Convert_v1alpha3_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(src, dst, nil) -} - -func (dst *AzureStackHCIMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachineList) - return Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha3_AzureStackHCIMachineList(src, dst, nil) -} diff --git a/api/v1alpha3/azurestackhcimachine_types.go b/api/v1alpha3/azurestackhcimachine_types.go deleted file mode 100644 index 70170b20..00000000 --- a/api/v1alpha3/azurestackhcimachine_types.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // MachineFinalizer allows ReconcileAzureStackHCIMachine to clean up Azure resources associated with AzureStackHCIMachine before - // removing it from the apiserver. - MachineFinalizer = "azurestackhcimachine.infrastructure.cluster.x-k8s.io" -) - -// AzureStackHCIMachineSpec defines the desired state of AzureStackHCIMachine -type AzureStackHCIMachineSpec struct { - // ProviderID is the unique identifier as specified by the cloud provider. - // +optional - ProviderID *string `json:"providerID,omitempty"` - - VMSize string `json:"vmSize"` - - AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` - - Image Image `json:"image,omitempty"` - - OSDisk OSDisk `json:"osDisk,omitempty"` - - Location string `json:"location"` - - SSHPublicKey string `json:"sshPublicKey"` - - // AllocatePublicIP allows the ability to create dynamic public ips for machines where this value is true. - // +optional - AllocatePublicIP bool `json:"allocatePublicIP,omitempty"` - - AdditionalSSHKeys []string `json:"additionalSSHKeys,omitempty"` -} - -// AzureStackHCIMachineStatus defines the observed state of AzureStackHCIMachine -type AzureStackHCIMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the Azure instance associated addresses. - Addresses []v1.NodeAddress `json:"addresses,omitempty"` - - // VMState is the provisioning state of the Azure virtual machine. - // +optional - VMState *VMState `json:"vmState,omitempty"` - - // Conditions defines current service state of the AzureStackHCIMachine. - // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a succinct value suitable - // for machine interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // FailureMessage will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhcimachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureStackHCIMachine is the Schema for the azurestackhcimachines API -type AzureStackHCIMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIMachineSpec `json:"spec,omitempty"` - Status AzureStackHCIMachineStatus `json:"status,omitempty"` -} - -func (c *AzureStackHCIMachine) GetConditions() clusterv1.Conditions { - return c.Status.Conditions -} - -func (c *AzureStackHCIMachine) SetConditions(conditions clusterv1.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// AzureStackHCIMachineList contains a list of AzureStackHCIMachine -type AzureStackHCIMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCIMachine `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCIMachine{}, &AzureStackHCIMachineList{}) -} diff --git a/api/v1alpha3/azurestackhcimachinetemplate_conversion.go b/api/v1alpha3/azurestackhcimachinetemplate_conversion.go deleted file mode 100644 index 3610f990..00000000 --- a/api/v1alpha3/azurestackhcimachinetemplate_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCIMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachineTemplate) - return Convert_v1alpha3_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(src, dst, nil) -} - -func (dst *AzureStackHCIMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachineTemplate) - return Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha3_AzureStackHCIMachineTemplate(src, dst, nil) -} - -func (src *AzureStackHCIMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachineTemplateList) - return Convert_v1alpha3_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(src, dst, nil) -} - -func (dst *AzureStackHCIMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachineTemplateList) - return Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha3_AzureStackHCIMachineTemplateList(src, dst, nil) -} diff --git a/api/v1alpha3/azurestackhcimachinetemplate_types.go b/api/v1alpha3/azurestackhcimachinetemplate_types.go deleted file mode 100644 index f91c1837..00000000 --- a/api/v1alpha3/azurestackhcimachinetemplate_types.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" -) - -// AzureStackHCIMachineTemplateSpec defines the desired state of AzureStackHCIMachineTemplate -type AzureStackHCIMachineTemplateSpec struct { - Template AzureStackHCIMachineTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhcimachinetemplates,scope=Namespaced,categories=cluster-api - -// AzureStackHCIMachineTemplate is the Schema for the azurestackhcimachinetemplates API -type AzureStackHCIMachineTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIMachineTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureStackHCIMachineTemplateList contains a list of AzureStackHCIMachineTemplate -type AzureStackHCIMachineTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCIMachineTemplate `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCIMachineTemplate{}, &AzureStackHCIMachineTemplateList{}) -} - -// AzureStackHCIMachineTemplateResource describes the data needed to create an AzureStackHCIMachine from a template -type AzureStackHCIMachineTemplateResource struct { - // Spec is the specification of the desired behavior of the machine. - Spec AzureStackHCIMachineSpec `json:"spec"` -} diff --git a/api/v1alpha3/azurestackhcivirtualmachine_conversion.go b/api/v1alpha3/azurestackhcivirtualmachine_conversion.go deleted file mode 100644 index 22e7d9ff..00000000 --- a/api/v1alpha3/azurestackhcivirtualmachine_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCIVirtualMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIVirtualMachine) - return Convert_v1alpha3_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(src, dst, nil) -} - -func (dst *AzureStackHCIVirtualMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIVirtualMachine) - return Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha3_AzureStackHCIVirtualMachine(src, dst, nil) -} - -func (src *AzureStackHCIVirtualMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIVirtualMachineList) - return Convert_v1alpha3_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(src, dst, nil) -} - -func (dst *AzureStackHCIVirtualMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIVirtualMachineList) - return Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIVirtualMachineList(src, dst, nil) -} diff --git a/api/v1alpha3/azurestackhcivirtualmachine_types.go b/api/v1alpha3/azurestackhcivirtualmachine_types.go deleted file mode 100644 index a55eb059..00000000 --- a/api/v1alpha3/azurestackhcivirtualmachine_types.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - v1core "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // VirtualMachineFinalizer allows ReconcileVirtualAzureStackHCIMachine to clean up AzureStackHCI resources associated with VirtualAzureStackHCIMachine before - // removing it from the apiserver. - VirtualMachineFinalizer = "azurestackhcivirtualmachine.infrastructure.cluster.x-k8s.io" -) - -// AzureStackHCIVirtualMachineSpec defines the desired state of AzureStackHCIVirtualMachine -type AzureStackHCIVirtualMachineSpec struct { - VMSize string `json:"vmSize"` - AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` - Image Image `json:"image"` - OSDisk OSDisk `json:"osDisk,omitempty"` - BootstrapData *string `json:"bootstrapData,omitempty"` - Identity VMIdentity `json:"identity,omitempty"` - Location string `json:"location"` // does location belong here? - SSHPublicKey string `json:"sshPublicKey"` - - // come from the cluster scope for machine and lb controller creation path - ResourceGroup string `json:"resourceGroup"` - VnetName string `json:"vnetName"` - ClusterName string `json:"clusterName"` - SubnetName string `json:"subnetName"` - BackendPoolNames []string `json:"backendPoolNames,omitempty"` - - AdditionalSSHKeys []string `json:"additionalSSHKeys,omitempty"` -} - -// AzureStackHCIVirtualMachineStatus defines the observed state of AzureStackHCIVirtualMachine -type AzureStackHCIVirtualMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the AzureStackHCI instance associated addresses. - Addresses []v1core.NodeAddress `json:"addresses,omitempty"` - - // VMState is the provisioning state of the AzureStackHCI virtual machine. - // +optional - VMState *VMState `json:"vmState,omitempty"` - - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the AzureStackHCIVirtualMachine. - // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhcivirtualmachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureStackHCIVirtualMachine is the Schema for the azurestackhcivirtualmachines API -type AzureStackHCIVirtualMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIVirtualMachineSpec `json:"spec,omitempty"` - Status AzureStackHCIVirtualMachineStatus `json:"status,omitempty"` -} - -// GetConditions returns the list of conditions for the AzureStackHCIVirtualMachine. -func (m *AzureStackHCIVirtualMachine) GetConditions() clusterv1.Conditions { - return m.Status.Conditions -} - -// SetConditions sets the conditions for the AzureStackHCIVirtualMachine. -func (m *AzureStackHCIVirtualMachine) SetConditions(conditions clusterv1.Conditions) { - m.Status.Conditions = conditions -} - -// VirtualMachinesByCreationTimestamp sorts a list of AzureStackHCIVirtualMachine by creation timestamp, using their names as a tie breaker. -type VirtualMachinesByCreationTimestamp []*AzureStackHCIVirtualMachine - -func (o VirtualMachinesByCreationTimestamp) Len() int { return len(o) } -func (o VirtualMachinesByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } -func (o VirtualMachinesByCreationTimestamp) Less(i, j int) bool { - if o[i].CreationTimestamp.Equal(&o[j].CreationTimestamp) { - return o[i].Name < o[j].Name - } - return o[i].CreationTimestamp.Before(&o[j].CreationTimestamp) -} - -// +kubebuilder:object:root=true - -// AzureStackHCIVirtualMachineList contains a list of AzureStackHCIVirtualMachine -type AzureStackHCIVirtualMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCIVirtualMachine `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCIVirtualMachine{}, &AzureStackHCIVirtualMachineList{}) -} diff --git a/api/v1alpha3/conditions_consts.go b/api/v1alpha3/conditions_consts.go deleted file mode 100644 index 78637d05..00000000 --- a/api/v1alpha3/conditions_consts.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3" - -// Conditions and condition Reasons for the AzureStackHCIVirtualMachine object - -const ( - // VMRunningCondition reports on current status of the AzureStackHCIVirtualMachine. - VMRunningCondition clusterv1.ConditionType = "VMRunning" - // VMUpdatingReason used when the vm updating is in progress. - VMUpdatingReason = "VMUpdating" - // VMProvisionFailedReason used for failures during vm provisioning. - VMProvisionFailedReason = "VMProvisionFailed" - // VMNotFoundReason used when the vm couldn't be retrieved. - VMNotFoundReason = "VMNotFound" - // OutOfMemoryReason used when the AzureStackHCI resource is out of memory. - OutOfMemoryReason = "OutOfMemory" - // OutOfCapacityReason used when the AzureStackHCI resource is out of capacity. - OutOfCapacityReason = "OutOfCapacity" -) - -// Conditions and condition Reasons for the AzureStackHCICluster object - -const ( - // NetworkInfrastructureReadyCondition reports on current status of the AzureStackHCICluster - NetworkInfrastructureReadyCondition clusterv1.ConditionType = "NetworkInfrastructureReady" - // ClusterReconciliationFailedReason used for failures during cluster reconciliation. - ClusterReconciliationFailedReason = "ClusterReconciliationFailed" - // LoadBalancerProvisioningReason used for provisioning of lb - LoadBalancerProvisioningReason = "LoadBalancerProvisioning" - // LoadBalancerDeletingReason used when waiting on lbs to be deleted - LoadBalancerDeletingReason = "LoadBalancerDeleting" - // AzureStackHCIMachinesDeletingReason used when waiting on machines to be deleted - AzureStackHCIMachinesDeletingReason = "AzureStackHCIMachineDeleting" -) - -// Conditions and condition Reasons for the AzureStackHCILoadBalancer object - -const ( - // LoadBalancerInfrastructureReadyCondition reports on current status of the AzureStackHCILoadBalancer - LoadBalancerInfrastructureReadyCondition clusterv1.ConditionType = "LoadBalancerInfrastructureReady" - // LoadBalancerServiceReconciliationFailedReason used for service failures during loadbalancer reconciliation. - LoadBalancerServiceReconciliationFailedReason = "ServiceReconciliationFailed" - // LoadBalancerServiceStatusFailedReason used for service status failures. - LoadBalancerServiceStatusFailedReason = "ServiceStatusFailed" - // LoadBalancerMachineReconciliationFailedReason used for machine failures during loadbalancer reconciliation. - LoadBalancerMachineReconciliationFailedReason = "MachineReconciliationFailed" - // LoadBalancerAddressUnavailableReason used when waiting for loadbalancer to have an address. - LoadBalancerAddressUnavailableReason = "AddressUnavailable" - // LoadBalancerNoReplicasReadyReason used when no replicas are in a ready state. - LoadBalancerNoReplicasReadyReason = "NoReplicasReady" - - // LoadBalancerReplicasReadyCondition reports on current status of the AzureStackHCILoadBalancer machine replicas - LoadBalancerReplicasReadyCondition clusterv1.ConditionType = "LoadBalancerReplicasReady" - // LoadBalancerWaitingForReplicasReadyReason used when we are waiting for replicas to be ready. - LoadBalancerWaitingForReplicasReadyReason = "WaitingForReplicasToBeReady" - // LoadBalancerReplicasScalingUpReason used when we are scaling up the replicas. - LoadBalancerReplicasScalingUpReason = "ScalingUp" - // LoadBalancerReplicasScalingDownReason used when we are scaling down the replicas. - LoadBalancerReplicasScalingDownReason = "ScalingDown" - // LoadBalancerReplicasUpgradingReason used when we are upgrading the replicas. - LoadBalancerReplicasUpgradingReason = "Upgrading" - // LoadBalancerReplicasFailedReason used when we have failed replicas. - LoadBalancerReplicasFailedReason = "FailedReplicas" -) diff --git a/api/v1alpha3/decode.go b/api/v1alpha3/decode.go deleted file mode 100644 index 44802bfe..00000000 --- a/api/v1alpha3/decode.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -// DecodeRawExtension will decode a runtime.RawExtension into a specific runtime object based on the schema -func DecodeRawExtension(in *runtime.RawExtension, out runtime.Object) error { - scheme, err := SchemeBuilder.Build() - if err != nil { - return errors.Wrap(err, "Error building schema") - } - - codecs := serializer.NewCodecFactory(scheme) - deserializer := codecs.UniversalDeserializer() - - return runtime.DecodeInto(deserializer, in.Raw, out) -} diff --git a/api/v1alpha3/doc.go b/api/v1alpha3/doc.go deleted file mode 100644 index 984e63bd..00000000 --- a/api/v1alpha3/doc.go +++ /dev/null @@ -1,16 +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=github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1 diff --git a/api/v1alpha3/groupversion_info.go b/api/v1alpha3/groupversion_info.go deleted file mode 100644 index ea9c0191..00000000 --- a/api/v1alpha3/groupversion_info.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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/phase_types.go b/api/v1alpha3/phase_types.go deleted file mode 100644 index 8e7606ca..00000000 --- a/api/v1alpha3/phase_types.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 - -type AzureStackHCIClusterPhase string - -const ( - // AzureStackHCIClusterPhasePending is the first state a Cluster is assigned by - // Cluster API Cluster controller after being created. - AzureStackHCIClusterPhasePending = AzureStackHCIClusterPhase("pending") - - // AzureStackHCIClusterPhaseProvisioning is the state when the Cluster has a provider infrastructure - // object associated and can start provisioning. - AzureStackHCIClusterPhaseProvisioning = AzureStackHCIClusterPhase("provisioning") - - // AzureStackHCIClusterPhaseProvisioned is the state when its - // infrastructure has been created and configured. - AzureStackHCIClusterPhaseProvisioned = AzureStackHCIClusterPhase("provisioned") - - // AzureStackHCIClusterPhaseDeleting is the Cluster state when a delete - // request has been sent to the API Server, - // but its infrastructure has not yet been fully deleted. - AzureStackHCIClusterPhaseDeleting = AzureStackHCIClusterPhase("deleting") - - // AzureStackHCIClusterPhaseFailed is the Cluster state when the system - // might require user intervention. - AzureStackHCIClusterPhaseFailed = AzureStackHCIClusterPhase("failed") - - // AzureStackHCIClusterPhaseUpgrading is the Cluster state when the system - // is in the middle of a update. - AzureStackHCIClusterPhaseUpgrading = AzureStackHCIClusterPhase("upgrading") - - // AzureStackHCIClusterPhaseUnknown is returned if the Cluster state cannot be determined. - AzureStackHCIClusterPhaseUnknown = AzureStackHCIClusterPhase("") -) - -type AzureStackHCILoadBalancerPhase string - -const ( - // AzureStackHCILoadBalancerPhasePending is the first state a LoadBalancer is assigned by - // the controller after being created. - AzureStackHCILoadBalancerPhasePending = AzureStackHCILoadBalancerPhase("pending") - - // AzureStackHCILoadBalancerPhaseProvisioning is the state when the LoadBalancer is waiting for the - // first replica to be ready. - AzureStackHCILoadBalancerPhaseProvisioning = AzureStackHCILoadBalancerPhase("provisioning") - - // AzureStackHCILoadBalancerPhaseProvisioned is the state when its infrastructure has been created - // and configured. All replicas are ready and we have the desired number of replicas. - AzureStackHCILoadBalancerPhaseProvisioned = AzureStackHCILoadBalancerPhase("provisioned") - - // AzureStackHCILoadBalancerPhaseScaling is the state when replicas are being scaled. - AzureStackHCILoadBalancerPhaseScaling = AzureStackHCILoadBalancerPhase("scaling") - - // AzureStackHCILoadBalancerPhaseUpgrading is the state when the system is in the middle of a update. - AzureStackHCILoadBalancerPhaseUpgrading = AzureStackHCILoadBalancerPhase("upgrading") - - // AzureStackHCILoadBalancerPhaseDeleting is the state when a delete request has been sent to - // the API Server, but its infrastructure has not yet been fully deleted. - AzureStackHCILoadBalancerPhaseDeleting = AzureStackHCILoadBalancerPhase("deleting") - - // AzureStackHCILoadBalancerPhaseFailed is the state when the system might require user intervention. - AzureStackHCILoadBalancerPhaseFailed = AzureStackHCILoadBalancerPhase("failed") - - // AzureStackHCILoadBalancerPhaseUnknown is returned if the state cannot be determined. - AzureStackHCILoadBalancerPhaseUnknown = AzureStackHCILoadBalancerPhase("") -) diff --git a/api/v1alpha3/types.go b/api/v1alpha3/types.go deleted file mode 100644 index a130d237..00000000 --- a/api/v1alpha3/types.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" -) - -// AzureStackHCIResourceReference is a reference to a specific Azure resource by ID -type AzureStackHCIResourceReference struct { - // ID of resource - // +optional - ID *string `json:"id,omitempty"` -} - -// AzureStackHCIMachineProviderConditionType is a valid value for AzureStackHCIMachineProviderCondition.Type -type AzureStackHCIMachineProviderConditionType string - -// Valid conditions for an Azure machine instance -const ( - // MachineCreated indicates whether the machine has been created or not. If not, - // it should include a reason and message for the failure. - MachineCreated AzureStackHCIMachineProviderConditionType = "MachineCreated" -) - -// AzureStackHCIMachineProviderCondition is a condition in a AzureStackHCIMachineProviderStatus -type AzureStackHCIMachineProviderCondition struct { - // Type is the type of the condition. - Type AzureStackHCIMachineProviderConditionType `json:"type"` - // Status is the status of the condition. - Status corev1.ConditionStatus `json:"status"` - // LastProbeTime is the last time we probed the condition. - // +optional - LastProbeTime metav1.Time `json:"lastProbeTime"` - // LastTransitionTime is the last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime"` - // Reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason"` - // Message is a human-readable message indicating details about last transition. - // +optional - Message string `json:"message"` -} - -const ( - // ControlPlane machine label - ControlPlane string = "control-plane" - // Node machine label - Node string = "node" -) - -// NetworkSpec encapsulates all things related to Azure network. -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"` -} - -// VnetSpec configures an Azure virtual network. -type VnetSpec struct { - // 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. - CidrBlock string `json:"cidrBlock,omitempty"` - - // Group is the resource group the vnet should use. - Group string `json:"group,omitempty"` -} - -// Subnets is a slice of Subnet. -type Subnets []*SubnetSpec - -// ToMap returns a map from id to subnet. -func (s Subnets) ToMap() map[string]*SubnetSpec { - res := make(map[string]*SubnetSpec) - for _, x := range s { - res[x.ID] = x - } - return res -} - -const ( - // OSVersionLabelName is the label set on resources to identify their os version - OSVersionLabelName = "msft.microsoft/os-version" - // LoadBalancerLabel is the label set on load balancer replica machines - LoadBalancerLabel = "msft.microsoft/load-balancer" -) - -// VMState describes the state of an Azure virtual machine. -type VMState string - -var ( - // VMStateCreating ... - VMStateCreating = VMState("Creating") - // VMStateDeleting ... - VMStateDeleting = VMState("Deleting") - // VMStateFailed ... - VMStateFailed = VMState("Failed") - // VMStateMigrating ... - VMStateMigrating = VMState("Migrating") - // VMStateSucceeded ... - VMStateSucceeded = VMState("Succeeded") - // VMStateUpdating ... - VMStateUpdating = VMState("Updating") -) - -// 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"` - - BootstrapData string `json:"bootstrapData,omitempty"` - - // State - The provisioning state, which only appears in the response. - State VMState `json:"vmState,omitempty"` - Identity VMIdentity `json:"identity,omitempty"` -} - -// Image defines information about the image to use for VM creation. -// There are three ways to specify an image: by ID, by publisher, or by Shared Image Gallery. -// If specifying an image by ID, only the ID field needs to be set. -// If specifying an image by publisher, the Publisher, Offer, SKU, and Version fields must be set. -// If specifying an image from a Shared Image Gallery, the SubscriptionID, ResourceGroup, -// Gallery, Name, and Version fields must be set. -type Image struct { - Publisher *string `json:"publisher,omitempty"` - Offer *string `json:"offer,omitempty"` - SKU *string `json:"sku,omitempty"` - - ID *string `json:"id,omitempty"` - - SubscriptionID *string `json:"subscriptionID,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` - Gallery *string `json:"gallery,omitempty"` - Name *string `json:"name,omitempty"` - - Version *string `json:"version,omitempty"` - OSType OSType `json:"osType"` -} - -type AvailabilityZone struct { - ID *string `json:"id,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} - -// VMIdentity defines the identity of the virtual machine, if configured. -type VMIdentity string - -// OSType describes the OS type of a disk. -type OSType string - -const ( - // OSTypeLinux - OSTypeLinux = OSType("Linux") - // OSTypeWindows - OSTypeWindows = OSType("Windows") - // OSTypeWindows2022 - OSTypeWindows2022 = OSType("Windows2022") -) - -type OSDisk struct { - Name string `json:"name"` - Source string `json:"source"` - OSType OSType `json:"osType"` - DiskSizeGB int32 `json:"diskSizeGB"` - ManagedDisk ManagedDisk `json:"managedDisk"` -} - -type ManagedDisk struct { - StorageAccountType string `json:"storageAccountType"` -} - -// SubnetSpec configures an Azure subnet. -type SubnetSpec struct { - // ID defines a unique identifier to reference this resource. - ID string `json:"id,omitempty"` - - // Name defines a name for the subnet resource. - Name string `json:"name"` - - // VnetID defines the ID of the virtual network this subnet should be built in. - VnetID string `json:"vnetId"` - - // CidrBlock is the CIDR block to be used when the provider creates a managed Vnet. - CidrBlock string `json:"cidrBlock,omitempty"` -} - -const ( - AnnotationClusterInfrastructureReady = "azurestackhci.cluster.sigs.k8s.io/infrastructure-ready" - ValueReady = "true" - AnnotationControlPlaneReady = "azurestackhci.cluster.sigs.k8s.io/control-plane-ready" -) diff --git a/api/v1alpha3/zz_generated.conversion.go b/api/v1alpha3/zz_generated.conversion.go deleted file mode 100644 index 0c70b853..00000000 --- a/api/v1alpha3/zz_generated.conversion.go +++ /dev/null @@ -1,1277 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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.6. DO NOT EDIT. - -package v1alpha3 - -import ( - unsafe "unsafe" - - v1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - v1 "k8s.io/api/core/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - 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((*AvailabilityZone)(nil), (*v1beta1.AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone(a.(*AvailabilityZone), b.(*v1beta1.AvailabilityZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AvailabilityZone)(nil), (*AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone(a.(*v1beta1.AvailabilityZone), b.(*AvailabilityZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCICluster)(nil), (*v1beta1.AzureStackHCICluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(a.(*AzureStackHCICluster), b.(*v1beta1.AzureStackHCICluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCICluster)(nil), (*AzureStackHCICluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster(a.(*v1beta1.AzureStackHCICluster), b.(*AzureStackHCICluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIClusterList)(nil), (*v1beta1.AzureStackHCIClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(a.(*AzureStackHCIClusterList), b.(*v1beta1.AzureStackHCIClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIClusterList)(nil), (*AzureStackHCIClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha3_AzureStackHCIClusterList(a.(*v1beta1.AzureStackHCIClusterList), b.(*AzureStackHCIClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIClusterSpec)(nil), (*v1beta1.AzureStackHCIClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(a.(*AzureStackHCIClusterSpec), b.(*v1beta1.AzureStackHCIClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIClusterSpec)(nil), (*AzureStackHCIClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha3_AzureStackHCIClusterSpec(a.(*v1beta1.AzureStackHCIClusterSpec), b.(*AzureStackHCIClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIClusterStatus)(nil), (*v1beta1.AzureStackHCIClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(a.(*AzureStackHCIClusterStatus), b.(*v1beta1.AzureStackHCIClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIClusterStatus)(nil), (*AzureStackHCIClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha3_AzureStackHCIClusterStatus(a.(*v1beta1.AzureStackHCIClusterStatus), b.(*AzureStackHCIClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancer)(nil), (*v1beta1.AzureStackHCILoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(a.(*AzureStackHCILoadBalancer), b.(*v1beta1.AzureStackHCILoadBalancer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancer)(nil), (*AzureStackHCILoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha3_AzureStackHCILoadBalancer(a.(*v1beta1.AzureStackHCILoadBalancer), b.(*AzureStackHCILoadBalancer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancerList)(nil), (*v1beta1.AzureStackHCILoadBalancerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(a.(*AzureStackHCILoadBalancerList), b.(*v1beta1.AzureStackHCILoadBalancerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancerList)(nil), (*AzureStackHCILoadBalancerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha3_AzureStackHCILoadBalancerList(a.(*v1beta1.AzureStackHCILoadBalancerList), b.(*AzureStackHCILoadBalancerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancerSpec)(nil), (*v1beta1.AzureStackHCILoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(a.(*AzureStackHCILoadBalancerSpec), b.(*v1beta1.AzureStackHCILoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancerSpec)(nil), (*AzureStackHCILoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHCILoadBalancerSpec(a.(*v1beta1.AzureStackHCILoadBalancerSpec), b.(*AzureStackHCILoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancerStatus)(nil), (*v1beta1.AzureStackHCILoadBalancerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(a.(*AzureStackHCILoadBalancerStatus), b.(*v1beta1.AzureStackHCILoadBalancerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancerStatus)(nil), (*AzureStackHCILoadBalancerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha3_AzureStackHCILoadBalancerStatus(a.(*v1beta1.AzureStackHCILoadBalancerStatus), b.(*AzureStackHCILoadBalancerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachine)(nil), (*v1beta1.AzureStackHCIMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(a.(*AzureStackHCIMachine), b.(*v1beta1.AzureStackHCIMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachine)(nil), (*AzureStackHCIMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachine_To_v1alpha3_AzureStackHCIMachine(a.(*v1beta1.AzureStackHCIMachine), b.(*AzureStackHCIMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineList)(nil), (*v1beta1.AzureStackHCIMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(a.(*AzureStackHCIMachineList), b.(*v1beta1.AzureStackHCIMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineList)(nil), (*AzureStackHCIMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha3_AzureStackHCIMachineList(a.(*v1beta1.AzureStackHCIMachineList), b.(*AzureStackHCIMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineProviderCondition)(nil), (*v1beta1.AzureStackHCIMachineProviderCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(a.(*AzureStackHCIMachineProviderCondition), b.(*v1beta1.AzureStackHCIMachineProviderCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineProviderCondition)(nil), (*AzureStackHCIMachineProviderCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha3_AzureStackHCIMachineProviderCondition(a.(*v1beta1.AzureStackHCIMachineProviderCondition), b.(*AzureStackHCIMachineProviderCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineSpec)(nil), (*v1beta1.AzureStackHCIMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(a.(*AzureStackHCIMachineSpec), b.(*v1beta1.AzureStackHCIMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineSpec)(nil), (*AzureStackHCIMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(a.(*v1beta1.AzureStackHCIMachineSpec), b.(*AzureStackHCIMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineStatus)(nil), (*v1beta1.AzureStackHCIMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(a.(*AzureStackHCIMachineStatus), b.(*v1beta1.AzureStackHCIMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineStatus)(nil), (*AzureStackHCIMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha3_AzureStackHCIMachineStatus(a.(*v1beta1.AzureStackHCIMachineStatus), b.(*AzureStackHCIMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplate)(nil), (*v1beta1.AzureStackHCIMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(a.(*AzureStackHCIMachineTemplate), b.(*v1beta1.AzureStackHCIMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplate)(nil), (*AzureStackHCIMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha3_AzureStackHCIMachineTemplate(a.(*v1beta1.AzureStackHCIMachineTemplate), b.(*AzureStackHCIMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplateList)(nil), (*v1beta1.AzureStackHCIMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(a.(*AzureStackHCIMachineTemplateList), b.(*v1beta1.AzureStackHCIMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplateList)(nil), (*AzureStackHCIMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha3_AzureStackHCIMachineTemplateList(a.(*v1beta1.AzureStackHCIMachineTemplateList), b.(*AzureStackHCIMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplateResource)(nil), (*v1beta1.AzureStackHCIMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(a.(*AzureStackHCIMachineTemplateResource), b.(*v1beta1.AzureStackHCIMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplateResource)(nil), (*AzureStackHCIMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha3_AzureStackHCIMachineTemplateResource(a.(*v1beta1.AzureStackHCIMachineTemplateResource), b.(*AzureStackHCIMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplateSpec)(nil), (*v1beta1.AzureStackHCIMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(a.(*AzureStackHCIMachineTemplateSpec), b.(*v1beta1.AzureStackHCIMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplateSpec)(nil), (*AzureStackHCIMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha3_AzureStackHCIMachineTemplateSpec(a.(*v1beta1.AzureStackHCIMachineTemplateSpec), b.(*AzureStackHCIMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIResourceReference)(nil), (*v1beta1.AzureStackHCIResourceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(a.(*AzureStackHCIResourceReference), b.(*v1beta1.AzureStackHCIResourceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIResourceReference)(nil), (*AzureStackHCIResourceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIResourceReference_To_v1alpha3_AzureStackHCIResourceReference(a.(*v1beta1.AzureStackHCIResourceReference), b.(*AzureStackHCIResourceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachine)(nil), (*v1beta1.AzureStackHCIVirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(a.(*AzureStackHCIVirtualMachine), b.(*v1beta1.AzureStackHCIVirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachine)(nil), (*AzureStackHCIVirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha3_AzureStackHCIVirtualMachine(a.(*v1beta1.AzureStackHCIVirtualMachine), b.(*AzureStackHCIVirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachineList)(nil), (*v1beta1.AzureStackHCIVirtualMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(a.(*AzureStackHCIVirtualMachineList), b.(*v1beta1.AzureStackHCIVirtualMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachineList)(nil), (*AzureStackHCIVirtualMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIVirtualMachineList(a.(*v1beta1.AzureStackHCIVirtualMachineList), b.(*AzureStackHCIVirtualMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachineSpec)(nil), (*v1beta1.AzureStackHCIVirtualMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(a.(*AzureStackHCIVirtualMachineSpec), b.(*v1beta1.AzureStackHCIVirtualMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachineSpec)(nil), (*AzureStackHCIVirtualMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec(a.(*v1beta1.AzureStackHCIVirtualMachineSpec), b.(*AzureStackHCIVirtualMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachineStatus)(nil), (*v1beta1.AzureStackHCIVirtualMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(a.(*AzureStackHCIVirtualMachineStatus), b.(*v1beta1.AzureStackHCIVirtualMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachineStatus)(nil), (*AzureStackHCIVirtualMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha3_AzureStackHCIVirtualMachineStatus(a.(*v1beta1.AzureStackHCIVirtualMachineStatus), b.(*AzureStackHCIVirtualMachineStatus), 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((*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.AddGeneratedConversionFunc((*ManagedDisk)(nil), (*v1beta1.ManagedDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDisk(a.(*ManagedDisk), b.(*v1beta1.ManagedDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.ManagedDisk)(nil), (*ManagedDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedDisk_To_v1alpha3_ManagedDisk(a.(*v1beta1.ManagedDisk), b.(*ManagedDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkSpec)(nil), (*v1beta1.NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(a.(*NetworkSpec), b.(*v1beta1.NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkSpec)(nil), (*NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(a.(*v1beta1.NetworkSpec), b.(*NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*VM)(nil), (*v1beta1.VM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VM_To_v1beta1_VM(a.(*VM), b.(*v1beta1.VM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VM)(nil), (*VM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VM_To_v1alpha3_VM(a.(*v1beta1.VM), b.(*VM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*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 - } - 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((*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 - } - return nil -} - -func autoConvert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone(in *AvailabilityZone, out *v1beta1.AvailabilityZone, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) - return nil -} - -// Convert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone is an autogenerated conversion function. -func Convert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone(in *AvailabilityZone, out *v1beta1.AvailabilityZone, s conversion.Scope) error { - return autoConvert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone(in, out, s) -} - -func autoConvert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone(in *v1beta1.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) - return nil -} - -// Convert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone is an autogenerated conversion function. -func Convert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone(in *v1beta1.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { - return autoConvert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(in *AzureStackHCICluster, out *v1beta1.AzureStackHCICluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(in *AzureStackHCICluster, out *v1beta1.AzureStackHCICluster, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster(in *v1beta1.AzureStackHCICluster, out *AzureStackHCICluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha3_AzureStackHCIClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha3_AzureStackHCIClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster(in *v1beta1.AzureStackHCICluster, out *AzureStackHCICluster, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(in *AzureStackHCIClusterList, out *v1beta1.AzureStackHCIClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureStackHCICluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(in *AzureStackHCIClusterList, out *v1beta1.AzureStackHCIClusterList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIClusterList_To_v1alpha3_AzureStackHCIClusterList(in *v1beta1.AzureStackHCIClusterList, out *AzureStackHCIClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCICluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureStackHCICluster_To_v1alpha3_AzureStackHCICluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha3_AzureStackHCIClusterList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha3_AzureStackHCIClusterList(in *v1beta1.AzureStackHCIClusterList, out *AzureStackHCIClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIClusterList_To_v1alpha3_AzureStackHCIClusterList(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(in *AzureStackHCIClusterSpec, out *v1beta1.AzureStackHCIClusterSpec, 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 - out.Location = in.Location - out.AzureStackHCILoadBalancer = (*v1beta1.AzureStackHCILoadBalancerSpec)(unsafe.Pointer(in.AzureStackHCILoadBalancer)) - if err := Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.Management = in.Management - return nil -} - -// Convert_v1alpha3_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(in *AzureStackHCIClusterSpec, out *v1beta1.AzureStackHCIClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha3_AzureStackHCIClusterSpec(in *v1beta1.AzureStackHCIClusterSpec, out *AzureStackHCIClusterSpec, s conversion.Scope) error { - if err := Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(&in.NetworkSpec, &out.NetworkSpec, s); err != nil { - return err - } - out.ResourceGroup = in.ResourceGroup - out.Location = in.Location - out.AzureStackHCILoadBalancer = (*AzureStackHCILoadBalancerSpec)(unsafe.Pointer(in.AzureStackHCILoadBalancer)) - if err := Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.Management = in.Management - return nil -} - -// Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha3_AzureStackHCIClusterSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha3_AzureStackHCIClusterSpec(in *v1beta1.AzureStackHCIClusterSpec, out *AzureStackHCIClusterSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha3_AzureStackHCIClusterSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(in *AzureStackHCIClusterStatus, out *v1beta1.AzureStackHCIClusterStatus, s conversion.Scope) error { - if err := Convert_v1alpha3_VM_To_v1beta1_VM(&in.Bastion, &out.Bastion, s); err != nil { - return err - } - out.Ready = in.Ready - out.Phase = in.Phase - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(in *AzureStackHCIClusterStatus, out *v1beta1.AzureStackHCIClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha3_AzureStackHCIClusterStatus(in *v1beta1.AzureStackHCIClusterStatus, out *AzureStackHCIClusterStatus, s conversion.Scope) error { - if err := Convert_v1beta1_VM_To_v1alpha3_VM(&in.Bastion, &out.Bastion, s); err != nil { - return err - } - out.Ready = in.Ready - out.Phase = in.Phase - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha3_AzureStackHCIClusterStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha3_AzureStackHCIClusterStatus(in *v1beta1.AzureStackHCIClusterStatus, out *AzureStackHCIClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha3_AzureStackHCIClusterStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(in *AzureStackHCILoadBalancer, out *v1beta1.AzureStackHCILoadBalancer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(in *AzureStackHCILoadBalancer, out *v1beta1.AzureStackHCILoadBalancer, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha3_AzureStackHCILoadBalancer(in *v1beta1.AzureStackHCILoadBalancer, out *AzureStackHCILoadBalancer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHCILoadBalancerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha3_AzureStackHCILoadBalancerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha3_AzureStackHCILoadBalancer is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha3_AzureStackHCILoadBalancer(in *v1beta1.AzureStackHCILoadBalancer, out *AzureStackHCILoadBalancer, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha3_AzureStackHCILoadBalancer(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(in *AzureStackHCILoadBalancerList, out *v1beta1.AzureStackHCILoadBalancerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCILoadBalancer)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(in *AzureStackHCILoadBalancerList, out *v1beta1.AzureStackHCILoadBalancerList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha3_AzureStackHCILoadBalancerList(in *v1beta1.AzureStackHCILoadBalancerList, out *AzureStackHCILoadBalancerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCILoadBalancer)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha3_AzureStackHCILoadBalancerList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha3_AzureStackHCILoadBalancerList(in *v1beta1.AzureStackHCILoadBalancerList, out *AzureStackHCILoadBalancerList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha3_AzureStackHCILoadBalancerList(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(in *AzureStackHCILoadBalancerSpec, out *v1beta1.AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - out.SSHPublicKey = in.SSHPublicKey - if err := Convert_v1alpha3_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - out.VMSize = in.VMSize - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - return nil -} - -// Convert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(in *AzureStackHCILoadBalancerSpec, out *v1beta1.AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHCILoadBalancerSpec(in *v1beta1.AzureStackHCILoadBalancerSpec, out *AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - out.SSHPublicKey = in.SSHPublicKey - if err := Convert_v1beta1_Image_To_v1alpha3_Image(&in.Image, &out.Image, s); err != nil { - return err - } - out.VMSize = in.VMSize - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHCILoadBalancerSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHCILoadBalancerSpec(in *v1beta1.AzureStackHCILoadBalancerSpec, out *AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha3_AzureStackHCILoadBalancerSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(in *AzureStackHCILoadBalancerStatus, out *v1beta1.AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ReadyReplicas = in.ReadyReplicas - out.FailedReplicas = in.FailedReplicas - out.Address = in.Address - out.Port = in.Port - out.Phase = in.Phase - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - out.Selector = in.Selector - return nil -} - -// Convert_v1alpha3_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(in *AzureStackHCILoadBalancerStatus, out *v1beta1.AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha3_AzureStackHCILoadBalancerStatus(in *v1beta1.AzureStackHCILoadBalancerStatus, out *AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ReadyReplicas = in.ReadyReplicas - out.FailedReplicas = in.FailedReplicas - out.Address = in.Address - out.Port = in.Port - out.Phase = in.Phase - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - out.Selector = in.Selector - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha3_AzureStackHCILoadBalancerStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha3_AzureStackHCILoadBalancerStatus(in *v1beta1.AzureStackHCILoadBalancerStatus, out *AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha3_AzureStackHCILoadBalancerStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(in *AzureStackHCIMachine, out *v1beta1.AzureStackHCIMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(in *AzureStackHCIMachine, out *v1beta1.AzureStackHCIMachine, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachine_To_v1alpha3_AzureStackHCIMachine(in *v1beta1.AzureStackHCIMachine, out *AzureStackHCIMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha3_AzureStackHCIMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachine_To_v1alpha3_AzureStackHCIMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachine_To_v1alpha3_AzureStackHCIMachine(in *v1beta1.AzureStackHCIMachine, out *AzureStackHCIMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachine_To_v1alpha3_AzureStackHCIMachine(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(in *AzureStackHCIMachineList, out *v1beta1.AzureStackHCIMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCIMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(in *AzureStackHCIMachineList, out *v1beta1.AzureStackHCIMachineList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineList_To_v1alpha3_AzureStackHCIMachineList(in *v1beta1.AzureStackHCIMachineList, out *AzureStackHCIMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCIMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha3_AzureStackHCIMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha3_AzureStackHCIMachineList(in *v1beta1.AzureStackHCIMachineList, out *AzureStackHCIMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineList_To_v1alpha3_AzureStackHCIMachineList(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(in *AzureStackHCIMachineProviderCondition, out *v1beta1.AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - out.Type = v1beta1.AzureStackHCIMachineProviderConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - out.LastProbeTime = in.LastProbeTime - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(in *AzureStackHCIMachineProviderCondition, out *v1beta1.AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha3_AzureStackHCIMachineProviderCondition(in *v1beta1.AzureStackHCIMachineProviderCondition, out *AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - out.Type = AzureStackHCIMachineProviderConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - out.LastProbeTime = in.LastProbeTime - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha3_AzureStackHCIMachineProviderCondition is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha3_AzureStackHCIMachineProviderCondition(in *v1beta1.AzureStackHCIMachineProviderCondition, out *AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha3_AzureStackHCIMachineProviderCondition(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(in *AzureStackHCIMachineSpec, out *v1beta1.AzureStackHCIMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - if err := Convert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1alpha3_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.AllocatePublicIP = in.AllocatePublicIP - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(in *AzureStackHCIMachineSpec, out *v1beta1.AzureStackHCIMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(in *v1beta1.AzureStackHCIMachineSpec, out *AzureStackHCIMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - if err := Convert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1beta1_Image_To_v1alpha3_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.AllocatePublicIP = in.AllocatePublicIP - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(in *v1beta1.AzureStackHCIMachineSpec, out *AzureStackHCIMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(in *AzureStackHCIMachineStatus, out *v1beta1.AzureStackHCIMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*v1beta1.VMState)(unsafe.Pointer(in.VMState)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(in *AzureStackHCIMachineStatus, out *v1beta1.AzureStackHCIMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha3_AzureStackHCIMachineStatus(in *v1beta1.AzureStackHCIMachineStatus, out *AzureStackHCIMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*VMState)(unsafe.Pointer(in.VMState)) - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha3_AzureStackHCIMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha3_AzureStackHCIMachineStatus(in *v1beta1.AzureStackHCIMachineStatus, out *AzureStackHCIMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha3_AzureStackHCIMachineStatus(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(in *AzureStackHCIMachineTemplate, out *v1beta1.AzureStackHCIMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(in *AzureStackHCIMachineTemplate, out *v1beta1.AzureStackHCIMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha3_AzureStackHCIMachineTemplate(in *v1beta1.AzureStackHCIMachineTemplate, out *AzureStackHCIMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha3_AzureStackHCIMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha3_AzureStackHCIMachineTemplate is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha3_AzureStackHCIMachineTemplate(in *v1beta1.AzureStackHCIMachineTemplate, out *AzureStackHCIMachineTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha3_AzureStackHCIMachineTemplate(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(in *AzureStackHCIMachineTemplateList, out *v1beta1.AzureStackHCIMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCIMachineTemplate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(in *AzureStackHCIMachineTemplateList, out *v1beta1.AzureStackHCIMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha3_AzureStackHCIMachineTemplateList(in *v1beta1.AzureStackHCIMachineTemplateList, out *AzureStackHCIMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCIMachineTemplate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha3_AzureStackHCIMachineTemplateList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha3_AzureStackHCIMachineTemplateList(in *v1beta1.AzureStackHCIMachineTemplateList, out *AzureStackHCIMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha3_AzureStackHCIMachineTemplateList(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(in *AzureStackHCIMachineTemplateResource, out *v1beta1.AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha3_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(in *AzureStackHCIMachineTemplateResource, out *v1beta1.AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha3_AzureStackHCIMachineTemplateResource(in *v1beta1.AzureStackHCIMachineTemplateResource, out *AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha3_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha3_AzureStackHCIMachineTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha3_AzureStackHCIMachineTemplateResource(in *v1beta1.AzureStackHCIMachineTemplateResource, out *AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha3_AzureStackHCIMachineTemplateResource(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(in *AzureStackHCIMachineTemplateSpec, out *v1beta1.AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha3_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(in *AzureStackHCIMachineTemplateSpec, out *v1beta1.AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha3_AzureStackHCIMachineTemplateSpec(in *v1beta1.AzureStackHCIMachineTemplateSpec, out *AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha3_AzureStackHCIMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha3_AzureStackHCIMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha3_AzureStackHCIMachineTemplateSpec(in *v1beta1.AzureStackHCIMachineTemplateSpec, out *AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha3_AzureStackHCIMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(in *AzureStackHCIResourceReference, out *v1beta1.AzureStackHCIResourceReference, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(in *AzureStackHCIResourceReference, out *v1beta1.AzureStackHCIResourceReference, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIResourceReference_To_v1alpha3_AzureStackHCIResourceReference(in *v1beta1.AzureStackHCIResourceReference, out *AzureStackHCIResourceReference, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - return nil -} - -// Convert_v1beta1_AzureStackHCIResourceReference_To_v1alpha3_AzureStackHCIResourceReference is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIResourceReference_To_v1alpha3_AzureStackHCIResourceReference(in *v1beta1.AzureStackHCIResourceReference, out *AzureStackHCIResourceReference, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIResourceReference_To_v1alpha3_AzureStackHCIResourceReference(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(in *AzureStackHCIVirtualMachine, out *v1beta1.AzureStackHCIVirtualMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(in *AzureStackHCIVirtualMachine, out *v1beta1.AzureStackHCIVirtualMachine, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha3_AzureStackHCIVirtualMachine(in *v1beta1.AzureStackHCIVirtualMachine, out *AzureStackHCIVirtualMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha3_AzureStackHCIVirtualMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha3_AzureStackHCIVirtualMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha3_AzureStackHCIVirtualMachine(in *v1beta1.AzureStackHCIVirtualMachine, out *AzureStackHCIVirtualMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha3_AzureStackHCIVirtualMachine(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(in *AzureStackHCIVirtualMachineList, out *v1beta1.AzureStackHCIVirtualMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCIVirtualMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(in *AzureStackHCIVirtualMachineList, out *v1beta1.AzureStackHCIVirtualMachineList, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIVirtualMachineList(in *v1beta1.AzureStackHCIVirtualMachineList, out *AzureStackHCIVirtualMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCIVirtualMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIVirtualMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIVirtualMachineList(in *v1beta1.AzureStackHCIVirtualMachineList, out *AzureStackHCIVirtualMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha3_AzureStackHCIVirtualMachineList(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(in *AzureStackHCIVirtualMachineSpec, out *v1beta1.AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - out.VMSize = in.VMSize - if err := Convert_v1alpha3_AvailabilityZone_To_v1beta1_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1alpha3_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = (*string)(unsafe.Pointer(in.BootstrapData)) - out.Identity = v1beta1.VMIdentity(in.Identity) - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.ResourceGroup = in.ResourceGroup - out.VnetName = in.VnetName - out.ClusterName = in.ClusterName - out.SubnetName = in.SubnetName - out.BackendPoolNames = *(*[]string)(unsafe.Pointer(&in.BackendPoolNames)) - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(in *AzureStackHCIVirtualMachineSpec, out *v1beta1.AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec(in *v1beta1.AzureStackHCIVirtualMachineSpec, out *AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - out.VMSize = in.VMSize - if err := Convert_v1beta1_AvailabilityZone_To_v1alpha3_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1beta1_Image_To_v1alpha3_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = (*string)(unsafe.Pointer(in.BootstrapData)) - out.Identity = VMIdentity(in.Identity) - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.ResourceGroup = in.ResourceGroup - out.VnetName = in.VnetName - out.ClusterName = in.ClusterName - out.SubnetName = in.SubnetName - out.BackendPoolNames = *(*[]string)(unsafe.Pointer(&in.BackendPoolNames)) - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec(in *v1beta1.AzureStackHCIVirtualMachineSpec, out *AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha3_AzureStackHCIVirtualMachineSpec(in, out, s) -} - -func autoConvert_v1alpha3_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(in *AzureStackHCIVirtualMachineStatus, out *v1beta1.AzureStackHCIVirtualMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*v1beta1.VMState)(unsafe.Pointer(in.VMState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha3_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus is an autogenerated conversion function. -func Convert_v1alpha3_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(in *AzureStackHCIVirtualMachineStatus, out *v1beta1.AzureStackHCIVirtualMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha3_AzureStackHCIVirtualMachineStatus(in *v1beta1.AzureStackHCIVirtualMachineStatus, out *AzureStackHCIVirtualMachineStatus, 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)) - out.Conditions = *(*apiv1alpha3.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha3_AzureStackHCIVirtualMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha3_AzureStackHCIVirtualMachineStatus(in *v1beta1.AzureStackHCIVirtualMachineStatus, out *AzureStackHCIVirtualMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha3_AzureStackHCIVirtualMachineStatus(in, out, s) -} - -func autoConvert_v1alpha3_Image_To_v1beta1_Image(in *Image, out *v1beta1.Image, s conversion.Scope) error { - out.Publisher = (*string)(unsafe.Pointer(in.Publisher)) - out.Offer = (*string)(unsafe.Pointer(in.Offer)) - out.SKU = (*string)(unsafe.Pointer(in.SKU)) - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.SubscriptionID = (*string)(unsafe.Pointer(in.SubscriptionID)) - out.ResourceGroup = (*string)(unsafe.Pointer(in.ResourceGroup)) - out.Gallery = (*string)(unsafe.Pointer(in.Gallery)) - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.OSType = v1beta1.OSType(in.OSType) - 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.Publisher = (*string)(unsafe.Pointer(in.Publisher)) - out.Offer = (*string)(unsafe.Pointer(in.Offer)) - out.SKU = (*string)(unsafe.Pointer(in.SKU)) - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.SubscriptionID = (*string)(unsafe.Pointer(in.SubscriptionID)) - out.ResourceGroup = (*string)(unsafe.Pointer(in.ResourceGroup)) - out.Gallery = (*string)(unsafe.Pointer(in.Gallery)) - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.OSType = OSType(in.OSType) - return nil -} - -// Convert_v1beta1_Image_To_v1alpha3_Image is an autogenerated conversion function. -func Convert_v1beta1_Image_To_v1alpha3_Image(in *v1beta1.Image, out *Image, s conversion.Scope) error { - return autoConvert_v1beta1_Image_To_v1alpha3_Image(in, out, s) -} - -func autoConvert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDisk(in *ManagedDisk, out *v1beta1.ManagedDisk, s conversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - return nil -} - -// Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDisk is an autogenerated conversion function. -func Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDisk(in *ManagedDisk, out *v1beta1.ManagedDisk, s conversion.Scope) error { - return autoConvert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDisk(in, out, s) -} - -func autoConvert_v1beta1_ManagedDisk_To_v1alpha3_ManagedDisk(in *v1beta1.ManagedDisk, out *ManagedDisk, s conversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - return nil -} - -// Convert_v1beta1_ManagedDisk_To_v1alpha3_ManagedDisk is an autogenerated conversion function. -func Convert_v1beta1_ManagedDisk_To_v1alpha3_ManagedDisk(in *v1beta1.ManagedDisk, out *ManagedDisk, s conversion.Scope) error { - return autoConvert_v1beta1_ManagedDisk_To_v1alpha3_ManagedDisk(in, out, s) -} - -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 - } - out.Subnets = *(*v1beta1.Subnets)(unsafe.Pointer(&in.Subnets)) - return nil -} - -// Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec is an autogenerated conversion function. -func Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - out.Subnets = *(*Subnets)(unsafe.Pointer(&in.Subnets)) - return nil -} - -// Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec(in, out, s) -} - -func autoConvert_v1alpha3_OSDisk_To_v1beta1_OSDisk(in *OSDisk, out *v1beta1.OSDisk, s conversion.Scope) error { - out.Name = in.Name - out.Source = in.Source - out.OSType = v1beta1.OSType(in.OSType) - out.DiskSizeGB = in.DiskSizeGB - if err := Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDisk(&in.ManagedDisk, &out.ManagedDisk, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk is an autogenerated conversion function. -func Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(in *OSDisk, out *v1beta1.OSDisk, s conversion.Scope) error { - return autoConvert_v1alpha3_OSDisk_To_v1beta1_OSDisk(in, out, s) -} - -func autoConvert_v1beta1_OSDisk_To_v1alpha3_OSDisk(in *v1beta1.OSDisk, out *OSDisk, s conversion.Scope) error { - out.Name = in.Name - out.Source = in.Source - out.OSType = OSType(in.OSType) - out.DiskSizeGB = in.DiskSizeGB - if err := Convert_v1beta1_ManagedDisk_To_v1alpha3_ManagedDisk(&in.ManagedDisk, &out.ManagedDisk, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk is an autogenerated conversion function. -func Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(in *v1beta1.OSDisk, out *OSDisk, s conversion.Scope) error { - return autoConvert_v1beta1_OSDisk_To_v1alpha3_OSDisk(in, out, s) -} - -func autoConvert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *v1beta1.SubnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.VnetID = in.VnetID - out.CidrBlock = in.CidrBlock - return nil -} - -// Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec is an autogenerated conversion function. -func Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *v1beta1.SubnetSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec(in, out, s) -} - -func autoConvert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(in *v1beta1.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.VnetID = in.VnetID - out.CidrBlock = in.CidrBlock - return nil -} - -// Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec is an autogenerated conversion function. -func Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(in *v1beta1.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { - return autoConvert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec(in, out, s) -} - -func autoConvert_v1alpha3_VM_To_v1beta1_VM(in *VM, out *v1beta1.VM, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.AvailabilityZone = in.AvailabilityZone - out.VMSize = in.VMSize - if err := Convert_v1alpha3_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = in.BootstrapData - out.State = v1beta1.VMState(in.State) - out.Identity = v1beta1.VMIdentity(in.Identity) - return nil -} - -// Convert_v1alpha3_VM_To_v1beta1_VM is an autogenerated conversion function. -func Convert_v1alpha3_VM_To_v1beta1_VM(in *VM, out *v1beta1.VM, s conversion.Scope) error { - return autoConvert_v1alpha3_VM_To_v1beta1_VM(in, out, s) -} - -func autoConvert_v1beta1_VM_To_v1alpha3_VM(in *v1beta1.VM, out *VM, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.AvailabilityZone = in.AvailabilityZone - out.VMSize = in.VMSize - if err := Convert_v1beta1_Image_To_v1alpha3_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = in.BootstrapData - out.State = VMState(in.State) - out.Identity = VMIdentity(in.Identity) - return nil -} - -// Convert_v1beta1_VM_To_v1alpha3_VM is an autogenerated conversion function. -func Convert_v1beta1_VM_To_v1alpha3_VM(in *v1beta1.VM, out *VM, s conversion.Scope) error { - return autoConvert_v1beta1_VM_To_v1alpha3_VM(in, out, s) -} - -func autoConvert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *v1beta1.VnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.CidrBlock = in.CidrBlock - out.Group = in.Group - return nil -} - -// Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec is an autogenerated conversion function. -func Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *v1beta1.VnetSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec(in, out, s) -} - -func autoConvert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(in *v1beta1.VnetSpec, out *VnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.CidrBlock = in.CidrBlock - out.Group = in.Group - return nil -} - -// Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec is an autogenerated conversion function. -func Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(in *v1beta1.VnetSpec, out *VnetSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec(in, out, s) -} diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go deleted file mode 100644 index 79fd5e95..00000000 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ /dev/null @@ -1,881 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 *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 *AzureStackHCICluster) DeepCopyInto(out *AzureStackHCICluster) { - *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 AzureStackHCICluster. -func (in *AzureStackHCICluster) DeepCopy() *AzureStackHCICluster { - if in == nil { - return nil - } - out := new(AzureStackHCICluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCICluster) 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 *AzureStackHCIClusterList) DeepCopyInto(out *AzureStackHCIClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCICluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIClusterList. -func (in *AzureStackHCIClusterList) DeepCopy() *AzureStackHCIClusterList { - if in == nil { - return nil - } - out := new(AzureStackHCIClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIClusterList) 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 *AzureStackHCIClusterSpec) DeepCopyInto(out *AzureStackHCIClusterSpec) { - *out = *in - in.NetworkSpec.DeepCopyInto(&out.NetworkSpec) - if in.AzureStackHCILoadBalancer != nil { - in, out := &in.AzureStackHCILoadBalancer, &out.AzureStackHCILoadBalancer - *out = new(AzureStackHCILoadBalancerSpec) - (*in).DeepCopyInto(*out) - } - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIClusterSpec. -func (in *AzureStackHCIClusterSpec) DeepCopy() *AzureStackHCIClusterSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIClusterStatus) DeepCopyInto(out *AzureStackHCIClusterStatus) { - *out = *in - in.Bastion.DeepCopyInto(&out.Bastion) - 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 AzureStackHCIClusterStatus. -func (in *AzureStackHCIClusterStatus) DeepCopy() *AzureStackHCIClusterStatus { - if in == nil { - return nil - } - out := new(AzureStackHCIClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCILoadBalancer) DeepCopyInto(out *AzureStackHCILoadBalancer) { - *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 AzureStackHCILoadBalancer. -func (in *AzureStackHCILoadBalancer) DeepCopy() *AzureStackHCILoadBalancer { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCILoadBalancer) 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 *AzureStackHCILoadBalancerList) DeepCopyInto(out *AzureStackHCILoadBalancerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCILoadBalancer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCILoadBalancerList. -func (in *AzureStackHCILoadBalancerList) DeepCopy() *AzureStackHCILoadBalancerList { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCILoadBalancerList) 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 *AzureStackHCILoadBalancerSpec) DeepCopyInto(out *AzureStackHCILoadBalancerSpec) { - *out = *in - in.Image.DeepCopyInto(&out.Image) - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCILoadBalancerSpec. -func (in *AzureStackHCILoadBalancerSpec) DeepCopy() *AzureStackHCILoadBalancerSpec { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCILoadBalancerStatus) DeepCopyInto(out *AzureStackHCILoadBalancerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.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 AzureStackHCILoadBalancerStatus. -func (in *AzureStackHCILoadBalancerStatus) DeepCopy() *AzureStackHCILoadBalancerStatus { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachine) DeepCopyInto(out *AzureStackHCIMachine) { - *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 AzureStackHCIMachine. -func (in *AzureStackHCIMachine) DeepCopy() *AzureStackHCIMachine { - if in == nil { - return nil - } - out := new(AzureStackHCIMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachine) 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 *AzureStackHCIMachineList) DeepCopyInto(out *AzureStackHCIMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCIMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineList. -func (in *AzureStackHCIMachineList) DeepCopy() *AzureStackHCIMachineList { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachineList) 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 *AzureStackHCIMachineProviderCondition) DeepCopyInto(out *AzureStackHCIMachineProviderCondition) { - *out = *in - in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineProviderCondition. -func (in *AzureStackHCIMachineProviderCondition) DeepCopy() *AzureStackHCIMachineProviderCondition { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineProviderCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineSpec) DeepCopyInto(out *AzureStackHCIMachineSpec) { - *out = *in - if in.ProviderID != nil { - in, out := &in.ProviderID, &out.ProviderID - *out = new(string) - **out = **in - } - in.AvailabilityZone.DeepCopyInto(&out.AvailabilityZone) - in.Image.DeepCopyInto(&out.Image) - out.OSDisk = in.OSDisk - if in.AdditionalSSHKeys != nil { - in, out := &in.AdditionalSSHKeys, &out.AdditionalSSHKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineSpec. -func (in *AzureStackHCIMachineSpec) DeepCopy() *AzureStackHCIMachineSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineStatus) DeepCopyInto(out *AzureStackHCIMachineStatus) { - *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.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make(apiv1alpha3.Conditions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.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 - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineStatus. -func (in *AzureStackHCIMachineStatus) DeepCopy() *AzureStackHCIMachineStatus { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineTemplate) DeepCopyInto(out *AzureStackHCIMachineTemplate) { - *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 AzureStackHCIMachineTemplate. -func (in *AzureStackHCIMachineTemplate) DeepCopy() *AzureStackHCIMachineTemplate { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachineTemplate) 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 *AzureStackHCIMachineTemplateList) DeepCopyInto(out *AzureStackHCIMachineTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCIMachineTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineTemplateList. -func (in *AzureStackHCIMachineTemplateList) DeepCopy() *AzureStackHCIMachineTemplateList { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachineTemplateList) 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 *AzureStackHCIMachineTemplateResource) DeepCopyInto(out *AzureStackHCIMachineTemplateResource) { - *out = *in - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineTemplateResource. -func (in *AzureStackHCIMachineTemplateResource) DeepCopy() *AzureStackHCIMachineTemplateResource { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineTemplateSpec) DeepCopyInto(out *AzureStackHCIMachineTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineTemplateSpec. -func (in *AzureStackHCIMachineTemplateSpec) DeepCopy() *AzureStackHCIMachineTemplateSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIResourceReference) DeepCopyInto(out *AzureStackHCIResourceReference) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIResourceReference. -func (in *AzureStackHCIResourceReference) DeepCopy() *AzureStackHCIResourceReference { - if in == nil { - return nil - } - out := new(AzureStackHCIResourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIVirtualMachine) DeepCopyInto(out *AzureStackHCIVirtualMachine) { - *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 AzureStackHCIVirtualMachine. -func (in *AzureStackHCIVirtualMachine) DeepCopy() *AzureStackHCIVirtualMachine { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIVirtualMachine) 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 *AzureStackHCIVirtualMachineList) DeepCopyInto(out *AzureStackHCIVirtualMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCIVirtualMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIVirtualMachineList. -func (in *AzureStackHCIVirtualMachineList) DeepCopy() *AzureStackHCIVirtualMachineList { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIVirtualMachineList) 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 *AzureStackHCIVirtualMachineSpec) DeepCopyInto(out *AzureStackHCIVirtualMachineSpec) { - *out = *in - in.AvailabilityZone.DeepCopyInto(&out.AvailabilityZone) - in.Image.DeepCopyInto(&out.Image) - out.OSDisk = in.OSDisk - if in.BootstrapData != nil { - in, out := &in.BootstrapData, &out.BootstrapData - *out = new(string) - **out = **in - } - if in.BackendPoolNames != nil { - in, out := &in.BackendPoolNames, &out.BackendPoolNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AdditionalSSHKeys != nil { - in, out := &in.AdditionalSSHKeys, &out.AdditionalSSHKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIVirtualMachineSpec. -func (in *AzureStackHCIVirtualMachineSpec) DeepCopy() *AzureStackHCIVirtualMachineSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIVirtualMachineStatus) DeepCopyInto(out *AzureStackHCIVirtualMachineStatus) { - *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 AzureStackHCIVirtualMachineStatus. -func (in *AzureStackHCIVirtualMachineStatus) DeepCopy() *AzureStackHCIVirtualMachineStatus { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachineStatus) - 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.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 - } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.SubscriptionID != nil { - in, out := &in.SubscriptionID, &out.SubscriptionID - *out = new(string) - **out = **in - } - if in.ResourceGroup != nil { - in, out := &in.ResourceGroup, &out.ResourceGroup - *out = new(string) - **out = **in - } - if in.Gallery != nil { - in, out := &in.Gallery, &out.Gallery - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(string) - **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 *ManagedDisk) DeepCopyInto(out *ManagedDisk) { - *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 - out.Vnet = in.Vnet - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(Subnets, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SubnetSpec) - **out = **in - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OSDisk) DeepCopyInto(out *OSDisk) { - *out = *in - out.ManagedDisk = in.ManagedDisk -} - -// 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 *SubnetSpec) DeepCopyInto(out *SubnetSpec) { - *out = *in -} - -// 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 { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SubnetSpec) - **out = **in - } - } - } -} - -// 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 *VM) DeepCopyInto(out *VM) { - *out = *in - in.Image.DeepCopyInto(&out.Image) - out.OSDisk = in.OSDisk -} - -// 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 VirtualMachinesByCreationTimestamp) DeepCopyInto(out *VirtualMachinesByCreationTimestamp) { - { - in := &in - *out = make(VirtualMachinesByCreationTimestamp, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(AzureStackHCIVirtualMachine) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinesByCreationTimestamp. -func (in VirtualMachinesByCreationTimestamp) DeepCopy() VirtualMachinesByCreationTimestamp { - if in == nil { - return nil - } - out := new(VirtualMachinesByCreationTimestamp) - 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 -} - -// 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/azurestackhcicluster_conversion.go b/api/v1alpha4/azurestackhcicluster_conversion.go deleted file mode 100644 index 64a3c0ef..00000000 --- a/api/v1alpha4/azurestackhcicluster_conversion.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - apiconversion "k8s.io/apimachinery/pkg/conversion" - clusterv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - clusterv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCICluster) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCICluster) - return Convert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(src, dst, nil) -} - -func (dst *AzureStackHCICluster) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCICluster) - return Convert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster(src, dst, nil) -} - -func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in *clusterv1alpha4.APIEndpoint, out *clusterv1beta1.APIEndpoint, s apiconversion.Scope) error { - return clusterv1alpha4.Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(in, out, s) -} - -func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in *clusterv1beta1.APIEndpoint, out *clusterv1alpha4.APIEndpoint, s apiconversion.Scope) error { - return clusterv1alpha4.Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(in, out, s) -} - -func (src *AzureStackHCIClusterList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIClusterList) - return Convert_v1alpha4_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(src, dst, nil) -} - -func (dst *AzureStackHCIClusterList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIClusterList) - return Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha4_AzureStackHCIClusterList(src, dst, nil) -} diff --git a/api/v1alpha4/azurestackhcicluster_types.go b/api/v1alpha4/azurestackhcicluster_types.go deleted file mode 100644 index 172d806d..00000000 --- a/api/v1alpha4/azurestackhcicluster_types.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" -) - -const ( - // ClusterFinalizer allows ReconcileAzureStackHCICluster to clean up Azure resources associated with AzureStackHCICluster before - // removing it from the apiserver. - ClusterFinalizer = "azurestackhcicluster.infrastructure.cluster.x-k8s.io" -) - -// AzureStackHCIClusterSpec defines the desired state of AzureStackHCICluster -type AzureStackHCIClusterSpec struct { - // NetworkSpec encapsulates all things related to Azure network. - NetworkSpec NetworkSpec `json:"networkSpec,omitempty"` - - ResourceGroup string `json:"resourceGroup"` - - Location string `json:"location"` - - // AzureStackHCILoadBalancer is used to declare the AzureStackHCILoadBalancerSpec if a LoadBalancer is desired for the AzureStackHCICluster. - AzureStackHCILoadBalancer *AzureStackHCILoadBalancerSpec `json:"azureStackHCILoadBalancer,omitempty"` - - // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. - // +optional - ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` - - // Version indicates the desired Kubernetes version of the cluster. - Version *string `json:"version"` - - // Management is true when the cluster is a Management Cluster. - Management bool `json:"management,omitempty"` -} - -// AzureStackHCIClusterStatus defines the observed state of AzureStackHCICluster -type AzureStackHCIClusterStatus struct { - Bastion VM `json:"bastion,omitempty"` - - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Phase represents the current phase of cluster actuation. - // E.g. Pending, Running, Terminating, Failed etc. - // +optional - Phase string `json:"phase,omitempty"` - - // Conditions defines current service state of the AzureStackHCICluster. - // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` -} - -// SetTypedPhase sets the Phase field to the string representation of AzureStackHCIClusterPhase. -func (c *AzureStackHCIClusterStatus) SetTypedPhase(p AzureStackHCIClusterPhase) { - c.Phase = string(p) -} - -// GetTypedPhase attempts to parse the Phase field and return -// the typed AzureStackHCIClusterPhase representation as described in `types.go`. -func (c *AzureStackHCIClusterStatus) GetTypedPhase() AzureStackHCIClusterPhase { - switch phase := AzureStackHCIClusterPhase(c.Phase); phase { - case - AzureStackHCIClusterPhasePending, - AzureStackHCIClusterPhaseProvisioning, - AzureStackHCIClusterPhaseProvisioned, - AzureStackHCIClusterPhaseDeleting, - AzureStackHCIClusterPhaseFailed: - return phase - default: - return AzureStackHCIClusterPhaseUnknown - } -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhciclusters,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="AzureStackHCICluster status such as Pending/Provisioning/Provisioned/Deleting/Failed" - -// AzureStackHCICluster is the Schema for the azurestackhciclusters API -type AzureStackHCICluster struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIClusterSpec `json:"spec,omitempty"` - Status AzureStackHCIClusterStatus `json:"status,omitempty"` -} - -// GetConditions returns the list of conditions for AzureStackHCICluster. -func (c *AzureStackHCICluster) GetConditions() clusterv1.Conditions { - return c.Status.Conditions -} - -// SetConditions sets the conditions for AzureStackHCICluster. -func (c *AzureStackHCICluster) SetConditions(conditions clusterv1.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// AzureStackHCIClusterList contains a list of AzureStackHCICluster -type AzureStackHCIClusterList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCICluster `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCICluster{}, &AzureStackHCIClusterList{}) -} diff --git a/api/v1alpha4/azurestackhciloadbalancer_conversion.go b/api/v1alpha4/azurestackhciloadbalancer_conversion.go deleted file mode 100644 index 18cc60e5..00000000 --- a/api/v1alpha4/azurestackhciloadbalancer_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCILoadBalancer) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCILoadBalancer) - return Convert_v1alpha4_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(src, dst, nil) -} - -func (dst *AzureStackHCILoadBalancer) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCILoadBalancer) - return Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha4_AzureStackHCILoadBalancer(src, dst, nil) -} - -func (src *AzureStackHCILoadBalancerList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCILoadBalancerList) - return Convert_v1alpha4_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(src, dst, nil) -} - -func (dst *AzureStackHCILoadBalancerList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCILoadBalancerList) - return Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha4_AzureStackHCILoadBalancerList(src, dst, nil) -} diff --git a/api/v1alpha4/azurestackhciloadbalancer_types.go b/api/v1alpha4/azurestackhciloadbalancer_types.go deleted file mode 100644 index eef6b313..00000000 --- a/api/v1alpha4/azurestackhciloadbalancer_types.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // AzureStackHCILoadBalancerFinalizer allows ReconcileLoadBalancer to clean up the load balancer resources before removing it from the apiserver. - AzureStackHCILoadBalancerFinalizer = "azurestackhciloadbalancer.infrastructure.cluster.x-k8s.io" -) - -type AzureStackHCILoadBalancerSpec struct { - SSHPublicKey string `json:"sshPublicKey"` - Image Image `json:"image"` - VMSize string `json:"vmSize"` - - // Number of desired loadbalancer machines. Defaults to 1. - // This is a pointer to distinguish between explicit zero and not specified. - // +optional - // +kubebuilder:default=1 - Replicas *int32 `json:"replicas,omitempty"` -} - -type AzureStackHCILoadBalancerStatus struct { - // +optional - Ready bool `json:"ready,omitempty"` - - // Total number of non-terminated replicas for this loadbalancer - // +optional - Replicas int32 `json:"replicas,omitempty"` - - // Total number of ready (service connected) replicas for this loadbalancer - // +optional - ReadyReplicas int32 `json:"readyReplicas,omitempty"` - - // Total number of failed replicas for this loadbalancer. - // +optional - FailedReplicas int32 `json:"failedReplicas,omitempty"` - - // Address is the IP address of the load balancer. - // +optional - Address string `json:"address,omitempty"` - - // Port is the port of the azureStackHCIloadbalancers frontend. - Port int32 `json:"port,omitempty"` - - // Phase represents the current phase of loadbalancer actuation. - // E.g. Pending, Running, Terminating, Failed etc. - // +optional - Phase string `json:"phase,omitempty"` - - // Conditions defines current service state of the AzureStackHCILoadBalancer. - // +optional - Conditions clusterv1.Conditions `json:"conditions,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 - ErrorReason *errors.MachineStatusError `json:"errorReason,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 - ErrorMessage *string `json:"errorMessage,omitempty"` - - // Selector is the label selector in string format to avoid introspection - // by clients, and is used to provide the CRD-based integration for the - // scale subresource and additional integrations for things like kubectl - // describe.. The string will be in the same format as the query-param syntax. - // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - // +optional - Selector string `json:"selector,omitempty"` -} - -// SetTypedPhase sets the Phase field to the string representation of AzureStackHCILoadBalancerPhase -func (c *AzureStackHCILoadBalancerStatus) SetTypedPhase(p AzureStackHCILoadBalancerPhase) { - c.Phase = string(p) -} - -// GetTypedPhase attempts to parse the Phase field and return -// the typed AzureStackHCILoadBalancerPhase representation as described in `types.go`. -func (c *AzureStackHCILoadBalancerStatus) GetTypedPhase() AzureStackHCILoadBalancerPhase { - switch phase := AzureStackHCILoadBalancerPhase(c.Phase); phase { - case - AzureStackHCILoadBalancerPhasePending, - AzureStackHCILoadBalancerPhaseProvisioning, - AzureStackHCILoadBalancerPhaseProvisioned, - AzureStackHCILoadBalancerPhaseScaling, - AzureStackHCILoadBalancerPhaseUpgrading, - AzureStackHCILoadBalancerPhaseDeleting, - AzureStackHCILoadBalancerPhaseFailed: - return phase - default: - return AzureStackHCILoadBalancerPhaseUnknown - } -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhciloadbalancers,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector -// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current phase/status of the loadbalancer" -// +kubebuilder:printcolumn:name="IP",type="string",JSONPath=".status.address",description="The frontend VIP address assigned to the loadbalancer" -// +kubebuilder:printcolumn:name="Port",type="integer",JSONPath=".status.port",description="The frontend port assigned to the loadbalancer" -// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.replicas",description="Total number of desired machine replicas for this loadbalancer" -// +kubebuilder:printcolumn:name="Created",type="integer",JSONPath=".status.replicas",description="Total number of machine replicas created to service this loadbalancer" -// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Total number of machine replicas that are actively connected to the loadbalancer service" -// +kubebuilder:printcolumn:name="Unavailable",type="integer",JSONPath=".status.failedReplicas",description="Total number of machine replicas that are in a failed or unavailable state" - -// AzureStackHCILoadBalancer is the Schema for the azurestackhciloadbalancers API -type AzureStackHCILoadBalancer struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCILoadBalancerSpec `json:"spec,omitempty"` - Status AzureStackHCILoadBalancerStatus `json:"status,omitempty"` -} - -// GetConditions returns the list of conditions for AzureStackHCILoadBalancer. -func (c *AzureStackHCILoadBalancer) GetConditions() clusterv1.Conditions { - return c.Status.Conditions -} - -// SetConditions sets the conditions for AzureStackHCILoadBalancer. -func (c *AzureStackHCILoadBalancer) SetConditions(conditions clusterv1.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// AzureStackHCILoadBalancerList contains a list of AzureStackHCILoadBalancers -type AzureStackHCILoadBalancerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCILoadBalancer `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCILoadBalancer{}, &AzureStackHCILoadBalancerList{}) -} diff --git a/api/v1alpha4/azurestackhcimachine_conversion.go b/api/v1alpha4/azurestackhcimachine_conversion.go deleted file mode 100644 index cc1c117f..00000000 --- a/api/v1alpha4/azurestackhcimachine_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCIMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachine) - return Convert_v1alpha4_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(src, dst, nil) -} - -func (dst *AzureStackHCIMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachine) - return Convert_v1beta1_AzureStackHCIMachine_To_v1alpha4_AzureStackHCIMachine(src, dst, nil) -} - -func (src *AzureStackHCIMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachineList) - return Convert_v1alpha4_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(src, dst, nil) -} - -func (dst *AzureStackHCIMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachineList) - return Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha4_AzureStackHCIMachineList(src, dst, nil) -} diff --git a/api/v1alpha4/azurestackhcimachine_types.go b/api/v1alpha4/azurestackhcimachine_types.go deleted file mode 100644 index 8f02a3eb..00000000 --- a/api/v1alpha4/azurestackhcimachine_types.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // MachineFinalizer allows ReconcileAzureStackHCIMachine to clean up Azure resources associated with AzureStackHCIMachine before - // removing it from the apiserver. - MachineFinalizer = "azurestackhcimachine.infrastructure.cluster.x-k8s.io" -) - -// AzureStackHCIMachineSpec defines the desired state of AzureStackHCIMachine -type AzureStackHCIMachineSpec struct { - // ProviderID is the unique identifier as specified by the cloud provider. - // +optional - ProviderID *string `json:"providerID,omitempty"` - - VMSize string `json:"vmSize"` - - AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` - - Image Image `json:"image,omitempty"` - - OSDisk OSDisk `json:"osDisk,omitempty"` - - Location string `json:"location"` - - SSHPublicKey string `json:"sshPublicKey"` - - // AllocatePublicIP allows the ability to create dynamic public ips for machines where this value is true. - // +optional - AllocatePublicIP bool `json:"allocatePublicIP,omitempty"` - - AdditionalSSHKeys []string `json:"additionalSSHKeys,omitempty"` -} - -// AzureStackHCIMachineStatus defines the observed state of AzureStackHCIMachine -type AzureStackHCIMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the Azure instance associated addresses. - Addresses []v1.NodeAddress `json:"addresses,omitempty"` - - // VMState is the provisioning state of the Azure virtual machine. - // +optional - VMState *VMState `json:"vmState,omitempty"` - - // Conditions defines current service state of the AzureStackHCIMachine. - // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` - - // FailureReason will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a succinct value suitable - // for machine interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // FailureMessage will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhcimachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureStackHCIMachine is the Schema for the azurestackhcimachines API -type AzureStackHCIMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIMachineSpec `json:"spec,omitempty"` - Status AzureStackHCIMachineStatus `json:"status,omitempty"` -} - -func (c *AzureStackHCIMachine) GetConditions() clusterv1.Conditions { - return c.Status.Conditions -} - -func (c *AzureStackHCIMachine) SetConditions(conditions clusterv1.Conditions) { - c.Status.Conditions = conditions -} - -// +kubebuilder:object:root=true - -// AzureStackHCIMachineList contains a list of AzureStackHCIMachine -type AzureStackHCIMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCIMachine `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCIMachine{}, &AzureStackHCIMachineList{}) -} diff --git a/api/v1alpha4/azurestackhcimachinetemplate_conversion.go b/api/v1alpha4/azurestackhcimachinetemplate_conversion.go deleted file mode 100644 index 9961b192..00000000 --- a/api/v1alpha4/azurestackhcimachinetemplate_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCIMachineTemplate) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachineTemplate) - return Convert_v1alpha4_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(src, dst, nil) -} - -func (dst *AzureStackHCIMachineTemplate) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachineTemplate) - return Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha4_AzureStackHCIMachineTemplate(src, dst, nil) -} - -func (src *AzureStackHCIMachineTemplateList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIMachineTemplateList) - return Convert_v1alpha4_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(src, dst, nil) -} - -func (dst *AzureStackHCIMachineTemplateList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIMachineTemplateList) - return Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha4_AzureStackHCIMachineTemplateList(src, dst, nil) -} diff --git a/api/v1alpha4/azurestackhcimachinetemplate_types.go b/api/v1alpha4/azurestackhcimachinetemplate_types.go deleted file mode 100644 index d43722d7..00000000 --- a/api/v1alpha4/azurestackhcimachinetemplate_types.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" -) - -// AzureStackHCIMachineTemplateSpec defines the desired state of AzureStackHCIMachineTemplate -type AzureStackHCIMachineTemplateSpec struct { - Template AzureStackHCIMachineTemplateResource `json:"template"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhcimachinetemplates,scope=Namespaced,categories=cluster-api - -// AzureStackHCIMachineTemplate is the Schema for the azurestackhcimachinetemplates API -type AzureStackHCIMachineTemplate struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIMachineTemplateSpec `json:"spec,omitempty"` -} - -// +kubebuilder:object:root=true - -// AzureStackHCIMachineTemplateList contains a list of AzureStackHCIMachineTemplate -type AzureStackHCIMachineTemplateList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCIMachineTemplate `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCIMachineTemplate{}, &AzureStackHCIMachineTemplateList{}) -} - -// AzureStackHCIMachineTemplateResource describes the data needed to create an AzureStackHCIMachine from a template -type AzureStackHCIMachineTemplateResource struct { - // Spec is the specification of the desired behavior of the machine. - Spec AzureStackHCIMachineSpec `json:"spec"` -} diff --git a/api/v1alpha4/azurestackhcivirtualmachine_conversion.go b/api/v1alpha4/azurestackhcivirtualmachine_conversion.go deleted file mode 100644 index 05808786..00000000 --- a/api/v1alpha4/azurestackhcivirtualmachine_conversion.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - "sigs.k8s.io/controller-runtime/pkg/conversion" -) - -func (src *AzureStackHCIVirtualMachine) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIVirtualMachine) - return Convert_v1alpha4_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(src, dst, nil) -} - -func (dst *AzureStackHCIVirtualMachine) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIVirtualMachine) - return Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha4_AzureStackHCIVirtualMachine(src, dst, nil) -} - -func (src *AzureStackHCIVirtualMachineList) ConvertTo(dstRaw conversion.Hub) error { - dst := dstRaw.(*infrav1beta1.AzureStackHCIVirtualMachineList) - return Convert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(src, dst, nil) -} - -func (dst *AzureStackHCIVirtualMachineList) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*infrav1beta1.AzureStackHCIVirtualMachineList) - return Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha4_AzureStackHCIVirtualMachineList(src, dst, nil) -} diff --git a/api/v1alpha4/azurestackhcivirtualmachine_types.go b/api/v1alpha4/azurestackhcivirtualmachine_types.go deleted file mode 100644 index de3cb7c6..00000000 --- a/api/v1alpha4/azurestackhcivirtualmachine_types.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 ( - v1core "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -const ( - // VirtualMachineFinalizer allows ReconcileVirtualAzureStackHCIMachine to clean up AzureStackHCI resources associated with VirtualAzureStackHCIMachine before - // removing it from the apiserver. - VirtualMachineFinalizer = "azurestackhcivirtualmachine.infrastructure.cluster.x-k8s.io" -) - -// AzureStackHCIVirtualMachineSpec defines the desired state of AzureStackHCIVirtualMachine -type AzureStackHCIVirtualMachineSpec struct { - VMSize string `json:"vmSize"` - AvailabilityZone AvailabilityZone `json:"availabilityZone,omitempty"` - Image Image `json:"image"` - OSDisk OSDisk `json:"osDisk,omitempty"` - BootstrapData *string `json:"bootstrapData,omitempty"` - Identity VMIdentity `json:"identity,omitempty"` - Location string `json:"location"` // does location belong here? - SSHPublicKey string `json:"sshPublicKey"` - - // come from the cluster scope for machine and lb controller creation path - ResourceGroup string `json:"resourceGroup"` - VnetName string `json:"vnetName"` - ClusterName string `json:"clusterName"` - SubnetName string `json:"subnetName"` - BackendPoolNames []string `json:"backendPoolNames,omitempty"` - - AdditionalSSHKeys []string `json:"additionalSSHKeys,omitempty"` -} - -// AzureStackHCIVirtualMachineStatus defines the observed state of AzureStackHCIVirtualMachine -type AzureStackHCIVirtualMachineStatus struct { - // Ready is true when the provider resource is ready. - // +optional - Ready bool `json:"ready"` - - // Addresses contains the AzureStackHCI instance associated addresses. - Addresses []v1core.NodeAddress `json:"addresses,omitempty"` - - // VMState is the provisioning state of the AzureStackHCI virtual machine. - // +optional - VMState *VMState `json:"vmState,omitempty"` - - // +optional - FailureReason *errors.MachineStatusError `json:"failureReason,omitempty"` - - // +optional - FailureMessage *string `json:"failureMessage,omitempty"` - - // Conditions defines current service state of the AzureStackHCIVirtualMachine. - // +optional - Conditions clusterv1.Conditions `json:"conditions,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=azurestackhcivirtualmachines,scope=Namespaced,categories=cluster-api -// +kubebuilder:subresource:status - -// AzureStackHCIVirtualMachine is the Schema for the azurestackhcivirtualmachines API -type AzureStackHCIVirtualMachine struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AzureStackHCIVirtualMachineSpec `json:"spec,omitempty"` - Status AzureStackHCIVirtualMachineStatus `json:"status,omitempty"` -} - -// GetConditions returns the list of conditions for the AzureStackHCIVirtualMachine. -func (m *AzureStackHCIVirtualMachine) GetConditions() clusterv1.Conditions { - return m.Status.Conditions -} - -// SetConditions sets the conditions for the AzureStackHCIVirtualMachine. -func (m *AzureStackHCIVirtualMachine) SetConditions(conditions clusterv1.Conditions) { - m.Status.Conditions = conditions -} - -// VirtualMachinesByCreationTimestamp sorts a list of AzureStackHCIVirtualMachine by creation timestamp, using their names as a tie breaker. -type VirtualMachinesByCreationTimestamp []*AzureStackHCIVirtualMachine - -func (o VirtualMachinesByCreationTimestamp) Len() int { return len(o) } -func (o VirtualMachinesByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } -func (o VirtualMachinesByCreationTimestamp) Less(i, j int) bool { - if o[i].CreationTimestamp.Equal(&o[j].CreationTimestamp) { - return o[i].Name < o[j].Name - } - return o[i].CreationTimestamp.Before(&o[j].CreationTimestamp) -} - -// +kubebuilder:object:root=true - -// AzureStackHCIVirtualMachineList contains a list of AzureStackHCIVirtualMachine -type AzureStackHCIVirtualMachineList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AzureStackHCIVirtualMachine `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AzureStackHCIVirtualMachine{}, &AzureStackHCIVirtualMachineList{}) -} diff --git a/api/v1alpha4/conditions_consts.go b/api/v1alpha4/conditions_consts.go deleted file mode 100644 index 21cc0735..00000000 --- a/api/v1alpha4/conditions_consts.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4" - -// Conditions and condition Reasons for the AzureStackHCIVirtualMachine object - -const ( - // VMRunningCondition reports on current status of the AzureStackHCIVirtualMachine. - VMRunningCondition clusterv1.ConditionType = "VMRunning" - // VMUpdatingReason used when the vm updating is in progress. - VMUpdatingReason = "VMUpdating" - // VMProvisionFailedReason used for failures during vm provisioning. - VMProvisionFailedReason = "VMProvisionFailed" - // VMNotFoundReason used when the vm couldn't be retrieved. - VMNotFoundReason = "VMNotFound" - // OutOfMemoryReason used when the AzureStackHCI resource is out of memory. - OutOfMemoryReason = "OutOfMemory" - // OutOfCapacityReason used when the AzureStackHCI resource is out of capacity. - OutOfCapacityReason = "OutOfCapacity" -) - -// Conditions and condition Reasons for the AzureStackHCICluster object - -const ( - // NetworkInfrastructureReadyCondition reports on current status of the AzureStackHCICluster - NetworkInfrastructureReadyCondition clusterv1.ConditionType = "NetworkInfrastructureReady" - // ClusterReconciliationFailedReason used for failures during cluster reconciliation. - ClusterReconciliationFailedReason = "ClusterReconciliationFailed" - // LoadBalancerProvisioningReason used for provisioning of lb - LoadBalancerProvisioningReason = "LoadBalancerProvisioning" - // LoadBalancerDeletingReason used when waiting on lbs to be deleted - LoadBalancerDeletingReason = "LoadBalancerDeleting" - // AzureStackHCIMachinesDeletingReason used when waiting on machines to be deleted - AzureStackHCIMachinesDeletingReason = "AzureStackHCIMachineDeleting" -) - -// Conditions and condition Reasons for the AzureStackHCILoadBalancer object - -const ( - // LoadBalancerInfrastructureReadyCondition reports on current status of the AzureStackHCILoadBalancer - LoadBalancerInfrastructureReadyCondition clusterv1.ConditionType = "LoadBalancerInfrastructureReady" - // LoadBalancerServiceReconciliationFailedReason used for service failures during loadbalancer reconciliation. - LoadBalancerServiceReconciliationFailedReason = "ServiceReconciliationFailed" - // LoadBalancerServiceStatusFailedReason used for service status failures. - LoadBalancerServiceStatusFailedReason = "ServiceStatusFailed" - // LoadBalancerMachineReconciliationFailedReason used for machine failures during loadbalancer reconciliation. - LoadBalancerMachineReconciliationFailedReason = "MachineReconciliationFailed" - // LoadBalancerAddressUnavailableReason used when waiting for loadbalancer to have an address. - LoadBalancerAddressUnavailableReason = "AddressUnavailable" - // LoadBalancerNoReplicasReadyReason used when no replicas are in a ready state. - LoadBalancerNoReplicasReadyReason = "NoReplicasReady" - - // LoadBalancerReplicasReadyCondition reports on current status of the AzureStackHCILoadBalancer machine replicas - LoadBalancerReplicasReadyCondition clusterv1.ConditionType = "LoadBalancerReplicasReady" - // LoadBalancerWaitingForReplicasReadyReason used when we are waiting for replicas to be ready. - LoadBalancerWaitingForReplicasReadyReason = "WaitingForReplicasToBeReady" - // LoadBalancerReplicasScalingUpReason used when we are scaling up the replicas. - LoadBalancerReplicasScalingUpReason = "ScalingUp" - // LoadBalancerReplicasScalingDownReason used when we are scaling down the replicas. - LoadBalancerReplicasScalingDownReason = "ScalingDown" - // LoadBalancerReplicasUpgradingReason used when we are upgrading the replicas. - LoadBalancerReplicasUpgradingReason = "Upgrading" - // LoadBalancerReplicasFailedReason used when we have failed replicas. - LoadBalancerReplicasFailedReason = "FailedReplicas" -) diff --git a/api/v1alpha4/decode.go b/api/v1alpha4/decode.go deleted file mode 100644 index 7b447109..00000000 --- a/api/v1alpha4/decode.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -// DecodeRawExtension will decode a runtime.RawExtension into a specific runtime object based on the schema -func DecodeRawExtension(in *runtime.RawExtension, out runtime.Object) error { - scheme, err := SchemeBuilder.Build() - if err != nil { - return errors.Wrap(err, "Error building schema") - } - - codecs := serializer.NewCodecFactory(scheme) - deserializer := codecs.UniversalDeserializer() - - return runtime.DecodeInto(deserializer, in.Raw, out) -} diff --git a/api/v1alpha4/doc.go b/api/v1alpha4/doc.go deleted file mode 100644 index e672b95a..00000000 --- a/api/v1alpha4/doc.go +++ /dev/null @@ -1,16 +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=github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1 diff --git a/api/v1alpha4/groupversion_info.go b/api/v1alpha4/groupversion_info.go deleted file mode 100644 index d56cda28..00000000 --- a/api/v1alpha4/groupversion_info.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 v1alpha3 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/phase_types.go b/api/v1alpha4/phase_types.go deleted file mode 100644 index 3a700182..00000000 --- a/api/v1alpha4/phase_types.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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 - -type AzureStackHCIClusterPhase string - -const ( - // AzureStackHCIClusterPhasePending is the first state a Cluster is assigned by - // Cluster API Cluster controller after being created. - AzureStackHCIClusterPhasePending = AzureStackHCIClusterPhase("pending") - - // AzureStackHCIClusterPhaseProvisioning is the state when the Cluster has a provider infrastructure - // object associated and can start provisioning. - AzureStackHCIClusterPhaseProvisioning = AzureStackHCIClusterPhase("provisioning") - - // AzureStackHCIClusterPhaseProvisioned is the state when its - // infrastructure has been created and configured. - AzureStackHCIClusterPhaseProvisioned = AzureStackHCIClusterPhase("provisioned") - - // AzureStackHCIClusterPhaseDeleting is the Cluster state when a delete - // request has been sent to the API Server, - // but its infrastructure has not yet been fully deleted. - AzureStackHCIClusterPhaseDeleting = AzureStackHCIClusterPhase("deleting") - - // AzureStackHCIClusterPhaseFailed is the Cluster state when the system - // might require user intervention. - AzureStackHCIClusterPhaseFailed = AzureStackHCIClusterPhase("failed") - - // AzureStackHCIClusterPhaseUpgrading is the Cluster state when the system - // is in the middle of a update. - AzureStackHCIClusterPhaseUpgrading = AzureStackHCIClusterPhase("upgrading") - - // AzureStackHCIClusterPhaseUnknown is returned if the Cluster state cannot be determined. - AzureStackHCIClusterPhaseUnknown = AzureStackHCIClusterPhase("") -) - -type AzureStackHCILoadBalancerPhase string - -const ( - // AzureStackHCILoadBalancerPhasePending is the first state a LoadBalancer is assigned by - // the controller after being created. - AzureStackHCILoadBalancerPhasePending = AzureStackHCILoadBalancerPhase("pending") - - // AzureStackHCILoadBalancerPhaseProvisioning is the state when the LoadBalancer is waiting for the - // first replica to be ready. - AzureStackHCILoadBalancerPhaseProvisioning = AzureStackHCILoadBalancerPhase("provisioning") - - // AzureStackHCILoadBalancerPhaseProvisioned is the state when its infrastructure has been created - // and configured. All replicas are ready and we have the desired number of replicas. - AzureStackHCILoadBalancerPhaseProvisioned = AzureStackHCILoadBalancerPhase("provisioned") - - // AzureStackHCILoadBalancerPhaseScaling is the state when replicas are being scaled. - AzureStackHCILoadBalancerPhaseScaling = AzureStackHCILoadBalancerPhase("scaling") - - // AzureStackHCILoadBalancerPhaseUpgrading is the state when the system is in the middle of a update. - AzureStackHCILoadBalancerPhaseUpgrading = AzureStackHCILoadBalancerPhase("upgrading") - - // AzureStackHCILoadBalancerPhaseDeleting is the state when a delete request has been sent to - // the API Server, but its infrastructure has not yet been fully deleted. - AzureStackHCILoadBalancerPhaseDeleting = AzureStackHCILoadBalancerPhase("deleting") - - // AzureStackHCILoadBalancerPhaseFailed is the state when the system might require user intervention. - AzureStackHCILoadBalancerPhaseFailed = AzureStackHCILoadBalancerPhase("failed") - - // AzureStackHCILoadBalancerPhaseUnknown is returned if the state cannot be determined. - AzureStackHCILoadBalancerPhaseUnknown = AzureStackHCILoadBalancerPhase("") -) diff --git a/api/v1alpha4/types.go b/api/v1alpha4/types.go deleted file mode 100644 index 0f110db9..00000000 --- a/api/v1alpha4/types.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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" -) - -// AzureStackHCIResourceReference is a reference to a specific Azure resource by ID -type AzureStackHCIResourceReference struct { - // ID of resource - // +optional - ID *string `json:"id,omitempty"` -} - -// AzureStackHCIMachineProviderConditionType is a valid value for AzureStackHCIMachineProviderCondition.Type -type AzureStackHCIMachineProviderConditionType string - -// Valid conditions for an Azure machine instance -const ( - // MachineCreated indicates whether the machine has been created or not. If not, - // it should include a reason and message for the failure. - MachineCreated AzureStackHCIMachineProviderConditionType = "MachineCreated" -) - -// AzureStackHCIMachineProviderCondition is a condition in a AzureStackHCIMachineProviderStatus -type AzureStackHCIMachineProviderCondition struct { - // Type is the type of the condition. - Type AzureStackHCIMachineProviderConditionType `json:"type"` - // Status is the status of the condition. - Status corev1.ConditionStatus `json:"status"` - // LastProbeTime is the last time we probed the condition. - // +optional - LastProbeTime metav1.Time `json:"lastProbeTime"` - // LastTransitionTime is the last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime"` - // Reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason"` - // Message is a human-readable message indicating details about last transition. - // +optional - Message string `json:"message"` -} - -const ( - // ControlPlane machine label - ControlPlane string = "control-plane" - // Node machine label - Node string = "node" -) - -// NetworkSpec encapsulates all things related to Azure network. -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"` -} - -// VnetSpec configures an Azure virtual network. -type VnetSpec struct { - // 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. - CidrBlock string `json:"cidrBlock,omitempty"` - - // Group is the resource group the vnet should use. - Group string `json:"group,omitempty"` -} - -// Subnets is a slice of Subnet. -type Subnets []*SubnetSpec - -// ToMap returns a map from id to subnet. -func (s Subnets) ToMap() map[string]*SubnetSpec { - res := make(map[string]*SubnetSpec) - for _, x := range s { - res[x.ID] = x - } - return res -} - -const ( - // OSVersionLabelName is the label set on resources to identify their os version - OSVersionLabelName = "msft.microsoft/os-version" - // LoadBalancerLabel is the label set on load balancer replica machines - LoadBalancerLabel = "msft.microsoft/load-balancer" -) - -// VMState describes the state of an Azure virtual machine. -type VMState string - -var ( - // VMStateCreating ... - VMStateCreating = VMState("Creating") - // VMStateDeleting ... - VMStateDeleting = VMState("Deleting") - // VMStateFailed ... - VMStateFailed = VMState("Failed") - // VMStateMigrating ... - VMStateMigrating = VMState("Migrating") - // VMStateSucceeded ... - VMStateSucceeded = VMState("Succeeded") - // VMStateUpdating ... - VMStateUpdating = VMState("Updating") -) - -// 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"` - - BootstrapData string `json:"bootstrapData,omitempty"` - - // State - The provisioning state, which only appears in the response. - State VMState `json:"vmState,omitempty"` - Identity VMIdentity `json:"identity,omitempty"` -} - -// Image defines information about the image to use for VM creation. -// There are three ways to specify an image: by ID, by publisher, or by Shared Image Gallery. -// If specifying an image by ID, only the ID field needs to be set. -// If specifying an image by publisher, the Publisher, Offer, SKU, and Version fields must be set. -// If specifying an image from a Shared Image Gallery, the SubscriptionID, ResourceGroup, -// Gallery, Name, and Version fields must be set. -type Image struct { - Publisher *string `json:"publisher,omitempty"` - Offer *string `json:"offer,omitempty"` - SKU *string `json:"sku,omitempty"` - - ID *string `json:"id,omitempty"` - - SubscriptionID *string `json:"subscriptionID,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` - Gallery *string `json:"gallery,omitempty"` - Name *string `json:"name,omitempty"` - - Version *string `json:"version,omitempty"` - OSType OSType `json:"osType"` -} - -type AvailabilityZone struct { - ID *string `json:"id,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} - -// VMIdentity defines the identity of the virtual machine, if configured. -type VMIdentity string - -// OSType describes the OS type of a disk. -type OSType string - -const ( - // OSTypeLinux - OSTypeLinux = OSType("Linux") - // OSTypeWindows - OSTypeWindows = OSType("Windows") - // OSTypeWindows2022 - OSTypeWindows2022 = OSType("Windows2022") -) - -type OSDisk struct { - Name string `json:"name"` - Source string `json:"source"` - OSType OSType `json:"osType"` - DiskSizeGB int32 `json:"diskSizeGB"` - ManagedDisk ManagedDisk `json:"managedDisk"` -} - -type ManagedDisk struct { - StorageAccountType string `json:"storageAccountType"` -} - -// SubnetSpec configures an Azure subnet. -type SubnetSpec struct { - // ID defines a unique identifier to reference this resource. - ID string `json:"id,omitempty"` - - // Name defines a name for the subnet resource. - Name string `json:"name"` - - // VnetID defines the ID of the virtual network this subnet should be built in. - VnetID string `json:"vnetId"` - - // CidrBlock is the CIDR block to be used when the provider creates a managed Vnet. - CidrBlock string `json:"cidrBlock,omitempty"` -} - -const ( - AnnotationClusterInfrastructureReady = "azurestackhci.cluster.sigs.k8s.io/infrastructure-ready" - ValueReady = "true" - AnnotationControlPlaneReady = "azurestackhci.cluster.sigs.k8s.io/control-plane-ready" -) diff --git a/api/v1alpha4/zz_generated.conversion.go b/api/v1alpha4/zz_generated.conversion.go deleted file mode 100644 index c0e254a6..00000000 --- a/api/v1alpha4/zz_generated.conversion.go +++ /dev/null @@ -1,1277 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -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.6. DO NOT EDIT. - -package v1alpha4 - -import ( - unsafe "unsafe" - - v1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" - v1 "k8s.io/api/core/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - 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((*AvailabilityZone)(nil), (*v1beta1.AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone(a.(*AvailabilityZone), b.(*v1beta1.AvailabilityZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AvailabilityZone)(nil), (*AvailabilityZone)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone(a.(*v1beta1.AvailabilityZone), b.(*AvailabilityZone), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCICluster)(nil), (*v1beta1.AzureStackHCICluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(a.(*AzureStackHCICluster), b.(*v1beta1.AzureStackHCICluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCICluster)(nil), (*AzureStackHCICluster)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster(a.(*v1beta1.AzureStackHCICluster), b.(*AzureStackHCICluster), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIClusterList)(nil), (*v1beta1.AzureStackHCIClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(a.(*AzureStackHCIClusterList), b.(*v1beta1.AzureStackHCIClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIClusterList)(nil), (*AzureStackHCIClusterList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha4_AzureStackHCIClusterList(a.(*v1beta1.AzureStackHCIClusterList), b.(*AzureStackHCIClusterList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIClusterSpec)(nil), (*v1beta1.AzureStackHCIClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(a.(*AzureStackHCIClusterSpec), b.(*v1beta1.AzureStackHCIClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIClusterSpec)(nil), (*AzureStackHCIClusterSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha4_AzureStackHCIClusterSpec(a.(*v1beta1.AzureStackHCIClusterSpec), b.(*AzureStackHCIClusterSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIClusterStatus)(nil), (*v1beta1.AzureStackHCIClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(a.(*AzureStackHCIClusterStatus), b.(*v1beta1.AzureStackHCIClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIClusterStatus)(nil), (*AzureStackHCIClusterStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha4_AzureStackHCIClusterStatus(a.(*v1beta1.AzureStackHCIClusterStatus), b.(*AzureStackHCIClusterStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancer)(nil), (*v1beta1.AzureStackHCILoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(a.(*AzureStackHCILoadBalancer), b.(*v1beta1.AzureStackHCILoadBalancer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancer)(nil), (*AzureStackHCILoadBalancer)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha4_AzureStackHCILoadBalancer(a.(*v1beta1.AzureStackHCILoadBalancer), b.(*AzureStackHCILoadBalancer), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancerList)(nil), (*v1beta1.AzureStackHCILoadBalancerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(a.(*AzureStackHCILoadBalancerList), b.(*v1beta1.AzureStackHCILoadBalancerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancerList)(nil), (*AzureStackHCILoadBalancerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha4_AzureStackHCILoadBalancerList(a.(*v1beta1.AzureStackHCILoadBalancerList), b.(*AzureStackHCILoadBalancerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancerSpec)(nil), (*v1beta1.AzureStackHCILoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(a.(*AzureStackHCILoadBalancerSpec), b.(*v1beta1.AzureStackHCILoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancerSpec)(nil), (*AzureStackHCILoadBalancerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHCILoadBalancerSpec(a.(*v1beta1.AzureStackHCILoadBalancerSpec), b.(*AzureStackHCILoadBalancerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCILoadBalancerStatus)(nil), (*v1beta1.AzureStackHCILoadBalancerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(a.(*AzureStackHCILoadBalancerStatus), b.(*v1beta1.AzureStackHCILoadBalancerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCILoadBalancerStatus)(nil), (*AzureStackHCILoadBalancerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha4_AzureStackHCILoadBalancerStatus(a.(*v1beta1.AzureStackHCILoadBalancerStatus), b.(*AzureStackHCILoadBalancerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachine)(nil), (*v1beta1.AzureStackHCIMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(a.(*AzureStackHCIMachine), b.(*v1beta1.AzureStackHCIMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachine)(nil), (*AzureStackHCIMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachine_To_v1alpha4_AzureStackHCIMachine(a.(*v1beta1.AzureStackHCIMachine), b.(*AzureStackHCIMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineList)(nil), (*v1beta1.AzureStackHCIMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(a.(*AzureStackHCIMachineList), b.(*v1beta1.AzureStackHCIMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineList)(nil), (*AzureStackHCIMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha4_AzureStackHCIMachineList(a.(*v1beta1.AzureStackHCIMachineList), b.(*AzureStackHCIMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineProviderCondition)(nil), (*v1beta1.AzureStackHCIMachineProviderCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(a.(*AzureStackHCIMachineProviderCondition), b.(*v1beta1.AzureStackHCIMachineProviderCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineProviderCondition)(nil), (*AzureStackHCIMachineProviderCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha4_AzureStackHCIMachineProviderCondition(a.(*v1beta1.AzureStackHCIMachineProviderCondition), b.(*AzureStackHCIMachineProviderCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineSpec)(nil), (*v1beta1.AzureStackHCIMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(a.(*AzureStackHCIMachineSpec), b.(*v1beta1.AzureStackHCIMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineSpec)(nil), (*AzureStackHCIMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(a.(*v1beta1.AzureStackHCIMachineSpec), b.(*AzureStackHCIMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineStatus)(nil), (*v1beta1.AzureStackHCIMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(a.(*AzureStackHCIMachineStatus), b.(*v1beta1.AzureStackHCIMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineStatus)(nil), (*AzureStackHCIMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha4_AzureStackHCIMachineStatus(a.(*v1beta1.AzureStackHCIMachineStatus), b.(*AzureStackHCIMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplate)(nil), (*v1beta1.AzureStackHCIMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(a.(*AzureStackHCIMachineTemplate), b.(*v1beta1.AzureStackHCIMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplate)(nil), (*AzureStackHCIMachineTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha4_AzureStackHCIMachineTemplate(a.(*v1beta1.AzureStackHCIMachineTemplate), b.(*AzureStackHCIMachineTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplateList)(nil), (*v1beta1.AzureStackHCIMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(a.(*AzureStackHCIMachineTemplateList), b.(*v1beta1.AzureStackHCIMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplateList)(nil), (*AzureStackHCIMachineTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha4_AzureStackHCIMachineTemplateList(a.(*v1beta1.AzureStackHCIMachineTemplateList), b.(*AzureStackHCIMachineTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplateResource)(nil), (*v1beta1.AzureStackHCIMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(a.(*AzureStackHCIMachineTemplateResource), b.(*v1beta1.AzureStackHCIMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplateResource)(nil), (*AzureStackHCIMachineTemplateResource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha4_AzureStackHCIMachineTemplateResource(a.(*v1beta1.AzureStackHCIMachineTemplateResource), b.(*AzureStackHCIMachineTemplateResource), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIMachineTemplateSpec)(nil), (*v1beta1.AzureStackHCIMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(a.(*AzureStackHCIMachineTemplateSpec), b.(*v1beta1.AzureStackHCIMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIMachineTemplateSpec)(nil), (*AzureStackHCIMachineTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha4_AzureStackHCIMachineTemplateSpec(a.(*v1beta1.AzureStackHCIMachineTemplateSpec), b.(*AzureStackHCIMachineTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIResourceReference)(nil), (*v1beta1.AzureStackHCIResourceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(a.(*AzureStackHCIResourceReference), b.(*v1beta1.AzureStackHCIResourceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIResourceReference)(nil), (*AzureStackHCIResourceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIResourceReference_To_v1alpha4_AzureStackHCIResourceReference(a.(*v1beta1.AzureStackHCIResourceReference), b.(*AzureStackHCIResourceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachine)(nil), (*v1beta1.AzureStackHCIVirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(a.(*AzureStackHCIVirtualMachine), b.(*v1beta1.AzureStackHCIVirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachine)(nil), (*AzureStackHCIVirtualMachine)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha4_AzureStackHCIVirtualMachine(a.(*v1beta1.AzureStackHCIVirtualMachine), b.(*AzureStackHCIVirtualMachine), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachineList)(nil), (*v1beta1.AzureStackHCIVirtualMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(a.(*AzureStackHCIVirtualMachineList), b.(*v1beta1.AzureStackHCIVirtualMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachineList)(nil), (*AzureStackHCIVirtualMachineList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha4_AzureStackHCIVirtualMachineList(a.(*v1beta1.AzureStackHCIVirtualMachineList), b.(*AzureStackHCIVirtualMachineList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachineSpec)(nil), (*v1beta1.AzureStackHCIVirtualMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(a.(*AzureStackHCIVirtualMachineSpec), b.(*v1beta1.AzureStackHCIVirtualMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachineSpec)(nil), (*AzureStackHCIVirtualMachineSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec(a.(*v1beta1.AzureStackHCIVirtualMachineSpec), b.(*AzureStackHCIVirtualMachineSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*AzureStackHCIVirtualMachineStatus)(nil), (*v1beta1.AzureStackHCIVirtualMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(a.(*AzureStackHCIVirtualMachineStatus), b.(*v1beta1.AzureStackHCIVirtualMachineStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.AzureStackHCIVirtualMachineStatus)(nil), (*AzureStackHCIVirtualMachineStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha4_AzureStackHCIVirtualMachineStatus(a.(*v1beta1.AzureStackHCIVirtualMachineStatus), b.(*AzureStackHCIVirtualMachineStatus), 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((*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.AddGeneratedConversionFunc((*ManagedDisk)(nil), (*v1beta1.ManagedDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_ManagedDisk_To_v1beta1_ManagedDisk(a.(*ManagedDisk), b.(*v1beta1.ManagedDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.ManagedDisk)(nil), (*ManagedDisk)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedDisk_To_v1alpha4_ManagedDisk(a.(*v1beta1.ManagedDisk), b.(*ManagedDisk), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NetworkSpec)(nil), (*v1beta1.NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(a.(*NetworkSpec), b.(*v1beta1.NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.NetworkSpec)(nil), (*NetworkSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(a.(*v1beta1.NetworkSpec), b.(*NetworkSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*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((*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.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*VM)(nil), (*v1beta1.VM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha4_VM_To_v1beta1_VM(a.(*VM), b.(*v1beta1.VM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.VM)(nil), (*VM)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VM_To_v1alpha4_VM(a.(*v1beta1.VM), b.(*VM), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*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.AddGeneratedConversionFunc((*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 - } - 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((*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 - } - return nil -} - -func autoConvert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone(in *AvailabilityZone, out *v1beta1.AvailabilityZone, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) - return nil -} - -// Convert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone is an autogenerated conversion function. -func Convert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone(in *AvailabilityZone, out *v1beta1.AvailabilityZone, s conversion.Scope) error { - return autoConvert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone(in, out, s) -} - -func autoConvert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone(in *v1beta1.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.Enabled = (*bool)(unsafe.Pointer(in.Enabled)) - return nil -} - -// Convert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone is an autogenerated conversion function. -func Convert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone(in *v1beta1.AvailabilityZone, out *AvailabilityZone, s conversion.Scope) error { - return autoConvert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(in *AzureStackHCICluster, out *v1beta1.AzureStackHCICluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(in *AzureStackHCICluster, out *v1beta1.AzureStackHCICluster, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster(in *v1beta1.AzureStackHCICluster, out *AzureStackHCICluster, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha4_AzureStackHCIClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha4_AzureStackHCIClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster(in *v1beta1.AzureStackHCICluster, out *AzureStackHCICluster, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(in *AzureStackHCIClusterList, out *v1beta1.AzureStackHCIClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1beta1.AzureStackHCICluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha4_AzureStackHCICluster_To_v1beta1_AzureStackHCICluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha4_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(in *AzureStackHCIClusterList, out *v1beta1.AzureStackHCIClusterList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIClusterList_To_v1beta1_AzureStackHCIClusterList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIClusterList_To_v1alpha4_AzureStackHCIClusterList(in *v1beta1.AzureStackHCIClusterList, out *AzureStackHCIClusterList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCICluster, len(*in)) - for i := range *in { - if err := Convert_v1beta1_AzureStackHCICluster_To_v1alpha4_AzureStackHCICluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha4_AzureStackHCIClusterList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIClusterList_To_v1alpha4_AzureStackHCIClusterList(in *v1beta1.AzureStackHCIClusterList, out *AzureStackHCIClusterList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIClusterList_To_v1alpha4_AzureStackHCIClusterList(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(in *AzureStackHCIClusterSpec, out *v1beta1.AzureStackHCIClusterSpec, 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 - out.Location = in.Location - out.AzureStackHCILoadBalancer = (*v1beta1.AzureStackHCILoadBalancerSpec)(unsafe.Pointer(in.AzureStackHCILoadBalancer)) - if err := Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.Management = in.Management - return nil -} - -// Convert_v1alpha4_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(in *AzureStackHCIClusterSpec, out *v1beta1.AzureStackHCIClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIClusterSpec_To_v1beta1_AzureStackHCIClusterSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha4_AzureStackHCIClusterSpec(in *v1beta1.AzureStackHCIClusterSpec, out *AzureStackHCIClusterSpec, s conversion.Scope) error { - if err := Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(&in.NetworkSpec, &out.NetworkSpec, s); err != nil { - return err - } - out.ResourceGroup = in.ResourceGroup - out.Location = in.Location - out.AzureStackHCILoadBalancer = (*AzureStackHCILoadBalancerSpec)(unsafe.Pointer(in.AzureStackHCILoadBalancer)) - if err := Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint(&in.ControlPlaneEndpoint, &out.ControlPlaneEndpoint, s); err != nil { - return err - } - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.Management = in.Management - return nil -} - -// Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha4_AzureStackHCIClusterSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha4_AzureStackHCIClusterSpec(in *v1beta1.AzureStackHCIClusterSpec, out *AzureStackHCIClusterSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIClusterSpec_To_v1alpha4_AzureStackHCIClusterSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(in *AzureStackHCIClusterStatus, out *v1beta1.AzureStackHCIClusterStatus, s conversion.Scope) error { - if err := Convert_v1alpha4_VM_To_v1beta1_VM(&in.Bastion, &out.Bastion, s); err != nil { - return err - } - out.Ready = in.Ready - out.Phase = in.Phase - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(in *AzureStackHCIClusterStatus, out *v1beta1.AzureStackHCIClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIClusterStatus_To_v1beta1_AzureStackHCIClusterStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha4_AzureStackHCIClusterStatus(in *v1beta1.AzureStackHCIClusterStatus, out *AzureStackHCIClusterStatus, s conversion.Scope) error { - if err := Convert_v1beta1_VM_To_v1alpha4_VM(&in.Bastion, &out.Bastion, s); err != nil { - return err - } - out.Ready = in.Ready - out.Phase = in.Phase - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha4_AzureStackHCIClusterStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha4_AzureStackHCIClusterStatus(in *v1beta1.AzureStackHCIClusterStatus, out *AzureStackHCIClusterStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIClusterStatus_To_v1alpha4_AzureStackHCIClusterStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(in *AzureStackHCILoadBalancer, out *v1beta1.AzureStackHCILoadBalancer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(in *AzureStackHCILoadBalancer, out *v1beta1.AzureStackHCILoadBalancer, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCILoadBalancer_To_v1beta1_AzureStackHCILoadBalancer(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha4_AzureStackHCILoadBalancer(in *v1beta1.AzureStackHCILoadBalancer, out *AzureStackHCILoadBalancer, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHCILoadBalancerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha4_AzureStackHCILoadBalancerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha4_AzureStackHCILoadBalancer is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha4_AzureStackHCILoadBalancer(in *v1beta1.AzureStackHCILoadBalancer, out *AzureStackHCILoadBalancer, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancer_To_v1alpha4_AzureStackHCILoadBalancer(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(in *AzureStackHCILoadBalancerList, out *v1beta1.AzureStackHCILoadBalancerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCILoadBalancer)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(in *AzureStackHCILoadBalancerList, out *v1beta1.AzureStackHCILoadBalancerList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCILoadBalancerList_To_v1beta1_AzureStackHCILoadBalancerList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha4_AzureStackHCILoadBalancerList(in *v1beta1.AzureStackHCILoadBalancerList, out *AzureStackHCILoadBalancerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCILoadBalancer)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha4_AzureStackHCILoadBalancerList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha4_AzureStackHCILoadBalancerList(in *v1beta1.AzureStackHCILoadBalancerList, out *AzureStackHCILoadBalancerList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancerList_To_v1alpha4_AzureStackHCILoadBalancerList(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(in *AzureStackHCILoadBalancerSpec, out *v1beta1.AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - out.SSHPublicKey = in.SSHPublicKey - if err := Convert_v1alpha4_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - out.VMSize = in.VMSize - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - return nil -} - -// Convert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(in *AzureStackHCILoadBalancerSpec, out *v1beta1.AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCILoadBalancerSpec_To_v1beta1_AzureStackHCILoadBalancerSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHCILoadBalancerSpec(in *v1beta1.AzureStackHCILoadBalancerSpec, out *AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - out.SSHPublicKey = in.SSHPublicKey - if err := Convert_v1beta1_Image_To_v1alpha4_Image(&in.Image, &out.Image, s); err != nil { - return err - } - out.VMSize = in.VMSize - out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHCILoadBalancerSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHCILoadBalancerSpec(in *v1beta1.AzureStackHCILoadBalancerSpec, out *AzureStackHCILoadBalancerSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancerSpec_To_v1alpha4_AzureStackHCILoadBalancerSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(in *AzureStackHCILoadBalancerStatus, out *v1beta1.AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ReadyReplicas = in.ReadyReplicas - out.FailedReplicas = in.FailedReplicas - out.Address = in.Address - out.Port = in.Port - out.Phase = in.Phase - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - out.Selector = in.Selector - return nil -} - -// Convert_v1alpha4_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(in *AzureStackHCILoadBalancerStatus, out *v1beta1.AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCILoadBalancerStatus_To_v1beta1_AzureStackHCILoadBalancerStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha4_AzureStackHCILoadBalancerStatus(in *v1beta1.AzureStackHCILoadBalancerStatus, out *AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Replicas = in.Replicas - out.ReadyReplicas = in.ReadyReplicas - out.FailedReplicas = in.FailedReplicas - out.Address = in.Address - out.Port = in.Port - out.Phase = in.Phase - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - out.ErrorReason = (*errors.MachineStatusError)(unsafe.Pointer(in.ErrorReason)) - out.ErrorMessage = (*string)(unsafe.Pointer(in.ErrorMessage)) - out.Selector = in.Selector - return nil -} - -// Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha4_AzureStackHCILoadBalancerStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha4_AzureStackHCILoadBalancerStatus(in *v1beta1.AzureStackHCILoadBalancerStatus, out *AzureStackHCILoadBalancerStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCILoadBalancerStatus_To_v1alpha4_AzureStackHCILoadBalancerStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(in *AzureStackHCIMachine, out *v1beta1.AzureStackHCIMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(in *AzureStackHCIMachine, out *v1beta1.AzureStackHCIMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachine_To_v1beta1_AzureStackHCIMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachine_To_v1alpha4_AzureStackHCIMachine(in *v1beta1.AzureStackHCIMachine, out *AzureStackHCIMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha4_AzureStackHCIMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachine_To_v1alpha4_AzureStackHCIMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachine_To_v1alpha4_AzureStackHCIMachine(in *v1beta1.AzureStackHCIMachine, out *AzureStackHCIMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachine_To_v1alpha4_AzureStackHCIMachine(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(in *AzureStackHCIMachineList, out *v1beta1.AzureStackHCIMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCIMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(in *AzureStackHCIMachineList, out *v1beta1.AzureStackHCIMachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineList_To_v1beta1_AzureStackHCIMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineList_To_v1alpha4_AzureStackHCIMachineList(in *v1beta1.AzureStackHCIMachineList, out *AzureStackHCIMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCIMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha4_AzureStackHCIMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineList_To_v1alpha4_AzureStackHCIMachineList(in *v1beta1.AzureStackHCIMachineList, out *AzureStackHCIMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineList_To_v1alpha4_AzureStackHCIMachineList(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(in *AzureStackHCIMachineProviderCondition, out *v1beta1.AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - out.Type = v1beta1.AzureStackHCIMachineProviderConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - out.LastProbeTime = in.LastProbeTime - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(in *AzureStackHCIMachineProviderCondition, out *v1beta1.AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineProviderCondition_To_v1beta1_AzureStackHCIMachineProviderCondition(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha4_AzureStackHCIMachineProviderCondition(in *v1beta1.AzureStackHCIMachineProviderCondition, out *AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - out.Type = AzureStackHCIMachineProviderConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - out.LastProbeTime = in.LastProbeTime - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha4_AzureStackHCIMachineProviderCondition is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha4_AzureStackHCIMachineProviderCondition(in *v1beta1.AzureStackHCIMachineProviderCondition, out *AzureStackHCIMachineProviderCondition, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineProviderCondition_To_v1alpha4_AzureStackHCIMachineProviderCondition(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(in *AzureStackHCIMachineSpec, out *v1beta1.AzureStackHCIMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - if err := Convert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1alpha4_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.AllocatePublicIP = in.AllocatePublicIP - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(in *AzureStackHCIMachineSpec, out *v1beta1.AzureStackHCIMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(in *v1beta1.AzureStackHCIMachineSpec, out *AzureStackHCIMachineSpec, s conversion.Scope) error { - out.ProviderID = (*string)(unsafe.Pointer(in.ProviderID)) - out.VMSize = in.VMSize - if err := Convert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1beta1_Image_To_v1alpha4_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.AllocatePublicIP = in.AllocatePublicIP - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(in *v1beta1.AzureStackHCIMachineSpec, out *AzureStackHCIMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(in *AzureStackHCIMachineStatus, out *v1beta1.AzureStackHCIMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*v1beta1.VMState)(unsafe.Pointer(in.VMState)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(in *AzureStackHCIMachineStatus, out *v1beta1.AzureStackHCIMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineStatus_To_v1beta1_AzureStackHCIMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha4_AzureStackHCIMachineStatus(in *v1beta1.AzureStackHCIMachineStatus, out *AzureStackHCIMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*VMState)(unsafe.Pointer(in.VMState)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha4_AzureStackHCIMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha4_AzureStackHCIMachineStatus(in *v1beta1.AzureStackHCIMachineStatus, out *AzureStackHCIMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineStatus_To_v1alpha4_AzureStackHCIMachineStatus(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(in *AzureStackHCIMachineTemplate, out *v1beta1.AzureStackHCIMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(in *AzureStackHCIMachineTemplate, out *v1beta1.AzureStackHCIMachineTemplate, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineTemplate_To_v1beta1_AzureStackHCIMachineTemplate(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha4_AzureStackHCIMachineTemplate(in *v1beta1.AzureStackHCIMachineTemplate, out *AzureStackHCIMachineTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha4_AzureStackHCIMachineTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha4_AzureStackHCIMachineTemplate is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha4_AzureStackHCIMachineTemplate(in *v1beta1.AzureStackHCIMachineTemplate, out *AzureStackHCIMachineTemplate, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplate_To_v1alpha4_AzureStackHCIMachineTemplate(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(in *AzureStackHCIMachineTemplateList, out *v1beta1.AzureStackHCIMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCIMachineTemplate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(in *AzureStackHCIMachineTemplateList, out *v1beta1.AzureStackHCIMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineTemplateList_To_v1beta1_AzureStackHCIMachineTemplateList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha4_AzureStackHCIMachineTemplateList(in *v1beta1.AzureStackHCIMachineTemplateList, out *AzureStackHCIMachineTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCIMachineTemplate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha4_AzureStackHCIMachineTemplateList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha4_AzureStackHCIMachineTemplateList(in *v1beta1.AzureStackHCIMachineTemplateList, out *AzureStackHCIMachineTemplateList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplateList_To_v1alpha4_AzureStackHCIMachineTemplateList(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(in *AzureStackHCIMachineTemplateResource, out *v1beta1.AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1alpha4_AzureStackHCIMachineSpec_To_v1beta1_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(in *AzureStackHCIMachineTemplateResource, out *v1beta1.AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha4_AzureStackHCIMachineTemplateResource(in *v1beta1.AzureStackHCIMachineTemplateResource, out *AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - if err := Convert_v1beta1_AzureStackHCIMachineSpec_To_v1alpha4_AzureStackHCIMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha4_AzureStackHCIMachineTemplateResource is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha4_AzureStackHCIMachineTemplateResource(in *v1beta1.AzureStackHCIMachineTemplateResource, out *AzureStackHCIMachineTemplateResource, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha4_AzureStackHCIMachineTemplateResource(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(in *AzureStackHCIMachineTemplateSpec, out *v1beta1.AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1alpha4_AzureStackHCIMachineTemplateResource_To_v1beta1_AzureStackHCIMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(in *AzureStackHCIMachineTemplateSpec, out *v1beta1.AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIMachineTemplateSpec_To_v1beta1_AzureStackHCIMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha4_AzureStackHCIMachineTemplateSpec(in *v1beta1.AzureStackHCIMachineTemplateSpec, out *AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - if err := Convert_v1beta1_AzureStackHCIMachineTemplateResource_To_v1alpha4_AzureStackHCIMachineTemplateResource(&in.Template, &out.Template, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha4_AzureStackHCIMachineTemplateSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha4_AzureStackHCIMachineTemplateSpec(in *v1beta1.AzureStackHCIMachineTemplateSpec, out *AzureStackHCIMachineTemplateSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIMachineTemplateSpec_To_v1alpha4_AzureStackHCIMachineTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(in *AzureStackHCIResourceReference, out *v1beta1.AzureStackHCIResourceReference, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(in *AzureStackHCIResourceReference, out *v1beta1.AzureStackHCIResourceReference, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIResourceReference_To_v1beta1_AzureStackHCIResourceReference(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIResourceReference_To_v1alpha4_AzureStackHCIResourceReference(in *v1beta1.AzureStackHCIResourceReference, out *AzureStackHCIResourceReference, s conversion.Scope) error { - out.ID = (*string)(unsafe.Pointer(in.ID)) - return nil -} - -// Convert_v1beta1_AzureStackHCIResourceReference_To_v1alpha4_AzureStackHCIResourceReference is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIResourceReference_To_v1alpha4_AzureStackHCIResourceReference(in *v1beta1.AzureStackHCIResourceReference, out *AzureStackHCIResourceReference, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIResourceReference_To_v1alpha4_AzureStackHCIResourceReference(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(in *AzureStackHCIVirtualMachine, out *v1beta1.AzureStackHCIVirtualMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha4_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha4_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(in *AzureStackHCIVirtualMachine, out *v1beta1.AzureStackHCIVirtualMachine, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIVirtualMachine_To_v1beta1_AzureStackHCIVirtualMachine(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha4_AzureStackHCIVirtualMachine(in *v1beta1.AzureStackHCIVirtualMachine, out *AzureStackHCIVirtualMachine, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha4_AzureStackHCIVirtualMachineStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha4_AzureStackHCIVirtualMachine is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha4_AzureStackHCIVirtualMachine(in *v1beta1.AzureStackHCIVirtualMachine, out *AzureStackHCIVirtualMachine, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachine_To_v1alpha4_AzureStackHCIVirtualMachine(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(in *AzureStackHCIVirtualMachineList, out *v1beta1.AzureStackHCIVirtualMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1beta1.AzureStackHCIVirtualMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(in *AzureStackHCIVirtualMachineList, out *v1beta1.AzureStackHCIVirtualMachineList, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIVirtualMachineList_To_v1beta1_AzureStackHCIVirtualMachineList(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha4_AzureStackHCIVirtualMachineList(in *v1beta1.AzureStackHCIVirtualMachineList, out *AzureStackHCIVirtualMachineList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]AzureStackHCIVirtualMachine)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha4_AzureStackHCIVirtualMachineList is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha4_AzureStackHCIVirtualMachineList(in *v1beta1.AzureStackHCIVirtualMachineList, out *AzureStackHCIVirtualMachineList, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachineList_To_v1alpha4_AzureStackHCIVirtualMachineList(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(in *AzureStackHCIVirtualMachineSpec, out *v1beta1.AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - out.VMSize = in.VMSize - if err := Convert_v1alpha4_AvailabilityZone_To_v1beta1_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1alpha4_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = (*string)(unsafe.Pointer(in.BootstrapData)) - out.Identity = v1beta1.VMIdentity(in.Identity) - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.ResourceGroup = in.ResourceGroup - out.VnetName = in.VnetName - out.ClusterName = in.ClusterName - out.SubnetName = in.SubnetName - out.BackendPoolNames = *(*[]string)(unsafe.Pointer(&in.BackendPoolNames)) - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(in *AzureStackHCIVirtualMachineSpec, out *v1beta1.AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIVirtualMachineSpec_To_v1beta1_AzureStackHCIVirtualMachineSpec(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec(in *v1beta1.AzureStackHCIVirtualMachineSpec, out *AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - out.VMSize = in.VMSize - if err := Convert_v1beta1_AvailabilityZone_To_v1alpha4_AvailabilityZone(&in.AvailabilityZone, &out.AvailabilityZone, s); err != nil { - return err - } - if err := Convert_v1beta1_Image_To_v1alpha4_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = (*string)(unsafe.Pointer(in.BootstrapData)) - out.Identity = VMIdentity(in.Identity) - out.Location = in.Location - out.SSHPublicKey = in.SSHPublicKey - out.ResourceGroup = in.ResourceGroup - out.VnetName = in.VnetName - out.ClusterName = in.ClusterName - out.SubnetName = in.SubnetName - out.BackendPoolNames = *(*[]string)(unsafe.Pointer(&in.BackendPoolNames)) - out.AdditionalSSHKeys = *(*[]string)(unsafe.Pointer(&in.AdditionalSSHKeys)) - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec(in *v1beta1.AzureStackHCIVirtualMachineSpec, out *AzureStackHCIVirtualMachineSpec, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachineSpec_To_v1alpha4_AzureStackHCIVirtualMachineSpec(in, out, s) -} - -func autoConvert_v1alpha4_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(in *AzureStackHCIVirtualMachineStatus, out *v1beta1.AzureStackHCIVirtualMachineStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.Addresses = *(*[]v1.NodeAddress)(unsafe.Pointer(&in.Addresses)) - out.VMState = (*v1beta1.VMState)(unsafe.Pointer(in.VMState)) - out.FailureReason = (*errors.MachineStatusError)(unsafe.Pointer(in.FailureReason)) - out.FailureMessage = (*string)(unsafe.Pointer(in.FailureMessage)) - out.Conditions = *(*apiv1beta1.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1alpha4_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus is an autogenerated conversion function. -func Convert_v1alpha4_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(in *AzureStackHCIVirtualMachineStatus, out *v1beta1.AzureStackHCIVirtualMachineStatus, s conversion.Scope) error { - return autoConvert_v1alpha4_AzureStackHCIVirtualMachineStatus_To_v1beta1_AzureStackHCIVirtualMachineStatus(in, out, s) -} - -func autoConvert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha4_AzureStackHCIVirtualMachineStatus(in *v1beta1.AzureStackHCIVirtualMachineStatus, out *AzureStackHCIVirtualMachineStatus, 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)) - out.Conditions = *(*apiv1alpha4.Conditions)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha4_AzureStackHCIVirtualMachineStatus is an autogenerated conversion function. -func Convert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha4_AzureStackHCIVirtualMachineStatus(in *v1beta1.AzureStackHCIVirtualMachineStatus, out *AzureStackHCIVirtualMachineStatus, s conversion.Scope) error { - return autoConvert_v1beta1_AzureStackHCIVirtualMachineStatus_To_v1alpha4_AzureStackHCIVirtualMachineStatus(in, out, s) -} - -func autoConvert_v1alpha4_Image_To_v1beta1_Image(in *Image, out *v1beta1.Image, s conversion.Scope) error { - out.Publisher = (*string)(unsafe.Pointer(in.Publisher)) - out.Offer = (*string)(unsafe.Pointer(in.Offer)) - out.SKU = (*string)(unsafe.Pointer(in.SKU)) - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.SubscriptionID = (*string)(unsafe.Pointer(in.SubscriptionID)) - out.ResourceGroup = (*string)(unsafe.Pointer(in.ResourceGroup)) - out.Gallery = (*string)(unsafe.Pointer(in.Gallery)) - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.OSType = v1beta1.OSType(in.OSType) - 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.Publisher = (*string)(unsafe.Pointer(in.Publisher)) - out.Offer = (*string)(unsafe.Pointer(in.Offer)) - out.SKU = (*string)(unsafe.Pointer(in.SKU)) - out.ID = (*string)(unsafe.Pointer(in.ID)) - out.SubscriptionID = (*string)(unsafe.Pointer(in.SubscriptionID)) - out.ResourceGroup = (*string)(unsafe.Pointer(in.ResourceGroup)) - out.Gallery = (*string)(unsafe.Pointer(in.Gallery)) - out.Name = (*string)(unsafe.Pointer(in.Name)) - out.Version = (*string)(unsafe.Pointer(in.Version)) - out.OSType = OSType(in.OSType) - return nil -} - -// Convert_v1beta1_Image_To_v1alpha4_Image is an autogenerated conversion function. -func Convert_v1beta1_Image_To_v1alpha4_Image(in *v1beta1.Image, out *Image, s conversion.Scope) error { - return autoConvert_v1beta1_Image_To_v1alpha4_Image(in, out, s) -} - -func autoConvert_v1alpha4_ManagedDisk_To_v1beta1_ManagedDisk(in *ManagedDisk, out *v1beta1.ManagedDisk, s conversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - return nil -} - -// Convert_v1alpha4_ManagedDisk_To_v1beta1_ManagedDisk is an autogenerated conversion function. -func Convert_v1alpha4_ManagedDisk_To_v1beta1_ManagedDisk(in *ManagedDisk, out *v1beta1.ManagedDisk, s conversion.Scope) error { - return autoConvert_v1alpha4_ManagedDisk_To_v1beta1_ManagedDisk(in, out, s) -} - -func autoConvert_v1beta1_ManagedDisk_To_v1alpha4_ManagedDisk(in *v1beta1.ManagedDisk, out *ManagedDisk, s conversion.Scope) error { - out.StorageAccountType = in.StorageAccountType - return nil -} - -// Convert_v1beta1_ManagedDisk_To_v1alpha4_ManagedDisk is an autogenerated conversion function. -func Convert_v1beta1_ManagedDisk_To_v1alpha4_ManagedDisk(in *v1beta1.ManagedDisk, out *ManagedDisk, s conversion.Scope) error { - return autoConvert_v1beta1_ManagedDisk_To_v1alpha4_ManagedDisk(in, out, s) -} - -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 - } - out.Subnets = *(*v1beta1.Subnets)(unsafe.Pointer(&in.Subnets)) - return nil -} - -// Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec is an autogenerated conversion function. -func Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in *NetworkSpec, out *v1beta1.NetworkSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec(in, out, s) -} - -func autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - if err := Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(&in.Vnet, &out.Vnet, s); err != nil { - return err - } - out.Subnets = *(*Subnets)(unsafe.Pointer(&in.Subnets)) - return nil -} - -// Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec is an autogenerated conversion function. -func Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in *v1beta1.NetworkSpec, out *NetworkSpec, s conversion.Scope) error { - return autoConvert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec(in, out, s) -} - -func autoConvert_v1alpha4_OSDisk_To_v1beta1_OSDisk(in *OSDisk, out *v1beta1.OSDisk, s conversion.Scope) error { - out.Name = in.Name - out.Source = in.Source - out.OSType = v1beta1.OSType(in.OSType) - out.DiskSizeGB = in.DiskSizeGB - if err := Convert_v1alpha4_ManagedDisk_To_v1beta1_ManagedDisk(&in.ManagedDisk, &out.ManagedDisk, s); err != nil { - return err - } - 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.Name = in.Name - out.Source = in.Source - out.OSType = OSType(in.OSType) - out.DiskSizeGB = in.DiskSizeGB - if err := Convert_v1beta1_ManagedDisk_To_v1alpha4_ManagedDisk(&in.ManagedDisk, &out.ManagedDisk, s); err != nil { - return err - } - 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_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *v1beta1.SubnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.VnetID = in.VnetID - out.CidrBlock = in.CidrBlock - return nil -} - -// Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec is an autogenerated conversion function. -func Convert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(in *SubnetSpec, out *v1beta1.SubnetSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_SubnetSpec_To_v1beta1_SubnetSpec(in, out, s) -} - -func autoConvert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(in *v1beta1.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.VnetID = in.VnetID - out.CidrBlock = in.CidrBlock - return nil -} - -// Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec is an autogenerated conversion function. -func Convert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(in *v1beta1.SubnetSpec, out *SubnetSpec, s conversion.Scope) error { - return autoConvert_v1beta1_SubnetSpec_To_v1alpha4_SubnetSpec(in, out, s) -} - -func autoConvert_v1alpha4_VM_To_v1beta1_VM(in *VM, out *v1beta1.VM, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.AvailabilityZone = in.AvailabilityZone - out.VMSize = in.VMSize - if err := Convert_v1alpha4_Image_To_v1beta1_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = in.BootstrapData - out.State = v1beta1.VMState(in.State) - out.Identity = v1beta1.VMIdentity(in.Identity) - return nil -} - -// Convert_v1alpha4_VM_To_v1beta1_VM is an autogenerated conversion function. -func Convert_v1alpha4_VM_To_v1beta1_VM(in *VM, out *v1beta1.VM, s conversion.Scope) error { - return autoConvert_v1alpha4_VM_To_v1beta1_VM(in, out, s) -} - -func autoConvert_v1beta1_VM_To_v1alpha4_VM(in *v1beta1.VM, out *VM, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.AvailabilityZone = in.AvailabilityZone - out.VMSize = in.VMSize - if err := Convert_v1beta1_Image_To_v1alpha4_Image(&in.Image, &out.Image, s); err != nil { - return err - } - if err := Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk(&in.OSDisk, &out.OSDisk, s); err != nil { - return err - } - out.BootstrapData = in.BootstrapData - out.State = VMState(in.State) - out.Identity = VMIdentity(in.Identity) - return nil -} - -// Convert_v1beta1_VM_To_v1alpha4_VM is an autogenerated conversion function. -func Convert_v1beta1_VM_To_v1alpha4_VM(in *v1beta1.VM, out *VM, s conversion.Scope) error { - return autoConvert_v1beta1_VM_To_v1alpha4_VM(in, out, s) -} - -func autoConvert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *v1beta1.VnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.CidrBlock = in.CidrBlock - out.Group = in.Group - return nil -} - -// Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec is an autogenerated conversion function. -func Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(in *VnetSpec, out *v1beta1.VnetSpec, s conversion.Scope) error { - return autoConvert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec(in, out, s) -} - -func autoConvert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(in *v1beta1.VnetSpec, out *VnetSpec, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.CidrBlock = in.CidrBlock - out.Group = in.Group - return nil -} - -// Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec is an autogenerated conversion function. -func Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(in *v1beta1.VnetSpec, out *VnetSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec(in, out, s) -} diff --git a/api/v1alpha4/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go deleted file mode 100644 index 472c653b..00000000 --- a/api/v1alpha4/zz_generated.deepcopy.go +++ /dev/null @@ -1,881 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. -Portions Copyright © Microsoft Corporation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha4 - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - apiv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4" - "sigs.k8s.io/cluster-api/errors" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *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 *AzureStackHCICluster) DeepCopyInto(out *AzureStackHCICluster) { - *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 AzureStackHCICluster. -func (in *AzureStackHCICluster) DeepCopy() *AzureStackHCICluster { - if in == nil { - return nil - } - out := new(AzureStackHCICluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCICluster) 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 *AzureStackHCIClusterList) DeepCopyInto(out *AzureStackHCIClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCICluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIClusterList. -func (in *AzureStackHCIClusterList) DeepCopy() *AzureStackHCIClusterList { - if in == nil { - return nil - } - out := new(AzureStackHCIClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIClusterList) 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 *AzureStackHCIClusterSpec) DeepCopyInto(out *AzureStackHCIClusterSpec) { - *out = *in - in.NetworkSpec.DeepCopyInto(&out.NetworkSpec) - if in.AzureStackHCILoadBalancer != nil { - in, out := &in.AzureStackHCILoadBalancer, &out.AzureStackHCILoadBalancer - *out = new(AzureStackHCILoadBalancerSpec) - (*in).DeepCopyInto(*out) - } - out.ControlPlaneEndpoint = in.ControlPlaneEndpoint - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIClusterSpec. -func (in *AzureStackHCIClusterSpec) DeepCopy() *AzureStackHCIClusterSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIClusterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIClusterStatus) DeepCopyInto(out *AzureStackHCIClusterStatus) { - *out = *in - in.Bastion.DeepCopyInto(&out.Bastion) - 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 AzureStackHCIClusterStatus. -func (in *AzureStackHCIClusterStatus) DeepCopy() *AzureStackHCIClusterStatus { - if in == nil { - return nil - } - out := new(AzureStackHCIClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCILoadBalancer) DeepCopyInto(out *AzureStackHCILoadBalancer) { - *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 AzureStackHCILoadBalancer. -func (in *AzureStackHCILoadBalancer) DeepCopy() *AzureStackHCILoadBalancer { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCILoadBalancer) 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 *AzureStackHCILoadBalancerList) DeepCopyInto(out *AzureStackHCILoadBalancerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCILoadBalancer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCILoadBalancerList. -func (in *AzureStackHCILoadBalancerList) DeepCopy() *AzureStackHCILoadBalancerList { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCILoadBalancerList) 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 *AzureStackHCILoadBalancerSpec) DeepCopyInto(out *AzureStackHCILoadBalancerSpec) { - *out = *in - in.Image.DeepCopyInto(&out.Image) - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCILoadBalancerSpec. -func (in *AzureStackHCILoadBalancerSpec) DeepCopy() *AzureStackHCILoadBalancerSpec { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCILoadBalancerStatus) DeepCopyInto(out *AzureStackHCILoadBalancerStatus) { - *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.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 AzureStackHCILoadBalancerStatus. -func (in *AzureStackHCILoadBalancerStatus) DeepCopy() *AzureStackHCILoadBalancerStatus { - if in == nil { - return nil - } - out := new(AzureStackHCILoadBalancerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachine) DeepCopyInto(out *AzureStackHCIMachine) { - *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 AzureStackHCIMachine. -func (in *AzureStackHCIMachine) DeepCopy() *AzureStackHCIMachine { - if in == nil { - return nil - } - out := new(AzureStackHCIMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachine) 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 *AzureStackHCIMachineList) DeepCopyInto(out *AzureStackHCIMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCIMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineList. -func (in *AzureStackHCIMachineList) DeepCopy() *AzureStackHCIMachineList { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachineList) 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 *AzureStackHCIMachineProviderCondition) DeepCopyInto(out *AzureStackHCIMachineProviderCondition) { - *out = *in - in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineProviderCondition. -func (in *AzureStackHCIMachineProviderCondition) DeepCopy() *AzureStackHCIMachineProviderCondition { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineProviderCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineSpec) DeepCopyInto(out *AzureStackHCIMachineSpec) { - *out = *in - if in.ProviderID != nil { - in, out := &in.ProviderID, &out.ProviderID - *out = new(string) - **out = **in - } - in.AvailabilityZone.DeepCopyInto(&out.AvailabilityZone) - in.Image.DeepCopyInto(&out.Image) - out.OSDisk = in.OSDisk - if in.AdditionalSSHKeys != nil { - in, out := &in.AdditionalSSHKeys, &out.AdditionalSSHKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineSpec. -func (in *AzureStackHCIMachineSpec) DeepCopy() *AzureStackHCIMachineSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineStatus) DeepCopyInto(out *AzureStackHCIMachineStatus) { - *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.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.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 - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineStatus. -func (in *AzureStackHCIMachineStatus) DeepCopy() *AzureStackHCIMachineStatus { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineTemplate) DeepCopyInto(out *AzureStackHCIMachineTemplate) { - *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 AzureStackHCIMachineTemplate. -func (in *AzureStackHCIMachineTemplate) DeepCopy() *AzureStackHCIMachineTemplate { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachineTemplate) 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 *AzureStackHCIMachineTemplateList) DeepCopyInto(out *AzureStackHCIMachineTemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCIMachineTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineTemplateList. -func (in *AzureStackHCIMachineTemplateList) DeepCopy() *AzureStackHCIMachineTemplateList { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIMachineTemplateList) 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 *AzureStackHCIMachineTemplateResource) DeepCopyInto(out *AzureStackHCIMachineTemplateResource) { - *out = *in - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineTemplateResource. -func (in *AzureStackHCIMachineTemplateResource) DeepCopy() *AzureStackHCIMachineTemplateResource { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplateResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIMachineTemplateSpec) DeepCopyInto(out *AzureStackHCIMachineTemplateSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIMachineTemplateSpec. -func (in *AzureStackHCIMachineTemplateSpec) DeepCopy() *AzureStackHCIMachineTemplateSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIMachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIResourceReference) DeepCopyInto(out *AzureStackHCIResourceReference) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIResourceReference. -func (in *AzureStackHCIResourceReference) DeepCopy() *AzureStackHCIResourceReference { - if in == nil { - return nil - } - out := new(AzureStackHCIResourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIVirtualMachine) DeepCopyInto(out *AzureStackHCIVirtualMachine) { - *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 AzureStackHCIVirtualMachine. -func (in *AzureStackHCIVirtualMachine) DeepCopy() *AzureStackHCIVirtualMachine { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIVirtualMachine) 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 *AzureStackHCIVirtualMachineList) DeepCopyInto(out *AzureStackHCIVirtualMachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AzureStackHCIVirtualMachine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIVirtualMachineList. -func (in *AzureStackHCIVirtualMachineList) DeepCopy() *AzureStackHCIVirtualMachineList { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureStackHCIVirtualMachineList) 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 *AzureStackHCIVirtualMachineSpec) DeepCopyInto(out *AzureStackHCIVirtualMachineSpec) { - *out = *in - in.AvailabilityZone.DeepCopyInto(&out.AvailabilityZone) - in.Image.DeepCopyInto(&out.Image) - out.OSDisk = in.OSDisk - if in.BootstrapData != nil { - in, out := &in.BootstrapData, &out.BootstrapData - *out = new(string) - **out = **in - } - if in.BackendPoolNames != nil { - in, out := &in.BackendPoolNames, &out.BackendPoolNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AdditionalSSHKeys != nil { - in, out := &in.AdditionalSSHKeys, &out.AdditionalSSHKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureStackHCIVirtualMachineSpec. -func (in *AzureStackHCIVirtualMachineSpec) DeepCopy() *AzureStackHCIVirtualMachineSpec { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureStackHCIVirtualMachineStatus) DeepCopyInto(out *AzureStackHCIVirtualMachineStatus) { - *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(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 AzureStackHCIVirtualMachineStatus. -func (in *AzureStackHCIVirtualMachineStatus) DeepCopy() *AzureStackHCIVirtualMachineStatus { - if in == nil { - return nil - } - out := new(AzureStackHCIVirtualMachineStatus) - 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.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 - } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.SubscriptionID != nil { - in, out := &in.SubscriptionID, &out.SubscriptionID - *out = new(string) - **out = **in - } - if in.ResourceGroup != nil { - in, out := &in.ResourceGroup, &out.ResourceGroup - *out = new(string) - **out = **in - } - if in.Gallery != nil { - in, out := &in.Gallery, &out.Gallery - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(string) - **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 *ManagedDisk) DeepCopyInto(out *ManagedDisk) { - *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 - out.Vnet = in.Vnet - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make(Subnets, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SubnetSpec) - **out = **in - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OSDisk) DeepCopyInto(out *OSDisk) { - *out = *in - out.ManagedDisk = in.ManagedDisk -} - -// 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 *SubnetSpec) DeepCopyInto(out *SubnetSpec) { - *out = *in -} - -// 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 { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(SubnetSpec) - **out = **in - } - } - } -} - -// 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 *VM) DeepCopyInto(out *VM) { - *out = *in - in.Image.DeepCopyInto(&out.Image) - out.OSDisk = in.OSDisk -} - -// 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 VirtualMachinesByCreationTimestamp) DeepCopyInto(out *VirtualMachinesByCreationTimestamp) { - { - in := &in - *out = make(VirtualMachinesByCreationTimestamp, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(AzureStackHCIVirtualMachine) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinesByCreationTimestamp. -func (in VirtualMachinesByCreationTimestamp) DeepCopy() VirtualMachinesByCreationTimestamp { - if in == nil { - return nil - } - out := new(VirtualMachinesByCreationTimestamp) - 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 -} - -// 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/cmd/manager/main.go b/cmd/manager/main.go index 16e08991..cc7c4c64 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -26,8 +26,6 @@ import ( "os" "time" - infrav1alpha3 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1alpha3" - infrav1alpha4 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1alpha4" infrav1beta1 "github.com/microsoft/cluster-api-provider-azurestackhci/api/v1beta1" // +kubebuilder:scaffold:imports @@ -58,8 +56,6 @@ func init() { _ = clientgoscheme.AddToScheme(scheme) _ = clusterv1.AddToScheme(scheme) - _ = infrav1alpha3.AddToScheme(scheme) - _ = infrav1alpha4.AddToScheme(scheme) _ = infrav1beta1.AddToScheme(scheme) // +kubebuilder:scaffold:scheme } From 4907253cbb3184e3df497b09f9e7fe84ab1471b6 Mon Sep 17 00:00:00 2001 From: Pavan Neerudu Date: Sun, 25 Feb 2024 11:22:51 +0530 Subject: [PATCH 2/3] Remove them in metadata.yaml --- metadata.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/metadata.yaml b/metadata.yaml index da99b98f..2fc8f123 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,12 +1,6 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: -- major: 0 - minor: 3 - contract: v1alpha3 -- major: 0 - minor: 4 - contract: v1alpha4 - major: 1 minor: 1 contract: v1beta1 \ No newline at end of file From a291889a4d45b8468d2f32a8e7100ae641dfdf04 Mon Sep 17 00:00:00 2001 From: Pavan Neerudu Date: Sun, 25 Feb 2024 11:52:36 +0530 Subject: [PATCH 3/3] Update Readme doc --- README.md | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 6555f2cb..ba6de74e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Kubernetes-native declarative infrastructure for Azure Stack HCI. ## What is the Cluster API Provider Azure Stack HCI -The [Cluster API][cluster_api] brings declarative, Kubernetes-style APIs to cluster creation, configuration and management. +The [Cluster API][cluster_api] brings declarative, Kubernetes-style APIs to cluster creation, configuration and management. Cluster API Provider for Azure Stack HCI(CAPH) is an implementation of Cluster API for Azure Stack HCI. The API itself is shared across multiple cloud providers allowing for true Azure Stack HCI hybrid deployments of Kubernetes. @@ -23,21 +23,30 @@ Check out the [Cluster API Quick Start][quickstart] to create your first Kuberne This provider's versions are compatible with the following versions of Cluster API: -| | Cluster API `v1alpha1` (`v0.1.x`) | Cluster API `v1alpha2` (`v0.2.x`) | Cluster API `v1alpha3` (`v0.3.x`) | +| | Cluster API `v1beta1` (`v1.2`) | Cluster API `v1beta1` (`v1.4`) | Cluster API `v1beta1` (`v1.5`) | |---|---|---|---| -|AzureStackHCI Provider `v0.2.x` | | ✓ | | -|AzureStackHCI Provider `v0.3.x` | | | ✓ | - -This provider's versions are able to install and manage the following versions of Kubernetes: - -| | AzureStackHCI Provider `v0.2.x` | AzureStackHCI Provider `v0.3.x` -|---|---|---| -| Kubernetes 1.16 | ✓ | ✓ | -| Kubernetes 1.17 | ✓ | ✓ | -| Kubernetes 1.18 | ✓ | ✓ | - - -Each version of Cluster API for Azure Stack HCI will attempt to support at least two Kubernetes versions e.g., Cluster API for Azure Stack HCI `v0.2` may support Kubernetes 1.14 and Kubernetes 1.15. +| CAPH v1beta1 (`v1.1.8`) | ✓ | X | X | +| CAPH v1beta1 (`v1.1.9`) | ✓ | X | X | +| CAPH v1beta1 (`v1.1.10`) | X | ✓ | X | +| CAPH v1beta1 (`v1.1.11`) | X | ✓ | X | +| CAPH v1beta1 (`v1.1.12`) | X | ✓ | X | +| CAPH v1beta1 (`v1.1.13`) | X | ✓ | X | +| CAPH v1beta1 (`v1.1.14`) | X | ✓ | ✓ | + + +This provider's versions are able to install and manage the following versions of Kubernetes: +| | k8s 1.24 | k8s 1.25 | k8s 1.26 | k8s 1.27 | +|---|---|---|---|---| +| CAPH v1beta1 (`v1.1.8`) | ✓ | ✓ | ✓ | X | +| CAPH v1beta1 (`v1.1.9`) | ✓ | ✓ | ✓ | X | +| CAPH v1beta1 (`v1.1.10`) | ✓ | ✓ | ✓ | X | +| CAPH v1beta1 (`v1.1.11`) | ✓ | ✓ | ✓ | X | +| CAPH v1beta1 (`v1.1.12`) | ✓ | ✓ | ✓ | X | +| CAPH v1beta1 (`v1.1.13`) | X | ✓ | ✓ | ✓ | +| CAPH v1beta1 (`v1.1.14`) | X | ✓ | ✓ | ✓ | + + +Each version of Cluster API Provider for Azure Stack HCI will attempt to support at least two Kubernetes versions e.g., Cluster API for Azure Stack HCI `v1.1.13` supports Kubernetes 1.25, 1.26 and 1.27. **NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this policy may be made to more closely align with other providers in the Cluster API ecosystem.