diff --git a/api/v1beta1/azuremanagedcontrolplane_default.go b/api/v1beta1/azuremanagedcontrolplane_default.go index 26720fbe2ac..3c227b1bebc 100644 --- a/api/v1beta1/azuremanagedcontrolplane_default.go +++ b/api/v1beta1/azuremanagedcontrolplane_default.go @@ -56,7 +56,6 @@ func (m *AzureManagedControlPlane) setDefaultResourceGroupName() { if m.Spec.ResourceGroupName == "" { if clusterName, ok := m.Labels[clusterv1.ClusterNameLabel]; ok { m.Spec.ResourceGroupName = clusterName - fmt.Printf("WILLIE ResourceGroupName is empty, defaulting to %s\n", m.Spec.ResourceGroupName) } } } diff --git a/api/v1beta1/azuremanagedcontrolplane_webhook.go b/api/v1beta1/azuremanagedcontrolplane_webhook.go index 2da8ad01bac..feaa15b36eb 100644 --- a/api/v1beta1/azuremanagedcontrolplane_webhook.go +++ b/api/v1beta1/azuremanagedcontrolplane_webhook.go @@ -26,6 +26,7 @@ import ( "strings" "time" + "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" kerrors "k8s.io/apimachinery/pkg/util/errors" diff --git a/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go b/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go index ee4aaccb974..722b70b78c0 100644 --- a/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go +++ b/api/v1beta1/azuremanagedmachinepooltemplate_webhook.go @@ -101,7 +101,8 @@ func (mpw *azureManagedMachinePoolTemplateWebhook) ValidateCreate(ctx context.Co mp.Spec.Template.Spec.OSType, field.NewPath("Spec", "Template", "Spec", "OSType"))) - errs = append(errs, validateAgentPoolName( + errs = append(errs, validateMPName( + mp.Name, mp.Spec.Template.Spec.OSType, mp.Spec.Template.Spec.Name, field.NewPath("Spec", "Template", "Spec", "Name"))) diff --git a/controllers/helpers.go b/controllers/helpers.go index f7d1ce3c23f..971d426c952 100644 --- a/controllers/helpers.go +++ b/controllers/helpers.go @@ -945,7 +945,6 @@ func MachinePoolToAzureManagedControlPlaneMapFunc(ctx context.Context, c client. gk := gvk.GroupKind() ref := cluster.Spec.ControlPlaneRef - fmt.Printf("WILLIE cluster spec: %v", cluster.Spec) if ref == nil || ref.Name == "" { log.Error(err, "control plane ref is nil or empty") return nil diff --git a/templates/cluster-template-aks-clusterclass-cluster.yaml b/templates/cluster-template-aks-clusterclass-cluster.yaml deleted file mode 100644 index c78efb4b389..00000000000 --- a/templates/cluster-template-aks-clusterclass-cluster.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: ${CLUSTER_NAME} - namespace: default -spec: - clusterNetwork: - pods: - cidrBlocks: - - 192.168.0.0/16 - topology: - class: ${CLUSTER_CLASS_NAME} - version: ${KUBERNETES_VERSION} - workers: - machinePools: - - class: default-system - name: mp-0 - replicas: 1 - - class: default-worker - name: mp-1 - replicas: 1 diff --git a/templates/cluster-template-clusterclass-cluster.yaml b/templates/cluster-template-topology.yaml similarity index 100% rename from templates/cluster-template-clusterclass-cluster.yaml rename to templates/cluster-template-topology.yaml diff --git a/templates/flavors/clusterclass-cluster/cluster.yaml b/templates/flavors/topology/cluster.yaml similarity index 100% rename from templates/flavors/clusterclass-cluster/cluster.yaml rename to templates/flavors/topology/cluster.yaml diff --git a/templates/flavors/clusterclass-cluster/kustomization.yaml b/templates/flavors/topology/kustomization.yaml similarity index 100% rename from templates/flavors/clusterclass-cluster/kustomization.yaml rename to templates/flavors/topology/kustomization.yaml diff --git a/templates/test/ci/prow-topology/kustomization.yaml b/templates/test/ci/prow-topology/kustomization.yaml index 77f435eada9..e4da9c2e30e 100644 --- a/templates/test/ci/prow-topology/kustomization.yaml +++ b/templates/test/ci/prow-topology/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: default resources: - - ../../../flavors/clusterclass-cluster/cluster.yaml + - ../../../flavors/topology/cluster.yaml - cni-resource-set.yaml - ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml - ../../../addons/cluster-api-helm/calico.yaml