Skip to content

Commit 84861d2

Browse files
authored
Merge pull request kubernetes#91558 from liggitt/csr-e2e
Add e2e coverage for the CertificateSigningRequest API, enable patch support for approval subresource
2 parents 7bd4c53 + e11404a commit 84861d2

File tree

3 files changed

+420
-33
lines changed

3 files changed

+420
-33
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)