mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 07:39:22 +00:00
Make OpenAPIGetter tolerant of nil
This commit is contained in:
parent
221897d751
commit
9d1829c33a
@ -156,7 +156,7 @@ func (p *Patcher) patchSimple(obj runtime.Object, modified []byte, namespace, na
|
||||
}
|
||||
}
|
||||
|
||||
if patch == nil {
|
||||
if patch == nil && p.OpenAPIGetter != nil {
|
||||
if openAPISchema, err := p.OpenAPIGetter.OpenAPISchema(); err == nil && openAPISchema != nil {
|
||||
// if openapischema is used, we'll try to get required patch type for this GVK from Open API.
|
||||
// if it fails or could not find any patch type, fall back to baked-in patch type determination.
|
||||
|
Loading…
Reference in New Issue
Block a user