1
0
mirror of https://github.com/rancher/types.git synced 2025-08-01 04:57:05 +00:00

Merge pull request #203 from zionwu/addproject

add project to managerment context as helm controller is using it
This commit is contained in:
Alena Prokharchyk 2018-02-11 08:19:39 -08:00 committed by GitHub
commit 636064f645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,10 +48,10 @@ type ManagementContext struct {
Schemas *types.Schemas
Scheme *runtime.Scheme
AccessControl types.AccessControl
Management managementv3.Interface
RBAC rbacv1.Interface
Core corev1.Interface
Project projectv3.Interface
Management managementv3.Interface
RBAC rbacv1.Interface
Core corev1.Interface
}
func (c *ManagementContext) controllers() []controller.Starter {
@ -59,6 +59,7 @@ func (c *ManagementContext) controllers() []controller.Starter {
c.Management,
c.RBAC,
c.Core,
c.Project,
}
}
@ -153,6 +154,10 @@ func NewManagementContext(config rest.Config) (*ManagementContext, error) {
if err != nil {
return nil, err
}
context.Project, err = projectv3.NewForConfig(config)
if err != nil {
return nil, err
}
dynamicConfig := config
if dynamicConfig.NegotiatedSerializer == nil {