mirror of
https://github.com/rancher/steve.git
synced 2025-09-17 07:48:52 +00:00
Initial implmentation of warning headers
Attempts to pass through warning headers which k8s returns. Requires an update to rancher/apiserver.
This commit is contained in:
committed by
Chad Roberts
parent
7565dba268
commit
956b7351aa
@@ -17,6 +17,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/dynamic"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type Apply struct {
|
||||
@@ -110,7 +111,8 @@ func (a *Apply) createApply(apiContext *types.APIRequest) (apply.Apply, error) {
|
||||
}
|
||||
|
||||
apply := apply.New(client.Discovery(), func(gvr schema.GroupVersionResource) (dynamic.NamespaceableResourceInterface, error) {
|
||||
dynamicClient, err := a.cg.DynamicClient(apiContext)
|
||||
// don't record warnings from apply
|
||||
dynamicClient, err := a.cg.DynamicClient(apiContext, rest.NoWarnings{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user