Skip to content

Commit 778ed2b

Browse files
Jefftreek8s-publishing-bot
authored andcommitted
Make OpenAPIGetter tolerant of nil
Kubernetes-commit: 0da29848c538813bba8f9aa2e23542456105caa8
1 parent 854aec7 commit 778ed2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/apply/patcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (p *Patcher) patchSimple(obj runtime.Object, modified []byte, namespace, na
156156
}
157157
}
158158

159-
if patch == nil {
159+
if patch == nil && p.OpenAPIGetter != nil {
160160
if openAPISchema, err := p.OpenAPIGetter.OpenAPISchema(); err == nil && openAPISchema != nil {
161161
// if openapischema is used, we'll try to get required patch type for this GVK from Open API.
162162
// if it fails or could not find any patch type, fall back to baked-in patch type determination.

0 commit comments

Comments
 (0)