Documentation ¶
Index ¶
- func ClusterRoleBindingsShouldEqual(t *testing.T, expected []*rbacv1.ClusterRoleBinding, ...)
- func ClusterRolesShouldEqual(t *testing.T, expected []*rbacv1.ClusterRole, actual []rbacv1.ClusterRole)
- func NewApiResource(group string, version string, kind string, name string, namespaced bool) metav1.APIResource
- func NewClusterAdminRole() *rbacv1.ClusterRole
- func NewClusterRole(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole
- func NewClusterRoleBinding(name string, subjects []rbacv1.Subject) *rbacv1.ClusterRoleBinding
- func NewDefaultNamespace() *corev1.Namespace
- func NewGroupSubjects(names ...string) []rbacv1.Subject
- func NewRole(name string, namespace string, rules []rbacv1.PolicyRule) *rbacv1.Role
- func NewRoleBinding(name, namespace string, subjects []rbacv1.Subject) *rbacv1.RoleBinding
- func NewRule(apiGroups []string, resources []string) rbacv1.PolicyRule
- func NewServiceAccount(name string, namespace string) *corev1.ServiceAccount
- func NewSingleResourceRule(apiGroup, resource string) rbacv1.PolicyRule
- func NewSingletonRules(apiGroups []string, resources []string) []rbacv1.PolicyRule
- func NewSingletonRulesNoResources() []rbacv1.PolicyRule
- func NewSingletonSASubjects(name string, namespace string) []rbacv1.Subject
- func RoleBindingsShouldEqual(t *testing.T, expected []*rbacv1.RoleBinding, actual []rbacv1.RoleBinding)
- func RolesShouldEqual(t *testing.T, expected []*rbacv1.Role, actual []rbacv1.Role)
- func RulesShouldEqual(t *testing.T, kind string, name string, expected []rbacv1.PolicyRule, ...)
- func ServiceAccountsShouldEqual(t *testing.T, expected []*corev1.ServiceAccount, ...)
- func ServiceAccountsShouldEqualDeep(t *testing.T, expected []*corev1.ServiceAccount, ...)
- func SubjectsShouldEqual(t *testing.T, kind string, name string, expected []rbacv1.Subject, ...)
- type ClientsetWithResources
- type FakeDiscoveryWithResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterRoleBindingsShouldEqual ¶
func ClusterRoleBindingsShouldEqual(t *testing.T, expected []*rbacv1.ClusterRoleBinding, actual []rbacv1.ClusterRoleBinding)
func ClusterRolesShouldEqual ¶
func ClusterRolesShouldEqual(t *testing.T, expected []*rbacv1.ClusterRole, actual []rbacv1.ClusterRole)
func NewApiResource ¶
func NewClusterAdminRole ¶
func NewClusterAdminRole() *rbacv1.ClusterRole
func NewClusterRole ¶
func NewClusterRole(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole
func NewClusterRoleBinding ¶
func NewClusterRoleBinding(name string, subjects []rbacv1.Subject) *rbacv1.ClusterRoleBinding
func NewDefaultNamespace ¶
func NewGroupSubjects ¶
func NewRoleBinding ¶
func NewRoleBinding(name, namespace string, subjects []rbacv1.Subject) *rbacv1.RoleBinding
func NewServiceAccount ¶
func NewServiceAccount(name string, namespace string) *corev1.ServiceAccount
func NewSingleResourceRule ¶
func NewSingleResourceRule(apiGroup, resource string) rbacv1.PolicyRule
func NewSingletonRules ¶
func NewSingletonRules(apiGroups []string, resources []string) []rbacv1.PolicyRule
func NewSingletonRulesNoResources ¶
func NewSingletonRulesNoResources() []rbacv1.PolicyRule
func NewSingletonSASubjects ¶
func RoleBindingsShouldEqual ¶
func RoleBindingsShouldEqual(t *testing.T, expected []*rbacv1.RoleBinding, actual []rbacv1.RoleBinding)
func RolesShouldEqual ¶
func RulesShouldEqual ¶
func RulesShouldEqual(t *testing.T, kind string, name string, expected []rbacv1.PolicyRule, actual []rbacv1.PolicyRule)
func ServiceAccountsShouldEqual ¶
func ServiceAccountsShouldEqual(t *testing.T, expected []*corev1.ServiceAccount, actual []corev1.ServiceAccount)
func ServiceAccountsShouldEqualDeep ¶ added in v0.33.5
func ServiceAccountsShouldEqualDeep(t *testing.T, expected []*corev1.ServiceAccount, actual []corev1.ServiceAccount)
Types ¶
type ClientsetWithResources ¶
type ClientsetWithResources struct { *clientgofake.Clientset // contains filtered or unexported fields }
func NewClientSet ¶
func NewClientSet(objects ...runtime.Object) *ClientsetWithResources
func (*ClientsetWithResources) Discovery ¶
func (c *ClientsetWithResources) Discovery() discovery.DiscoveryInterface
func (*ClientsetWithResources) WithResources ¶
func (c *ClientsetWithResources) WithResources(resources ...metav1.APIResource) *ClientsetWithResources
type FakeDiscoveryWithResources ¶
type FakeDiscoveryWithResources struct {
fake.FakeDiscovery
}
func (*FakeDiscoveryWithResources) ServerPreferredResources ¶
func (c *FakeDiscoveryWithResources) ServerPreferredResources() ([]*metav1.APIResourceList, error)
Click to show internal directories.
Click to hide internal directories.