Documentation ¶
Index ¶
- Constants
- func SetupWithManager(mgr manager.Manager, kubeClient kubernetes.Interface) error
- type ClusterRoleBindingBuilder
- func (r *ClusterRoleBindingBuilder) Binding() (rbacv1.ClusterRoleBinding, error)
- func (r *ClusterRoleBindingBuilder) BindingOrDie() rbacv1.ClusterRoleBinding
- func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder
- func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder
- func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder
- type PolicyRuleBuilder
- func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder
- func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder
- func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder
- func (r *PolicyRuleBuilder) Rule() (rbacv1.PolicyRule, error)
- func (r *PolicyRuleBuilder) RuleOrDie() rbacv1.PolicyRule
- func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder
- type Reconciler
- type RoleBindingBuilder
- func (r *RoleBindingBuilder) Binding() (rbacv1.RoleBinding, error)
- func (r *RoleBindingBuilder) BindingOrDie() rbacv1.RoleBinding
- func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder
- func (r *RoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *RoleBindingBuilder
- func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder
Constants ¶
const GroupName = "rbac.authorization.k8s.io"
Variables ¶
This section is empty.
Functions ¶
func SetupWithManager ¶
func SetupWithManager(mgr manager.Manager, kubeClient kubernetes.Interface) error
Types ¶
type ClusterRoleBindingBuilder ¶
type ClusterRoleBindingBuilder struct {
ClusterRoleBinding rbacv1.ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"`
}
ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. We use it to construct bindings in code. It's more compact than trying to write them out in a literal.
func NewClusterBinding ¶
func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder
func (*ClusterRoleBindingBuilder) Binding ¶
func (r *ClusterRoleBindingBuilder) Binding() (rbacv1.ClusterRoleBinding, error)
func (*ClusterRoleBindingBuilder) BindingOrDie ¶
func (r *ClusterRoleBindingBuilder) BindingOrDie() rbacv1.ClusterRoleBinding
func (*ClusterRoleBindingBuilder) Groups ¶
func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder
func (*ClusterRoleBindingBuilder) SAs ¶
func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder
func (*ClusterRoleBindingBuilder) Users ¶
func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder
type PolicyRuleBuilder ¶
type PolicyRuleBuilder struct {
PolicyRule rbacv1.PolicyRule
}
PolicyRuleBuilder let's us attach methods. A no-no for API types. We use it to construct rules in code. It's more compact than trying to write them out in a literal and allows us to perform some basic checking during construction
func NewRule ¶
func NewRule(verbs ...string) *PolicyRuleBuilder
func (*PolicyRuleBuilder) Groups ¶
func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder
func (*PolicyRuleBuilder) Names ¶
func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder
func (*PolicyRuleBuilder) Resources ¶
func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder
func (*PolicyRuleBuilder) Rule ¶
func (r *PolicyRuleBuilder) Rule() (rbacv1.PolicyRule, error)
func (*PolicyRuleBuilder) RuleOrDie ¶
func (r *PolicyRuleBuilder) RuleOrDie() rbacv1.PolicyRule
func (*PolicyRuleBuilder) URLs ¶
func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
type RoleBindingBuilder ¶
type RoleBindingBuilder struct {
RoleBinding rbacv1.RoleBinding
}
RoleBindingBuilder let's us attach methods. It is similar to ClusterRoleBindingBuilder above.
func NewRoleBinding ¶
func NewRoleBinding(roleName, namespace string) *RoleBindingBuilder
NewRoleBinding creates a RoleBinding builder that can be used to define the subjects of a role binding. At least one of the `Groups`, `Users` or `SAs` method must be called before calling the `Binding*` methods.
func NewRoleBindingForClusterRole ¶
func NewRoleBindingForClusterRole(roleName, namespace string) *RoleBindingBuilder
func (*RoleBindingBuilder) Binding ¶
func (r *RoleBindingBuilder) Binding() (rbacv1.RoleBinding, error)
Binding builds and returns the RoleBinding API object from the builder object.
func (*RoleBindingBuilder) BindingOrDie ¶
func (r *RoleBindingBuilder) BindingOrDie() rbacv1.RoleBinding
BindingOrDie calls the binding method and panics if there is an error.
func (*RoleBindingBuilder) Groups ¶
func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder
Groups adds the specified groups as the subjects of the RoleBinding.
func (*RoleBindingBuilder) SAs ¶
func (r *RoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *RoleBindingBuilder
SAs adds the specified service accounts as the subjects of the RoleBinding.
func (*RoleBindingBuilder) Users ¶
func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder
Users adds the specified users as the subjects of the RoleBinding.