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:
commit
636064f645
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user