Skip to content

Commit e11404a

Browse files
committed
Add patch support for certificatesigningrequests/approval
1 parent 0e2b13a commit e11404a

File tree

2 files changed

+125
-14
lines changed

2 files changed

+125
-14
lines changed

api/openapi-spec/swagger.json

Lines changed: 118 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/registry/certificates/certificates/storage/storage.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,16 @@ func (r *ApprovalREST) New() runtime.Object {
109109
return &certificates.CertificateSigningRequest{}
110110
}
111111

112+
// Get retrieves the object from the storage. It is required to support Patch.
113+
func (r *ApprovalREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
114+
return r.store.Get(ctx, name, options)
115+
}
116+
112117
// Update alters the approval subset of an object.
113118
func (r *ApprovalREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) {
114119
// We are explicitly setting forceAllowCreate to false in the call to the underlying storage because
115120
// subresources should never allow create on update.
116121
return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false, options)
117122
}
123+
124+
var _ = rest.Patcher(&ApprovalREST{})

0 commit comments

Comments
 (0)