ignore clusterName on create and update

This commit is contained in:
jianhuiz
2016-08-18 22:06:49 -07:00
parent 7be20b0dac
commit 858e515f85
3 changed files with 59 additions and 0 deletions

View File

@@ -95,6 +95,9 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx api.Context, obj, old runtime
strategy.PrepareForUpdate(ctx, obj, old)
// ClusterName is ignored and should not be saved
objectMeta.ClusterName = ""
// Ensure some common fields, like UID, are validated for all resources.
errs, err := validateCommonFields(obj, old)
if err != nil {