mirror of
https://github.com/rancher/types.git
synced 2025-09-15 22:39:05 +00:00
Namespace project and cluster
This commit is contained in:
committed by
Darren Shepherd
parent
c833e41eb4
commit
469f4a724d
@@ -1,6 +1,7 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
extv1 "k8s.io/api/extensions/v1beta1"
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -56,6 +57,7 @@ type PodSecurityPolicyTemplate struct {
|
||||
}
|
||||
|
||||
type ProjectRoleTemplateBinding struct {
|
||||
types.Namespaced
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
@@ -66,6 +68,7 @@ type ProjectRoleTemplateBinding struct {
|
||||
}
|
||||
|
||||
type ClusterRoleTemplateBinding struct {
|
||||
types.Namespaced
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
|
@@ -95,12 +95,14 @@ func authzTypes(schemas *types.Schemas) *types.Schemas {
|
||||
&m.Move{From: "subject/kind", To: "subjectKind"},
|
||||
&m.Move{From: "subject/namespace", To: "subjectNamespace"},
|
||||
&m.Drop{Field: "subject"},
|
||||
&mapper.NamespaceIDMapper{},
|
||||
).
|
||||
AddMapperForType(&Version, v3.ClusterRoleTemplateBinding{},
|
||||
&m.Move{From: "subject/name", To: "subjectName"},
|
||||
&m.Move{From: "subject/kind", To: "subjectKind"},
|
||||
&m.Move{From: "subject/namespace", To: "subjectNamespace"},
|
||||
&m.Drop{Field: "subject"},
|
||||
&mapper.NamespaceIDMapper{},
|
||||
).
|
||||
AddMapperForType(&Version, v3.GlobalRoleBinding{},
|
||||
&m.Move{From: "subject/name", To: "subjectName"},
|
||||
|
Reference in New Issue
Block a user