Documentation ¶
Index ¶
- func MapNSTemplateTierToSpaces(namespace string, cl runtimeclient.Client) func(ctx context.Context, object runtimeclient.Object) []reconcile.Request
- func MapSpaceBindingToParentAndSubSpaces(cl runtimeclient.Client) func(ctx context.Context, object runtimeclient.Object) []reconcile.Request
- func NewNSTemplateSet(namespace string, space *toolchainv1alpha1.Space, ...) *toolchainv1alpha1.NSTemplateSet
- func NewNSTemplateSetSpec(space *toolchainv1alpha1.Space, bindings []toolchainv1alpha1.SpaceBinding, ...) toolchainv1alpha1.NSTemplateSetSpec
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapNSTemplateTierToSpaces ¶
func MapNSTemplateTierToSpaces(namespace string, cl runtimeclient.Client) func(ctx context.Context, object runtimeclient.Object) []reconcile.Request
func MapSpaceBindingToParentAndSubSpaces ¶
func MapSpaceBindingToParentAndSubSpaces(cl runtimeclient.Client) func(ctx context.Context, object runtimeclient.Object) []reconcile.Request
MapSpaceBindingToParentAndSubSpaces maps the SpaceBinding of a given Space to it's subSpaces (if any). It enables SpaceBinding inheritance from the parentSpace to the eventual subSpaces.
The logic works as following: - an event is triggered on a SpaceBinding object (something has changed) - from the SpaceBinding labels we get the name of the Space object (a.k.a parentSpace) - with the name of the Space (parentSpace) we search for eventual subSpaces - in order to reflect the changes on SpaceBinding we trigger a `reconcile.Request` for the Space (parentSpace) and all it's subSpaces (if any)
func NewNSTemplateSet ¶
func NewNSTemplateSet(namespace string, space *toolchainv1alpha1.Space, bindings []toolchainv1alpha1.SpaceBinding, tmplTier *toolchainv1alpha1.NSTemplateTier) *toolchainv1alpha1.NSTemplateSet
func NewNSTemplateSetSpec ¶
func NewNSTemplateSetSpec(space *toolchainv1alpha1.Space, bindings []toolchainv1alpha1.SpaceBinding, tmplTier *toolchainv1alpha1.NSTemplateTier) toolchainv1alpha1.NSTemplateSetSpec
Types ¶
type Reconciler ¶
type Reconciler struct { Client runtimeclient.Client Namespace string MemberClusters map[string]cluster.Cluster NextScheduledUpdate time.Time LastExecutedUpdate time.Time }
Reconciler reconciles a Space object
func (*Reconciler) Reconcile ¶
Reconcile ensures that there is an NSTemplateSet resource defined in the target member cluster
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, memberClusters map[string]cluster.Cluster) error
SetupWithManager sets up the controller reconciler with the Manager and the given member clusters. Watches the Space resources in the current (host) cluster as its primary resources. Watches NSTemplateSets on the member clusters as its secondary resources.