meta

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Finalizer for the ArgoCD addon.
	ControllerFinalizer = "argo.addons.projectcapsule.dev/finalize"

	// Annotation on Tenant.
	// Change the Appproject Name for the tenant.
	AnnotationProjectName = "argo.addons.projectcapsule.dev/name"

	// Annotation on Tenant
	// Change the ServiceAccount Namespace for the tenant.
	AnnotationServiceAccountNamespace = "argo.addons.projectcapsule.dev/service-account-namespace"

	// Annotation on Tenant.
	// Apply force for this tenant.
	AnnotationForce = "argo.addons.projectcapsule.dev/force"

	// Annotation on Tenant.
	// Annotation to control if a ServiceAccount should be registered as destination.
	AnnotationDestinationRegister = "argo.addons.projectcapsule.dev/register-dest"

	// Annotation on Tenant.
	// Decouple Ownerreference from the origin tenant, to avoid deletion of the appproject.
	AnnotationProjectDecouple = "argo.addons.projectcapsule.dev/decouple"

	// Annotation on Tenant.
	// Read-Only mode for the approject (every change from approject ownership is ignored).
	AnnotationProjectReadOnly = "argo.addons.projectcapsule.dev/read-only"
)
View Source
const (
	// ReadyCondition indicates the resource is ready and fully reconciled.
	// If the Condition is False, the resource SHOULD be considered to be in the process of reconciling and not a
	// representation of actual state.
	ReadyCondition    string = "Ready"
	NotReadyCondition string = "NotReady"

	// SucceededReason indicates a condition or event observed a success.
	SucceededReason string = "Applied"

	// FailedReason indicates a condition or event observed a failure.
	FailedReason string = "Failed"

	// Given object already exists.
	ObjectAlreadyExistsReason string = "ObjectAlreadyExists"

	// ProgressingReason indicates a condition or event observed progression, for example when the reconciliation of a
	// resource or an action has started.
	ProgressingReason string = "Progressing"
)
View Source
const (
	// ManagerLabel.
	ManagedTenantLabel = "argo.addons.projectcapsule.dev/tenant"

	// Label to indicate if source repositories may be create in that namespace.
	AllowRepositoryLabel           = "argo.addons.projectcapsule.dev/allow-repos"
	RepositorySourceNameLabel      = "argo.addons.projectcapsule.dev/source-name"
	RepositorySourceNamespaceLabel = "argo.addons.projectcapsule.dev/source-namespace"

	// ManagedByLabel.
	ManagedByLabel      = "app.kubernetes.io/managed-by"
	ManagedByLabelValue = "capsule-argocd-addon"
	ProvisionedByLabel  = "app.kubernetes.io/provisioned-by"
)
View Source
const (
	// FinalizerName is the finalizer name for the translator.
	TranslatorFinalizerPrefix = "translator.addons.projectcapsule.dev/"
)

Variables

This section is empty.

Functions

func AddDynamicTenantOwnerReference

func AddDynamicTenantOwnerReference(
	schema *runtime.Scheme,
	obj client.Object,
	tenant *capsulev1beta2.Tenant,
	decouple bool,
) (err error)

Also considers Decoupling from the tenant.

func ContainsTranslatorFinalizer

func ContainsTranslatorFinalizer(obj client.Object) (contains bool)

Contains Translator Finalizers.

func GetTranslatingFinalizers

func GetTranslatingFinalizers(obj client.Object) (translators []string)

Get all translators based on their finalizer.

func HasTenantOwnerReference

func HasTenantOwnerReference(obj client.Object, tenant *capsulev1beta2.Tenant) bool

If not returns false.

func NewAlreadyExistsCondition

func NewAlreadyExistsCondition(obj client.Object, msg string) metav1.Condition

func NewNotReadyCondition

func NewNotReadyCondition(obj client.Object, msg string) metav1.Condition

func NewReadyCondition

func NewReadyCondition(obj client.Object) metav1.Condition

Can be used when tenant was successfully translated Should be used on translator level.

func ProccessBoolean

func ProccessBoolean(val string, def bool) bool

func RemoveDynamicTenantOwnerReference

func RemoveDynamicTenantOwnerReference(obj client.Object, tenant *capsulev1beta2.Tenant) (err error)

Remove an OwnerReference from an object from a tenant.

func RemoveTranslatingFinalizers

func RemoveTranslatingFinalizers(obj client.Object)

Get all translators based on their finalizer.

func StringSliceContains

func StringSliceContains(slice []string, element string) bool

Verify if a string slice contains a specific element.

func TenantProjectName

func TenantProjectName(tenant *capsulev1beta2.Tenant) (name string)

Tenant Approject-Name.

func TenantRegisterDestination

func TenantRegisterDestination(tenant *capsulev1beta2.Tenant) bool

func TenantServiceAccountNamespace

func TenantServiceAccountNamespace(tenant *capsulev1beta2.Tenant) string

Tenant ServiceAccount Namespace.

func TrackingLabels

func TrackingLabels() map[string]string

Common Labels for tracking resources provisioned by this controller.

func TranslatorFinalizer

func TranslatorFinalizer(name string) string

func TranslatorRemoveTenantLabels

func TranslatorRemoveTenantLabels(labels map[string]string) map[string]string

func TranslatorTrackingLabels

func TranslatorTrackingLabels(tenant *capsulev1beta2.Tenant) map[string]string

Tracking Labels for resources provisioned by this controller.

func WithTranslatorTrackingLabels

func WithTranslatorTrackingLabels(obj client.Object, tenant *capsulev1beta2.Tenant) (labels map[string]string)

Respects the labels from the objects and just overwrites the tracking labels.

Types

This section is empty.

Jump to

Keyboard shortcuts

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