We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 808932b commit bca718bCopy full SHA for bca718b
pkg/controllers/namespacesync/references.go
@@ -60,13 +60,17 @@ func walkReferences(
60
for _, ref := range []*corev1.ObjectReference{
61
cc.Spec.Infrastructure.Ref,
62
cc.Spec.ControlPlane.Ref,
63
- cc.Spec.ControlPlane.MachineInfrastructure.Ref,
64
} {
65
if err := fn(ctx, ref); err != nil {
66
return err
67
}
68
69
-
+ // Managed kubernetes providers like EKS and AKS will not have a MachineInfrastructure reference for control plane.
+ if cpInfra := cc.Spec.ControlPlane.MachineInfrastructure; cpInfra != nil {
70
+ if err := fn(ctx, cpInfra.Ref); err != nil {
71
+ return err
72
+ }
73
74
for mdIdx := range cc.Spec.Workers.MachineDeployments {
75
md := &cc.Spec.Workers.MachineDeployments[mdIdx]
76
0 commit comments