Documentation ¶
Index ¶
Constants ¶
const LabelNamespaceNoRBAC = "appuio.io/no-rbac-creation"
LabelNamespaceNoRBAC is used to speficy if RBAC rules should be created for a namespace. If not specified it defaults to `admin` privileges on the namespace owned by the organization
const LabelRoleBindingUninitialized = "appuio.io/uninitialized"
LabelRoleBindingUninitialized is used to mark rolebindings as uninitialized. In that case the controller will update it to bind to the organization.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrganizationRBACReconciler ¶ added in v0.7.0
type OrganizationRBACReconciler struct { client.Client Recorder record.EventRecorder Scheme *runtime.Scheme // OrganizationLabel is the label that marks to what organization (if any) the namespace belongs to OrganizationLabel string // DefaultClusterRoles is a map where the keys are the name of default rolebindings to create and the values are the names of the clusterroles they bind to DefaultClusterRoles map[string]string }
OrganizationRBACReconciler reconciles RBAC rules for organization namespaces
func (*OrganizationRBACReconciler) Reconcile ¶ added in v0.7.0
func (r *OrganizationRBACReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile makes sure the role bindings for the configured cluster roles are present in every organization namespace. It will also update role bindings with the label "appuio.io/uninitialized": "true" to the default config.
func (*OrganizationRBACReconciler) SetupWithManager ¶ added in v0.7.0
func (r *OrganizationRBACReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RatioReconciler ¶
type RatioReconciler struct { client.Client Recorder record.EventRecorder Scheme *runtime.Scheme Ratio ratioFetcher RatioLimits limits.Limits }
RatioReconciler reconciles a Pod object
func (*RatioReconciler) Reconcile ¶
Reconcile reacts to pod updates and emits events if the fair use request ratio is violated
func (*RatioReconciler) SetupWithManager ¶
func (r *RatioReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ZoneUsageProfileApplyReconciler ¶ added in v0.10.0
type ZoneUsageProfileApplyReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder // Cache is used to setup the dynamic watch. Cache cache.Cache OrganizationLabel string Transformers []transformers.Transformer // SelectedProfile applies only selected profile, if set. Dynamic selection is in future tickets. SelectedProfile string // contains filtered or unexported fields }
ZoneUsageProfileApplyReconciler reconciles a ZoneUsageProfile object. It applies the resources defined in the ZoneUsageProfile to all namespaces with the given organization label. It dynamically watches the resources defined in the ZoneUsageProfile to keep those resources in sync. Reconciler must be setup with SetupWithManager.
func (*ZoneUsageProfileApplyReconciler) Reconcile ¶ added in v0.10.0
func (r *ZoneUsageProfileApplyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile applies a ZoneUsageProfile to all namespaces with the given organization label. It returns an error if more than one ZoneUsageProfile try to manage a resource.
func (*ZoneUsageProfileApplyReconciler) SetupWithManager ¶ added in v0.10.0
func (r *ZoneUsageProfileApplyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ZoneUsageProfileSyncReconciler ¶ added in v0.10.0
type ZoneUsageProfileSyncReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder ForeignClient client.Client }
ZoneUsageProfileSyncReconciler reconciles a ZoneUsageProfile object
func (*ZoneUsageProfileSyncReconciler) Reconcile ¶ added in v0.10.0
func (r *ZoneUsageProfileSyncReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile syncs the ZoneUsageProfile with the upstream UsageProfile resource from the foreign (Control-API) cluster.
func (*ZoneUsageProfileSyncReconciler) SetupWithManagerAndForeignCluster ¶ added in v0.10.0
func (r *ZoneUsageProfileSyncReconciler) SetupWithManagerAndForeignCluster(mgr ctrl.Manager, foreign clustersource.ClusterSource) error
SetupWithManager sets up the controller with the Manager.