Documentation ¶
Index ¶
- Constants
- func Providers() []string
- func Register(name string, provider Provider)
- type DelegateProvider
- func (p *DelegateProvider) DeleteClusterRole(ctx context.Context, ...) error
- func (p *DelegateProvider) DeleteMultiClusterRoleBindingResources(ctx context.Context, ...) error
- func (p *DelegateProvider) DeleteUnbindingResources(ctx context.Context, client platformversionedclient.PlatformV1Interface, ...) error
- func (p *DelegateProvider) DispatchMultiClusterRoleBinding(ctx context.Context, ...) error
- func (p *DelegateProvider) GetSubject(ctx context.Context, platformUser string, cluster *platformv1.Cluster) (*rbacv1.Subject, error)
- func (p *DelegateProvider) GetTenantClusters(ctx context.Context, ...) ([]string, error)
- func (p *DelegateProvider) InitContext(param interface{}) context.Context
- func (p *DelegateProvider) Name() string
- func (p *DelegateProvider) OnFilter(todo context.Context, annotations map[string]string) bool
- func (p *DelegateProvider) Validate(ctx context.Context, obj runtime.Object, ...) *field.Error
- type Provider
Constants ¶
View Source
const AnnotationProviderNameKey = "authz.tkestack.io/provider-name"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DelegateProvider ¶
type DelegateProvider struct {
ProviderName string
}
func (*DelegateProvider) DeleteClusterRole ¶
func (p *DelegateProvider) DeleteClusterRole(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, role *authzv1.Role) error
func (*DelegateProvider) DeleteMultiClusterRoleBindingResources ¶
func (p *DelegateProvider) DeleteMultiClusterRoleBindingResources(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, mcrb *authzv1.MultiClusterRoleBinding) error
func (*DelegateProvider) DeleteUnbindingResources ¶
func (p *DelegateProvider) DeleteUnbindingResources(ctx context.Context, client platformversionedclient.PlatformV1Interface, mcrb *authzv1.MultiClusterRoleBinding, clusterIDs []string) error
func (*DelegateProvider) DispatchMultiClusterRoleBinding ¶
func (p *DelegateProvider) DispatchMultiClusterRoleBinding(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, mcrb *authzv1.MultiClusterRoleBinding, rules []rbacv1.PolicyRule, clusterSubjects map[string]*rbacv1.Subject) error
func (*DelegateProvider) GetSubject ¶
func (p *DelegateProvider) GetSubject(ctx context.Context, platformUser string, cluster *platformv1.Cluster) (*rbacv1.Subject, error)
func (*DelegateProvider) GetTenantClusters ¶
func (p *DelegateProvider) GetTenantClusters(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, tenantID string) ([]string, error)
func (*DelegateProvider) InitContext ¶
func (p *DelegateProvider) InitContext(param interface{}) context.Context
func (*DelegateProvider) Name ¶
func (p *DelegateProvider) Name() string
func (*DelegateProvider) Validate ¶
func (p *DelegateProvider) Validate(ctx context.Context, obj runtime.Object, platformClient platformversionedclient.PlatformV1Interface) *field.Error
type Provider ¶
type Provider interface { Name() string OnFilter(ctx context.Context, annotations map[string]string) bool Validate(ctx context.Context, obj runtime.Object, platformClient platformversionedclient.PlatformV1Interface) *field.Error InitContext(param interface{}) context.Context GetTenantClusters(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, tenantID string) ([]string, error) GetSubject(ctx context.Context, userName string, cluster *platformv1.Cluster) (*rbacv1.Subject, error) DispatchMultiClusterRoleBinding(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, mcrb *authzv1.MultiClusterRoleBinding, rules []rbacv1.PolicyRule, clusterSubjects map[string]*rbacv1.Subject) error DeleteUnbindingResources(ctx context.Context, client platformversionedclient.PlatformV1Interface, mcrb *authzv1.MultiClusterRoleBinding, clusterIDs []string) error DeleteClusterRole(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, role *authzv1.Role) error DeleteMultiClusterRoleBindingResources(ctx context.Context, platformClient platformversionedclient.PlatformV1Interface, mcrb *authzv1.MultiClusterRoleBinding) error }
Click to show internal directories.
Click to hide internal directories.