ignore clusterName on create and update
This commit is contained in:
@@ -71,6 +71,9 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx api.Context, obj runtime.Obje
|
||||
api.FillObjectMetaSystemFields(ctx, objectMeta)
|
||||
api.GenerateName(strategy, objectMeta)
|
||||
|
||||
// ClusterName is ignored and should not be saved
|
||||
objectMeta.ClusterName = ""
|
||||
|
||||
if errs := strategy.Validate(ctx, obj); len(errs) > 0 {
|
||||
return errors.NewInvalid(kind.GroupKind(), objectMeta.Name, errs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user