Documentation
¶
Index ¶
Constants ¶
const DefaultOrganizationAnnotation = "appuio.io/default-organization"
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.
const OrganizationMembersManifestName = "members"
OrganizationMembersManifestName is the static name of the OrganizationMembers manifest in the control-api cluster.
const UpstreamFinalizerPrefix = "agent.appuio.io/group-zone-"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupSyncReconciler ¶ added in v0.12.0
type GroupSyncReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
ForeignClient client.Client
ControlAPIFinalizerZoneName string
}
GroupSyncReconciler reconciles a Group object
func (*GroupSyncReconciler) Reconcile ¶ added in v0.12.0
Reconcile syncs the Group with the upstream OrganizationMembers or Team resource from the foreign (Control-API) cluster.
func (*GroupSyncReconciler) SetupWithManagerAndForeignCluster ¶ added in v0.12.0
func (r *GroupSyncReconciler) SetupWithManagerAndForeignCluster(mgr ctrl.Manager, foreign cluster.Cluster) error
SetupWithManager sets up the controller with the Manager.
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
RatioWarnThreshold *inf.Dec
}
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 UserAttributeSyncReconciler ¶ added in v0.11.0
type UserAttributeSyncReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
ForeignClient client.Client
}
UserAttributeSyncReconciler reconciles a User object
func (*UserAttributeSyncReconciler) Reconcile ¶ added in v0.11.0
func (r *UserAttributeSyncReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile syncs the User with the upstream User resource from the foreign (Control-API) cluster. Currently the following attributes are synced: - .spec.preferences.defaultOrganizationRef -> .metadata.annotations["appuio.io/default-organization"]
func (*UserAttributeSyncReconciler) SetupWithManagerAndForeignCluster ¶ added in v0.11.0
func (r *UserAttributeSyncReconciler) SetupWithManagerAndForeignCluster(mgr ctrl.Manager, foreign cluster.Cluster) 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 cluster.Cluster) error
SetupWithManager sets up the controller with the Manager.