Documentation ¶
Index ¶
- func NewClusterRoleBindingListerMap(clientset kubernetes.Interface) map[string]ClusterRoleBindingLister
- func RelatedItemsForPVC(pvc *corev1api.PersistentVolumeClaim, log logrus.FieldLogger) []velero.ResourceIdentifier
- func RelatedItemsForPod(pod *corev1api.Pod, log logrus.FieldLogger) []velero.ResourceIdentifier
- func RelatedItemsForServiceAccount(objectMeta metav1.Object, clusterRoleBindings []ClusterRoleBinding, ...) []velero.ResourceIdentifier
- type ClusterRoleBinding
- type ClusterRoleBindingLister
- type NoopClusterRoleBindingLister
- type V1ClusterRoleBinding
- type V1ClusterRoleBindingLister
- type V1beta1ClusterRoleBinding
- type V1beta1ClusterRoleBindingLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClusterRoleBindingListerMap ¶
func NewClusterRoleBindingListerMap(clientset kubernetes.Interface) map[string]ClusterRoleBindingLister
NewClusterRoleBindingListerMap creates a map of RBAC version strings to their associated ClusterRoleBindingLister structs. Necessary so that callers to the ClusterRoleBindingLister interfaces don't need the kubernetes.Interface.
func RelatedItemsForPVC ¶
func RelatedItemsForPVC(pvc *corev1api.PersistentVolumeClaim, log logrus.FieldLogger) []velero.ResourceIdentifier
func RelatedItemsForPod ¶
func RelatedItemsForPod(pod *corev1api.Pod, log logrus.FieldLogger) []velero.ResourceIdentifier
func RelatedItemsForServiceAccount ¶
func RelatedItemsForServiceAccount(objectMeta metav1.Object, clusterRoleBindings []ClusterRoleBinding, log logrus.FieldLogger) []velero.ResourceIdentifier
Types ¶
type ClusterRoleBinding ¶
type ClusterRoleBinding interface { // Name returns the name of a ClusterRoleBinding. Name() string // ServiceAccountSubjects returns the names of subjects that are service accounts in the given namespace. ServiceAccountSubjects(namespace string) []string // RoleRefName returns the name of a ClusterRoleBinding's RoleRef. RoleRefName() string }
ClusterRoleBinding abstracts access to ClusterRoleBindings whether they're v1 or v1beta1.
func ClusterRoleBindingsForAction ¶
func ClusterRoleBindingsForAction(clusterRoleBindingListers map[string]ClusterRoleBindingLister, discoveryHelper velerodiscovery.Helper) ([]ClusterRoleBinding, error)
type ClusterRoleBindingLister ¶
type ClusterRoleBindingLister interface { // List returns a slice of ClusterRoleBindings which can represent either v1 or v1beta1 ClusterRoleBindings. List() ([]ClusterRoleBinding, error) }
ClusterRoleBindingLister allows for listing ClusterRoleBindings in a version-independent way.
type NoopClusterRoleBindingLister ¶
type NoopClusterRoleBindingLister struct { }
noopClusterRoleBindingLister exists to handle clusters where RBAC is disabled.
func (NoopClusterRoleBindingLister) List ¶
func (noop NoopClusterRoleBindingLister) List() ([]ClusterRoleBinding, error)
type V1ClusterRoleBinding ¶
type V1ClusterRoleBinding struct {
Crb rbac.ClusterRoleBinding
}
func (V1ClusterRoleBinding) Name ¶
func (c V1ClusterRoleBinding) Name() string
func (V1ClusterRoleBinding) RoleRefName ¶
func (c V1ClusterRoleBinding) RoleRefName() string
func (V1ClusterRoleBinding) ServiceAccountSubjects ¶
func (c V1ClusterRoleBinding) ServiceAccountSubjects(namespace string) []string
type V1ClusterRoleBindingLister ¶
type V1ClusterRoleBindingLister struct {
// contains filtered or unexported fields
}
func (V1ClusterRoleBindingLister) List ¶
func (v1 V1ClusterRoleBindingLister) List() ([]ClusterRoleBinding, error)
type V1beta1ClusterRoleBinding ¶
type V1beta1ClusterRoleBinding struct {
Crb rbacbeta.ClusterRoleBinding
}
func (V1beta1ClusterRoleBinding) Name ¶
func (c V1beta1ClusterRoleBinding) Name() string
func (V1beta1ClusterRoleBinding) RoleRefName ¶
func (c V1beta1ClusterRoleBinding) RoleRefName() string
func (V1beta1ClusterRoleBinding) ServiceAccountSubjects ¶
func (c V1beta1ClusterRoleBinding) ServiceAccountSubjects(namespace string) []string
type V1beta1ClusterRoleBindingLister ¶
type V1beta1ClusterRoleBindingLister struct {
// contains filtered or unexported fields
}
func (V1beta1ClusterRoleBindingLister) List ¶
func (v1beta1 V1beta1ClusterRoleBindingLister) List() ([]ClusterRoleBinding, error)
Click to show internal directories.
Click to hide internal directories.