From 24107823fb8bcb05eef59391d1744436ac26f906 Mon Sep 17 00:00:00 2001 From: Craig Jellick Date: Sat, 16 Dec 2017 21:16:29 -0700 Subject: [PATCH] Add RBAC to managmentContext --- config/context.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/context.go b/config/context.go index be8f5b7a..de49491e 100644 --- a/config/context.go +++ b/config/context.go @@ -37,11 +37,13 @@ type ManagementContext struct { Scheme *runtime.Scheme Management managementv3.Interface + RBAC rbacv1.Interface } func (c *ManagementContext) controllers() []controller.Starter { return []controller.Starter{ c.Management, + c.RBAC, } } @@ -86,6 +88,11 @@ func NewManagementContext(config rest.Config) (*ManagementContext, error) { return nil, err } + context.RBAC, err = rbacv1.NewForConfig(config) + if err != nil { + return nil, err + } + dynamicConfig := config if dynamicConfig.NegotiatedSerializer == nil { configConfig := dynamic.ContentConfig()