Skip to content

Commit

Permalink
graduate AKS APIs from experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Jan 13, 2023
1 parent f9e8584 commit 42879bd
Show file tree
Hide file tree
Showing 81 changed files with 4,373 additions and 4,396 deletions.
3 changes: 1 addition & 2 deletions Makefile
Expand Up @@ -337,7 +337,6 @@ create-aks-cluster: $(KUSTOMIZE) $(ENVSUBST) $(KUBECTL) ## Create a aks cluster.
.PHONY: create-cluster
create-cluster: ## Create a workload development Kubernetes cluster on Azure in a kind management cluster.
EXP_CLUSTER_RESOURCE_SET=true \
EXP_AKS=true \
EXP_MACHINE_POOL=true \
$(MAKE) create-management-cluster \
create-workload-cluster
Expand Down Expand Up @@ -707,7 +706,7 @@ kind-create: $(KUBECTL) ## Create capz kind cluster if needed.

.PHONY: tilt-up
tilt-up: install-tools kind-create ## Start tilt and build kind cluster if needed.
EXP_CLUSTER_RESOURCE_SET=true EXP_AKS=true EXP_MACHINE_POOL=true tilt up
EXP_CLUSTER_RESOURCE_SET=true EXP_MACHINE_POOL=true tilt up

.PHONY: delete-cluster
delete-cluster: delete-workload-cluster ## Deletes the example kind cluster "capz".
Expand Down
Expand Up @@ -17,20 +17,20 @@ limitations under the License.
package v1alpha3

import (
infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1"
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// ConvertTo converts this AzureManagedCluster to the Hub version (v1beta1).
func (src *AzureManagedCluster) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1exp.AzureManagedCluster)
dst := dstRaw.(*infrav1.AzureManagedCluster)
if err := Convert_v1alpha3_AzureManagedCluster_To_v1beta1_AzureManagedCluster(src, dst, nil); err != nil {
return err
}

// Manually restore data.
restored := &infrav1exp.AzureManagedCluster{}
restored := &infrav1.AzureManagedCluster{}
if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok {
return err
}
Expand All @@ -40,7 +40,7 @@ func (src *AzureManagedCluster) ConvertTo(dstRaw conversion.Hub) error {

// ConvertFrom converts from the Hub version (v1beta1) to this version.
func (dst *AzureManagedCluster) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1exp.AzureManagedCluster)
src := srcRaw.(*infrav1.AzureManagedCluster)

if err := Convert_v1beta1_AzureManagedCluster_To_v1alpha3_AzureManagedCluster(src, dst, nil); err != nil {
return err
Expand All @@ -52,12 +52,12 @@ func (dst *AzureManagedCluster) ConvertFrom(srcRaw conversion.Hub) error {

// ConvertTo converts this AzureManagedClusterList to the Hub version (v1beta1).
func (src *AzureManagedClusterList) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1exp.AzureManagedClusterList)
dst := dstRaw.(*infrav1.AzureManagedClusterList)
return Convert_v1alpha3_AzureManagedClusterList_To_v1beta1_AzureManagedClusterList(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta1) to this version.
func (dst *AzureManagedClusterList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1exp.AzureManagedClusterList)
src := srcRaw.(*infrav1.AzureManagedClusterList)
return Convert_v1beta1_AzureManagedClusterList_To_v1alpha3_AzureManagedClusterList(src, dst, nil)
}
File renamed without changes.
Expand Up @@ -18,20 +18,20 @@ package v1alpha3

import (
apiconversion "k8s.io/apimachinery/pkg/conversion"
infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1"
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// ConvertTo converts this AzureManagedControlPlane to the Hub version (v1beta1).
func (src *AzureManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1exp.AzureManagedControlPlane)
dst := dstRaw.(*infrav1.AzureManagedControlPlane)
if err := Convert_v1alpha3_AzureManagedControlPlane_To_v1beta1_AzureManagedControlPlane(src, dst, nil); err != nil {
return err
}

// Manually restore data.
restored := &infrav1exp.AzureManagedControlPlane{}
restored := &infrav1.AzureManagedControlPlane{}
if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok {
return err
}
Expand All @@ -53,7 +53,7 @@ func (src *AzureManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error {

// ConvertFrom converts from the Hub version (v1beta1) to this version.
func (dst *AzureManagedControlPlane) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1exp.AzureManagedControlPlane)
src := srcRaw.(*infrav1.AzureManagedControlPlane)

if err := Convert_v1beta1_AzureManagedControlPlane_To_v1alpha3_AzureManagedControlPlane(src, dst, nil); err != nil {
return err
Expand All @@ -64,33 +64,38 @@ func (dst *AzureManagedControlPlane) ConvertFrom(srcRaw conversion.Hub) error {
}

// Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec is an autogenerated conversion function.
func Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(in *infrav1exp.AzureManagedControlPlaneSpec, out *AzureManagedControlPlaneSpec, s apiconversion.Scope) error {
func Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(in *infrav1.AzureManagedControlPlaneSpec, out *AzureManagedControlPlaneSpec, s apiconversion.Scope) error {
return autoConvert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec(in, out, s)
}

// Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus is an autogenerated conversion function.
func Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(in *infrav1exp.AzureManagedControlPlaneStatus, out *AzureManagedControlPlaneStatus, s apiconversion.Scope) error {
func Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(in *infrav1.AzureManagedControlPlaneStatus, out *AzureManagedControlPlaneStatus, s apiconversion.Scope) error {
return autoConvert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus(in, out, s)
}

// ConvertTo converts this AzureManagedControlPlane to the Hub version (v1beta1).
func (src *AzureManagedControlPlaneList) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1exp.AzureManagedControlPlaneList)
dst := dstRaw.(*infrav1.AzureManagedControlPlaneList)
return Convert_v1alpha3_AzureManagedControlPlaneList_To_v1beta1_AzureManagedControlPlaneList(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta1) to this version.
func (dst *AzureManagedControlPlaneList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1exp.AzureManagedControlPlaneList)
src := srcRaw.(*infrav1.AzureManagedControlPlaneList)
return Convert_v1beta1_AzureManagedControlPlaneList_To_v1alpha3_AzureManagedControlPlaneList(src, dst, nil)
}

// Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork converts v1beta1 ManagedControlPlaneVirtualNetwork to v1alpha3 ManagedControlPlaneVirtualNetwork.
func Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork(in *infrav1exp.ManagedControlPlaneVirtualNetwork, out *ManagedControlPlaneVirtualNetwork, s apiconversion.Scope) error {
func Convert_v1beta1_ManagedControlPlaneVirtualNetwork_To_v1alpha3_ManagedControlPlaneVirtualNetwork(in *infrav1.ManagedControlPlaneVirtualNetwork, out *ManagedControlPlaneVirtualNetwork, s apiconversion.Scope) error {
out.Name = in.Name
out.Subnet.Name = in.Subnet.Name
out.Subnet.CIDRBlock = in.Subnet.CIDRBlock
out.CIDRBlock = in.CIDRBlock

return nil
}

// Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet is a conversion function.
func Convert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(in *infrav1.ManagedControlPlaneSubnet, out *ManagedControlPlaneSubnet, s apiconversion.Scope) error {
return autoConvert_v1beta1_ManagedControlPlaneSubnet_To_v1alpha3_ManagedControlPlaneSubnet(in, out, s)
}
Expand Up @@ -18,7 +18,6 @@ package v1alpha3

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
infrav1alpha3 "sigs.k8s.io/cluster-api-provider-azure/api/v1alpha3"
clusterv1alpha3 "sigs.k8s.io/cluster-api/api/v1alpha3"
)

Expand Down Expand Up @@ -52,7 +51,7 @@ type AzureManagedControlPlaneSpec struct {
// AdditionalTags is an optional set of tags to add to Azure resources managed by the Azure provider, in addition to the
// ones added by default.
// +optional
AdditionalTags infrav1alpha3.Tags `json:"additionalTags,omitempty"`
AdditionalTags Tags `json:"additionalTags,omitempty"`

// NetworkPlugin used for building Kubernetes network.
// +kubebuilder:validation:Enum=azure;kubenet
Expand Down
Expand Up @@ -18,20 +18,20 @@ package v1alpha3

import (
apiconversion "k8s.io/apimachinery/pkg/conversion"
infrav1exp "sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1"
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
"sigs.k8s.io/controller-runtime/pkg/conversion"
)

// ConvertTo converts this AzureManagedMachinePool to the Hub version (v1beta1).
func (src *AzureManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1exp.AzureManagedMachinePool)
dst := dstRaw.(*infrav1.AzureManagedMachinePool)
if err := Convert_v1alpha3_AzureManagedMachinePool_To_v1beta1_AzureManagedMachinePool(src, dst, nil); err != nil {
return err
}

// Manually restore data.
restored := &infrav1exp.AzureManagedMachinePool{}
restored := &infrav1.AzureManagedMachinePool{}
if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok {
return err
}
Expand Down Expand Up @@ -62,7 +62,7 @@ func (src *AzureManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error {

// ConvertFrom converts from the Hub version (v1beta1) to this version.
func (dst *AzureManagedMachinePool) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1exp.AzureManagedMachinePool)
src := srcRaw.(*infrav1.AzureManagedMachinePool)
if err := Convert_v1beta1_AzureManagedMachinePool_To_v1alpha3_AzureManagedMachinePool(src, dst, nil); err != nil {
return err
}
Expand All @@ -72,23 +72,23 @@ func (dst *AzureManagedMachinePool) ConvertFrom(srcRaw conversion.Hub) error {
}

// Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec is an autogenerated conversion function.
func Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(in *infrav1exp.AzureManagedMachinePoolSpec, out *AzureManagedMachinePoolSpec, s apiconversion.Scope) error {
func Convert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(in *infrav1.AzureManagedMachinePoolSpec, out *AzureManagedMachinePoolSpec, s apiconversion.Scope) error {
return autoConvert_v1beta1_AzureManagedMachinePoolSpec_To_v1alpha3_AzureManagedMachinePoolSpec(in, out, s)
}

// Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus is an autogenerated conversion function.
func Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(in *infrav1exp.AzureManagedMachinePoolStatus, out *AzureManagedMachinePoolStatus, s apiconversion.Scope) error {
func Convert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(in *infrav1.AzureManagedMachinePoolStatus, out *AzureManagedMachinePoolStatus, s apiconversion.Scope) error {
return autoConvert_v1beta1_AzureManagedMachinePoolStatus_To_v1alpha3_AzureManagedMachinePoolStatus(in, out, s)
}

// ConvertTo converts this AzureManagedMachinePoolList to the Hub version (v1beta1).
func (src *AzureManagedMachinePoolList) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1exp.AzureManagedMachinePoolList)
dst := dstRaw.(*infrav1.AzureManagedMachinePoolList)
return Convert_v1alpha3_AzureManagedMachinePoolList_To_v1beta1_AzureManagedMachinePoolList(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta1) to this version.
func (dst *AzureManagedMachinePoolList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1exp.AzureManagedMachinePoolList)
src := srcRaw.(*infrav1.AzureManagedMachinePoolList)
return Convert_v1beta1_AzureManagedMachinePoolList_To_v1alpha3_AzureManagedMachinePoolList(src, dst, nil)
}

0 comments on commit 42879bd

Please sign in to comment.