You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allErrs=append(allErrs, field.Forbidden(fldPath.Child("items").Child("nullable"), "cannot be nullable when x-kubernetes-list-type is "+*schema.XListType))
898
+
}
899
+
900
+
switch*schema.XListType {
901
+
case"map":
902
+
// ensure all map keys are required or have a default
// we validate that all XListMapKeys are existing properties in ValidateCustomResourceDefinitionOpenAPISchema, so skipping here is ok
912
+
continue
913
+
}
914
+
915
+
ifisRequired[k] ==false&&obj.Default==nil {
916
+
allErrs=append(allErrs, field.Required(fldPath.Child("items").Child("properties").Key(k).Child("default"), "this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property"))
917
+
}
918
+
919
+
ifobj.Nullable {
920
+
allErrs=append(allErrs, field.Forbidden(fldPath.Child("items").Child("properties").Key(k).Child("nullable"), "this property is in x-kubernetes-list-map-keys, so it cannot be nullable"))
0 commit comments