Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateNamespaceQuantityDelta(poolSizeLimit *int, size int, namespacesReady int, namespacesCreating int, ...) int
- func CheckReadyStatus(pool string, namespace core.Namespace, ready []core.Namespace) []core.Namespace
- func CopySecrets(ctx context.Context, cl client.Client, namespaceName string) error
- func CreateClowdEnv(ctx context.Context, cl client.Client, spec clowder.ClowdEnvironmentSpec, ...) error
- func CreateFrontendEnv(ctx context.Context, cl client.Client, namespaceName string, ...) error
- func CreateInitialAnnotations() map[string]string
- func CreateInitialLabels(poolName string) map[string]string
- func CreateNamespace(ctx context.Context, cl client.Client, pool *crd.NamespacePool) (string, error)
- func DeleteNamespace(ctx context.Context, cl client.Client, namespaceName string) error
- func GetClowdEnv(ctx context.Context, cl client.Client, namespaceName string) (bool, *clowder.ClowdEnvironment, error)
- func GetNamespace(ctx context.Context, cl client.Client, namespaceName string) (core.Namespace, error)
- func GetReadyNamespaces(ctx context.Context, cl client.Client, poolName string) ([]core.Namespace, error)
- func IsPoolAtLimit(currentSize int, sizeLimit int) bool
- func NewReservation(resName string, duration string, requester string, pool string) *crd.NamespaceReservation
- func UpdateAnnotations(ctx context.Context, cl client.Client, namespaceName string, ...) error
- func UpdateNamespaceResources(ctx context.Context, cl client.Client, pool *crd.NamespacePool, nsName string) (core.Namespace, error)
- func VerifyClowdEnvReady(env clowder.ClowdEnvironment) bool
- type CustomAnnotation
- type CustomLabel
- type ErrType
Constants ¶
View Source
const ( AnnotationEnvStatus = "env-status" AnnotationReserved = "reserved" CompletionTime = "completion-time" EnvStatusCreating = "creating" EnvStatusDeleting = "deleting" EnvStatusError = "error" EnvStatusReady = "ready" KindNamespacePool = "NamespacePool" LabelOperatorNS = "operator-ns" LabelPool = "pool" NamespaceEphemeralBase = "ephemeral-base" BonfireGinoreSecret = "bonfire.ignore" OpenShiftVaultSecretsSecret = "openshift-vault-secrets" QontractIntegrationSecret = "qontract.integration" TrueValue = "true" FalseValue = "false" )
Variables ¶
View Source
var AnnotationEnvCreating = CustomAnnotation{Annotation: AnnotationEnvStatus, Value: EnvStatusCreating}
View Source
var AnnotationEnvDeleting = CustomAnnotation{Annotation: AnnotationEnvStatus, Value: EnvStatusDeleting}
View Source
var AnnotationEnvError = CustomAnnotation{Annotation: AnnotationEnvStatus, Value: EnvStatusError}
View Source
var AnnotationEnvReady = CustomAnnotation{Annotation: AnnotationEnvStatus, Value: EnvStatusReady}
View Source
var AnnotationReservedFalse = CustomAnnotation{Annotation: AnnotationReserved, Value: FalseValue}
View Source
var AnnotationReservedTrue = CustomAnnotation{Annotation: AnnotationReserved, Value: TrueValue}
View Source
var LabelOperatorNamespaceTrue = CustomLabel{Label: LabelOperatorNS, Value: TrueValue}
Functions ¶
func CheckReadyStatus ¶
func CopySecrets ¶
func CreateClowdEnv ¶
func CreateFrontendEnv ¶
func CreateInitialLabels ¶
func CreateNamespace ¶
func DeleteNamespace ¶
func GetClowdEnv ¶
func GetNamespace ¶
func GetReadyNamespaces ¶
func IsPoolAtLimit ¶
func NewReservation ¶
func NewReservation(resName string, duration string, requester string, pool string) *crd.NamespaceReservation
NewReservation creates a mock reservation for testing
func UpdateAnnotations ¶
func UpdateNamespaceResources ¶ added in v0.6.0
func VerifyClowdEnvReady ¶
func VerifyClowdEnvReady(env clowder.ClowdEnvironment) bool
Types ¶
type CustomAnnotation ¶
func (*CustomAnnotation) ToMap ¶
func (a *CustomAnnotation) ToMap() map[string]string
type CustomLabel ¶
func (*CustomLabel) ToMap ¶
func (l *CustomLabel) ToMap() map[string]string
Click to show internal directories.
Click to hide internal directories.