diff --git a/config/context.go b/config/context.go index 58a26039..de0df4c8 100644 --- a/config/context.go +++ b/config/context.go @@ -29,6 +29,7 @@ import ( "github.com/sirupsen/logrus" "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" "k8s.io/apimachinery/pkg/runtime" + k8dynamic "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" ) @@ -145,6 +146,7 @@ type ManagementContext struct { LocalConfig *rest.Config RESTConfig rest.Config UnversionedClient rest.Interface + DynamicClient k8dynamic.Interface K8sClient kubernetes.Interface APIExtClient clientset.Interface Schemas *types.Schemas @@ -275,6 +277,11 @@ func NewManagementContext(config rest.Config) (*ManagementContext, error) { return nil, err } + context.DynamicClient, err = k8dynamic.NewForConfig(&config) + if err != nil { + return nil, err + } + context.RBAC, err = rbacv1.NewForConfig(config) if err != nil { return nil, err diff --git a/vendor.conf b/vendor.conf index 64eb10ac..dfbac8be 100644 --- a/vendor.conf +++ b/vendor.conf @@ -2,5 +2,5 @@ github.com/rancher/types github.com/pkg/errors v0.8.0 -github.com/rancher/norman ae750244ec5b8156788d6d1914e210f5956900b1 https://github.com/daxmc99/norman.git transitive=true +github.com/rancher/norman 7387aa53a5ba8545ac61fb612b7ed33286e995f6 transitive=true github.com/coreos/prometheus-operator v0.25.0