Documentation ¶
Index ¶
- Constants
- func AddDynamicTenantOwnerReference(ctx context.Context, schema *runtime.Scheme, obj client.Object, ...) (err error)
- func ContainsTranslatorFinalizer(obj client.Object) (contains bool)
- func GetTranslatingFinalizers(obj client.Object) (translators []string)
- func HasTenantOwnerReference(obj client.Object, tenant *capsulev1beta2.Tenant) bool
- func NewAlreadyExistsCondition(obj client.Object, msg string) metav1.Condition
- func NewNotReadyCondition(obj client.Object, msg string) metav1.Condition
- func NewReadyCondition(obj client.Object) metav1.Condition
- func ProccessBoolean(val string, def bool) bool
- func RemoveDynamicTenantOwnerReference(obj client.Object, tenant *capsulev1beta2.Tenant) (err error)
- func RemoveTranslatingFinalizers(obj client.Object)
- func StringSliceContains(slice []string, element string) bool
- func TenantDecoupleProject(tenant *capsulev1beta2.Tenant) bool
- func TenantProjectName(tenant *capsulev1beta2.Tenant) (name string)
- func TenantReadOnly(tenant *capsulev1beta2.Tenant) bool
- func TenantRegisterDestination(tenant *capsulev1beta2.Tenant) bool
- func TenantServiceAccountNamespace(tenant *capsulev1beta2.Tenant) string
- func TrackingLabels() map[string]string
- func TranslatorFinalizer(name string) string
- func TranslatorRemoveTenantLabels(labels map[string]string) map[string]string
- func TranslatorTrackingLabels(tenant *capsulev1beta2.Tenant) map[string]string
- func WithTranslatorTrackingLabels(obj client.Object, tenant *capsulev1beta2.Tenant) (labels map[string]string)
Constants ¶
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 // Annotation to control the proxy registration AnnotationUseProxy = "argo.addons.projectcapsule.dev/use-proxy" // 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" )
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" )
const ( // ManagerLabel ManagedTenantLabel = "argo.addons.projectcapsule.dev/tenant" // ManagedByLabel ManagedByLabel = "app.kubernetes.io/managed-by" ManagedByLabelValue = "capsule-argocd-addon" ProvisionedByLabel = "app.kubernetes.io/provisioned-by" )
const (
// FinalizerName is the finalizer name for the translator
TranslatorFinalizerPrefix = "translator.addons.projectcapsule.dev/"
)
Variables ¶
This section is empty.
Functions ¶
func AddDynamicTenantOwnerReference ¶
func AddDynamicTenantOwnerReference( ctx context.Context, schema *runtime.Scheme, obj client.Object, tenant *capsulev1beta2.Tenant, ) (err error)
Add Ownerreference, which does not cascade a deletion of the tenant Also considers Decoupling from the tenant
func ContainsTranslatorFinalizer ¶
Contains Translator Finalizers
func GetTranslatingFinalizers ¶
Get all translators based on their finalizer
func HasTenantOwnerReference ¶
func HasTenantOwnerReference(obj client.Object, tenant *capsulev1beta2.Tenant) bool
Tells us if there's already an ownerreference of the given tenant If not returns false
func NewNotReadyCondition ¶
func NewReadyCondition ¶
Can be used when tenant was successfully translated Should be used on translator level
func ProccessBoolean ¶
func RemoveDynamicTenantOwnerReference ¶
func RemoveDynamicTenantOwnerReference(obj client.Object, tenant *capsulev1beta2.Tenant) (err error)
Remove an OwnerReference from an object from a tenant
func RemoveTranslatingFinalizers ¶
Get all translators based on their finalizer
func StringSliceContains ¶
Verify if a string slice contains a specific element
func TenantDecoupleProject ¶
func TenantDecoupleProject(tenant *capsulev1beta2.Tenant) bool
func TenantProjectName ¶
func TenantProjectName(tenant *capsulev1beta2.Tenant) (name string)
Tenant Approject-Name
func TenantReadOnly ¶
func TenantReadOnly(tenant *capsulev1beta2.Tenant) bool
func TenantRegisterDestination ¶
func TenantRegisterDestination(tenant *capsulev1beta2.Tenant) bool
func TenantServiceAccountNamespace ¶
func TenantServiceAccountNamespace(tenant *capsulev1beta2.Tenant) string
Tenant ServiceAccount Namespace
func TrackingLabels ¶
Common Labels for tracking resources provisioned by this controller
func TranslatorFinalizer ¶
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.