Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,13 @@ linters:
alias: bootstrapv1beta1
# CAPZ
- pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1beta1
alias: infrav1beta1
- pkg: sigs.k8s.io/cluster-api-provider-azure/api/v1beta2
alias: infrav1
# CAPZ exp
- pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta1
alias: infrav1expbeta1
- pkg: sigs.k8s.io/cluster-api-provider-azure/exp/api/v1beta2
alias: infrav1exp
- pkg: sigs.k8s.io/cluster-api-provider-azure/util/webhook
alias: webhookutils
Expand Down Expand Up @@ -351,6 +355,12 @@ linters:
- linters:
- staticcheck
text: 'SA1019: .*VMState is deprecated'
# Ignore deprecated field/type access in v1beta2 types, conversion, scope, and webhook files.
# These intentionally use deprecated CAPI types and v1beta1 fields for backward compat.
- linters:
- staticcheck
text: 'SA1019: .* is deprecated'
path: "^api/v1beta2/|^exp/api/v1beta2/|^api/v1beta1/conversion|^exp/api/v1beta1/conversion|^api/v1alpha1/conversion|^api/v1beta1/.*_conversion\\.go$|^azure/scope/|^internal/webhooks/azuremachinepool"
paths:
- zz_generated\.(\w*)\.go$
- third_party$
Expand Down
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,29 @@ generate-go: $(CONTROLLER_GEN) $(MOCKGEN) $(CONVERSION_GEN) ## Runs Go related g
paths=./api/... \
paths=./$(EXP_DIR)/api/... \
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
--build-tag=ignore_autogenerated_core_v1beta1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta2 \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
./api/v1beta1
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
--build-tag=ignore_autogenerated_core_v1alpha1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta2 \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
./api/v1alpha1
$(CONVERSION_GEN) \
--output-file=zz_generated.conversion.go \
--build-tag=ignore_autogenerated_exp_v1beta1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api-provider-azure/api/v1beta1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api-provider-azure/api/v1beta2 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta1 \
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/core/v1beta2 \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt \
./$(EXP_DIR)/api/v1beta1
go generate ./...

.PHONY: generate-manifests
Expand Down
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if "aks_as_mgmt_settings" in settings and os_arch != "amd64":
def deploy_capi():
version = settings.get("capi_version")
capi_uri = "https://github.com/kubernetes-sigs/cluster-api/releases/download/{}/cluster-api-components.yaml".format(version)
cmd = "curl --retry 3 -sSL {} | {} | {} apply -f -".format(capi_uri, envsubst_cmd, kubectl_cmd)
cmd = "curl --retry 3 -sSL {} | {} | {} apply --server-side --force-conflicts -f -".format(capi_uri, envsubst_cmd, kubectl_cmd)
local(cmd, quiet = True)
if settings.get("extra_args"):
extra_args = settings.get("extra_args")
Expand Down
47 changes: 47 additions & 0 deletions api/v1alpha1/azureasomanagedcluster_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2025 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 v1alpha1

import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta2"
)

// ConvertTo converts this AzureASOManagedCluster to the Hub version (v1beta2).
func (src *AzureASOManagedCluster) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1.AzureASOManagedCluster)
return Convert_v1alpha1_AzureASOManagedCluster_To_v1beta2_AzureASOManagedCluster(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta2) to this version (v1alpha1).
func (dst *AzureASOManagedCluster) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedCluster)
return Convert_v1beta2_AzureASOManagedCluster_To_v1alpha1_AzureASOManagedCluster(src, dst, nil)
}

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

// ConvertFrom converts from the Hub version to this version.
func (dst *AzureASOManagedClusterList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedClusterList)
return Convert_v1beta2_AzureASOManagedClusterList_To_v1alpha1_AzureASOManagedClusterList(src, dst, nil)
}
47 changes: 47 additions & 0 deletions api/v1alpha1/azureasomanagedclustertemplate_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2025 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 v1alpha1

import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta2"
)

// ConvertTo converts this AzureASOManagedClusterTemplate to the Hub version (v1beta2).
func (src *AzureASOManagedClusterTemplate) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1.AzureASOManagedClusterTemplate)
return Convert_v1alpha1_AzureASOManagedClusterTemplate_To_v1beta2_AzureASOManagedClusterTemplate(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta2) to this version (v1alpha1).
func (dst *AzureASOManagedClusterTemplate) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedClusterTemplate)
return Convert_v1beta2_AzureASOManagedClusterTemplate_To_v1alpha1_AzureASOManagedClusterTemplate(src, dst, nil)
}

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

// ConvertFrom converts from the Hub version to this version.
func (dst *AzureASOManagedClusterTemplateList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedClusterTemplateList)
return Convert_v1beta2_AzureASOManagedClusterTemplateList_To_v1alpha1_AzureASOManagedClusterTemplateList(src, dst, nil)
}
47 changes: 47 additions & 0 deletions api/v1alpha1/azureasomanagedcontrolplane_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2025 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 v1alpha1

import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta2"
)

// ConvertTo converts this AzureASOManagedControlPlane to the Hub version (v1beta2).
func (src *AzureASOManagedControlPlane) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1.AzureASOManagedControlPlane)
return Convert_v1alpha1_AzureASOManagedControlPlane_To_v1beta2_AzureASOManagedControlPlane(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta2) to this version (v1alpha1).
func (dst *AzureASOManagedControlPlane) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedControlPlane)
return Convert_v1beta2_AzureASOManagedControlPlane_To_v1alpha1_AzureASOManagedControlPlane(src, dst, nil)
}

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

// ConvertFrom converts from the Hub version to this version.
func (dst *AzureASOManagedControlPlaneList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedControlPlaneList)
return Convert_v1beta2_AzureASOManagedControlPlaneList_To_v1alpha1_AzureASOManagedControlPlaneList(src, dst, nil)
}
47 changes: 47 additions & 0 deletions api/v1alpha1/azureasomanagedcontrolplanetemplate_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2025 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 v1alpha1

import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta2"
)

// ConvertTo converts this AzureASOManagedControlPlaneTemplate to the Hub version (v1beta2).
func (src *AzureASOManagedControlPlaneTemplate) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1.AzureASOManagedControlPlaneTemplate)
return Convert_v1alpha1_AzureASOManagedControlPlaneTemplate_To_v1beta2_AzureASOManagedControlPlaneTemplate(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta2) to this version (v1alpha1).
func (dst *AzureASOManagedControlPlaneTemplate) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedControlPlaneTemplate)
return Convert_v1beta2_AzureASOManagedControlPlaneTemplate_To_v1alpha1_AzureASOManagedControlPlaneTemplate(src, dst, nil)
}

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

// ConvertFrom converts from the Hub version to this version.
func (dst *AzureASOManagedControlPlaneTemplateList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedControlPlaneTemplateList)
return Convert_v1beta2_AzureASOManagedControlPlaneTemplateList_To_v1alpha1_AzureASOManagedControlPlaneTemplateList(src, dst, nil)
}
47 changes: 47 additions & 0 deletions api/v1alpha1/azureasomanagedmachinepool_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2025 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 v1alpha1

import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta2"
)

// ConvertTo converts this AzureASOManagedMachinePool to the Hub version (v1beta2).
func (src *AzureASOManagedMachinePool) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1.AzureASOManagedMachinePool)
return Convert_v1alpha1_AzureASOManagedMachinePool_To_v1beta2_AzureASOManagedMachinePool(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta2) to this version (v1alpha1).
func (dst *AzureASOManagedMachinePool) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedMachinePool)
return Convert_v1beta2_AzureASOManagedMachinePool_To_v1alpha1_AzureASOManagedMachinePool(src, dst, nil)
}

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

// ConvertFrom converts from the Hub version to this version.
func (dst *AzureASOManagedMachinePoolList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedMachinePoolList)
return Convert_v1beta2_AzureASOManagedMachinePoolList_To_v1alpha1_AzureASOManagedMachinePoolList(src, dst, nil)
}
47 changes: 47 additions & 0 deletions api/v1alpha1/azureasomanagedmachinepooltemplate_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
Copyright 2025 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 v1alpha1

import (
"sigs.k8s.io/controller-runtime/pkg/conversion"

infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta2"
)

// ConvertTo converts this AzureASOManagedMachinePoolTemplate to the Hub version (v1beta2).
func (src *AzureASOManagedMachinePoolTemplate) ConvertTo(dstRaw conversion.Hub) error {
dst := dstRaw.(*infrav1.AzureASOManagedMachinePoolTemplate)
return Convert_v1alpha1_AzureASOManagedMachinePoolTemplate_To_v1beta2_AzureASOManagedMachinePoolTemplate(src, dst, nil)
}

// ConvertFrom converts from the Hub version (v1beta2) to this version (v1alpha1).
func (dst *AzureASOManagedMachinePoolTemplate) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedMachinePoolTemplate)
return Convert_v1beta2_AzureASOManagedMachinePoolTemplate_To_v1alpha1_AzureASOManagedMachinePoolTemplate(src, dst, nil)
}

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

// ConvertFrom converts from the Hub version to this version.
func (dst *AzureASOManagedMachinePoolTemplateList) ConvertFrom(srcRaw conversion.Hub) error {
src := srcRaw.(*infrav1.AzureASOManagedMachinePoolTemplateList)
return Convert_v1beta2_AzureASOManagedMachinePoolTemplateList_To_v1alpha1_AzureASOManagedMachinePoolTemplateList(src, dst, nil)
}
Loading
Loading