Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Oct 18, 2023
1 parent e3bc4cd commit 7fb9fc5
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 25 deletions.
1 change: 0 additions & 1 deletion api/v1beta1/azuremanagedcontrolplane_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions api/v1beta1/azuremanagedcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion api/v1beta1/azuremanagedmachinepooltemplate_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down
1 change: 0 additions & 1 deletion controllers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 0 additions & 21 deletions templates/cluster-template-aks-clusterclass-cluster.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion templates/test/ci/prow-topology/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7fb9fc5

Please sign in to comment.