Documentation
¶
Index ¶
- func ClusterRolesDiffer(current, desired runtime.Object) bool
- func RenderClusterRoles(pr *v1beta1.ProviderRevision, crds []extv1.CustomResourceDefinition) []rbacv1.ClusterRole
- func Setup(mgr ctrl.Manager, log logging.Logger) error
- func SystemClusterRoleName(revisionName string) string
- type ClusterRoleRenderFn
- type ClusterRoleRenderer
- type Reconciler
- type ReconcilerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterRolesDiffer ¶ added in v0.14.0
ClusterRolesDiffer returns true if the supplied objects are different ClusterRoles. We consider ClusterRoles to be different if their labels and rules do not match.
func RenderClusterRoles ¶
func RenderClusterRoles(pr *v1beta1.ProviderRevision, crds []extv1.CustomResourceDefinition) []rbacv1.ClusterRole
RenderClusterRoles returns ClusterRoles for the supplied ProviderRevision.
func Setup ¶
Setup adds a controller that reconciles a ProviderRevision by creating a series of opinionated ClusterRoles that may be bound to allow access to the resources it defines.
func SystemClusterRoleName ¶
SystemClusterRoleName returns the name of the 'system' cluster role - i.e. the role that a provider's ServiceAccount should be bound to.
Types ¶
type ClusterRoleRenderFn ¶
type ClusterRoleRenderFn func(pr *v1beta1.ProviderRevision, crds []extv1.CustomResourceDefinition) []rbacv1.ClusterRole
A ClusterRoleRenderFn renders ClusterRoles for the supplied CRDs.
func (ClusterRoleRenderFn) RenderClusterRoles ¶
func (fn ClusterRoleRenderFn) RenderClusterRoles(pr *v1beta1.ProviderRevision, crds []extv1.CustomResourceDefinition) []rbacv1.ClusterRole
RenderClusterRoles renders ClusterRoles for the supplied CRDs.
type ClusterRoleRenderer ¶
type ClusterRoleRenderer interface {
// RenderClusterRoles for the supplied CRDs.
RenderClusterRoles(pr *v1beta1.ProviderRevision, crds []extv1.CustomResourceDefinition) []rbacv1.ClusterRole
}
A ClusterRoleRenderer renders ClusterRoles for the given CRDs.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
A Reconciler reconciles ProviderRevisions.
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, opts ...ReconcilerOption) *Reconciler
NewReconciler returns a Reconciler of ProviderRevisions.
type ReconcilerOption ¶
type ReconcilerOption func(*Reconciler)
ReconcilerOption is used to configure the Reconciler.
func WithClientApplicator ¶
func WithClientApplicator(ca resource.ClientApplicator) ReconcilerOption
WithClientApplicator specifies how the Reconciler should interact with the Kubernetes API.
func WithClusterRoleRenderer ¶
func WithClusterRoleRenderer(rr ClusterRoleRenderer) ReconcilerOption
WithClusterRoleRenderer specifies how the Reconciler should render RBAC ClusterRoles.
func WithLogger ¶
func WithLogger(log logging.Logger) ReconcilerOption
WithLogger specifies how the Reconciler should log messages.
func WithRecorder ¶
func WithRecorder(er event.Recorder) ReconcilerOption
WithRecorder specifies how the Reconciler should record Kubernetes events.