Propagate forceAllowCreate as false to all subresources

This commit is contained in:
jennybuckley
2018-06-29 11:28:19 -07:00
parent d10e08fc89
commit c60fe4fb76
21 changed files with 69 additions and 23 deletions

View File

@@ -130,7 +130,9 @@ func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOp
// Update alters the status subset of an object.
func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool) (runtime.Object, bool, error) {
return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, forceAllowCreate)
// We are explicitly setting forceAllowCreate to false in the call to the underlying storage because
// subresources should never allow create on update.
return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false)
}
// RollbackREST implements the REST endpoint for initiating the rollback of a deployment