nstemplatetier

package
v0.0.0-...-cea0250 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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

NewTTR creates a TierTemplateRevision CR for a given TierTemplate object.

func OutdatedTierSelector

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) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile takes care of fetching the NSTemplateTier

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr manager.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL