Documentation
¶
Index ¶
- func FailedCondition(reason string, cause string) toolchainv1alpha1.Condition
- func MapTierTemplateToNSTemplateTier(cl runtimeclient.Client) func(ctx context.Context, object runtimeclient.Object) []reconcile.Request
- func NewTTR(tierTmpl *toolchainv1alpha1.TierTemplate, ...) *toolchainv1alpha1.TierTemplateRevision
- func OutdatedTierSelector(tier *toolchainv1alpha1.NSTemplateTier) (runtimeclient.MatchingLabelsSelector, error)
- func ReadyCondition() toolchainv1alpha1.Condition
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailedCondition ¶
func FailedCondition(reason string, cause string) toolchainv1alpha1.Condition
func MapTierTemplateToNSTemplateTier ¶
func MapTierTemplateToNSTemplateTier(cl runtimeclient.Client) func(ctx context.Context, object runtimeclient.Object) []reconcile.Request
MapTierTemplateToNSTemplateTier maps the TierTemplate to all the NSTemplateTiers that are referencing it.
func NewTTR ¶
func NewTTR(tierTmpl *toolchainv1alpha1.TierTemplate, nsTmplTier *toolchainv1alpha1.NSTemplateTier) *toolchainv1alpha1.TierTemplateRevision
NewTTR creates a TierTemplateRevision CR for a given TierTemplate object.
func OutdatedTierSelector ¶
func OutdatedTierSelector(tier *toolchainv1alpha1.NSTemplateTier) (runtimeclient.MatchingLabelsSelector, error)
OutdatedTierSelector creates a label selector to find MasterUserRecords or Spaces which are not up-to-date with the templateRefs of the given NSTemplateTier.
(longer explanation) newLabelSelector creates a selector to find MasterUserRecords which have a label with key `toolchain.dev.openshift.com/<tiername>-tier-hash` but whose value is NOT `<hash>`
In other words, this label selector will be used to list MasterUserRecords which have a user account set to the given `<tier>` but with a template version (defined by `<hash>`) which is NOT to the expected value (the one provided by `instance`).
Note: The `hash` value is computed from the TemplateRefs. See `computeTemplateRefsHash()`
func ReadyCondition ¶
func ReadyCondition() toolchainv1alpha1.Condition
Types ¶
type Reconciler ¶
type Reconciler struct { Client runtimeclient.Client Scheme *runtime.Scheme }
Reconciler reconciles a NSTemplateTier object (only when this latter's specs were updated)
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr manager.Manager) error
SetupWithManager sets up the controller with the Manager.