@@ -119,7 +119,7 @@ func (in *ClusterClass) validate(old *ClusterClass) error {
119
119
if class .Template .Bootstrap .Ref .Namespace != in .Namespace {
120
120
allErrs = append (allErrs ,
121
121
field .Invalid (
122
- field .NewPath ("spec" , "worker" , "deployments " , "template" , "bootstrap" , "ref" , "namespace" ),
122
+ field .NewPath ("spec" , "worker" , "machineDeployments " , "template" , "bootstrap" , "ref" , "namespace" ),
123
123
class .Template .Bootstrap .Ref .Namespace ,
124
124
"must match metadata.namespace" ,
125
125
),
@@ -128,7 +128,7 @@ func (in *ClusterClass) validate(old *ClusterClass) error {
128
128
if class .Template .Infrastructure .Ref .Namespace != in .Namespace {
129
129
allErrs = append (allErrs ,
130
130
field .Invalid (
131
- field .NewPath ("spec" , "worker" , "deployments " , "infrastructure" , "bootstrap" , "ref" , "namespace" ),
131
+ field .NewPath ("spec" , "worker" , "machineDeployments " , "infrastructure" , "bootstrap" , "ref" , "namespace" ),
132
132
class .Template .Infrastructure .Ref .Namespace ,
133
133
"must match metadata.namespace" ,
134
134
),
@@ -142,7 +142,7 @@ func (in *ClusterClass) validate(old *ClusterClass) error {
142
142
if classNames .Has (class .Class ) {
143
143
allErrs = append (allErrs ,
144
144
field .Invalid (
145
- field .NewPath ("spec" , "worker" , "deployments " ),
145
+ field .NewPath ("spec" , "worker" , "machineDeployments " ),
146
146
class ,
147
147
fmt .Sprintf ("MachineDeployment class should be unique. MachineDeployment with class %q is defined more than once." , class .Class ),
148
148
),
@@ -159,7 +159,7 @@ func (in *ClusterClass) validate(old *ClusterClass) error {
159
159
if ! classNames .Has (oldClass .Class ) {
160
160
allErrs = append (allErrs ,
161
161
field .Invalid (
162
- field .NewPath ("spec" , "worker" , "deployments " ),
162
+ field .NewPath ("spec" , "worker" , "machineDeployments " ),
163
163
in .Spec .Workers .MachineDeployments ,
164
164
fmt .Sprintf ("The %q MachineDeployment class can't be removed." , oldClass .Class ),
165
165
),
0 commit comments