labels

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package labels defines the label constants and helpers used by the Orkestra control plane to identify and protect its own Kubernetes resources.

The deletion-protection label marks resources (Deployments, Services, Secrets, webhook configurations) that the Orkestra admission webhook should refuse to delete when a delete request arrives. This prevents accidental teardown of the operator itself.

Usage:

import orklabels "github.com/orkspace/orkestra/pkg/labels"

// Apply deletion-protection on top of any existing label set:
labels := orklabels.WithDeletionProtection(kfg.OrkestraResourceLabels())

// Check the constant directly when building label selectors:
selector := metav1.LabelSelector{
    MatchLabels: map[string]string{orklabels.DeletionProtectionLabel: "true"},
}

Index

Constants

View Source
const DeletionProtectionLabel = "orkestra.io/deletion-protection"

DeletionProtectionLabel is the label applied to all Orkestra-managed control-plane resources (Deployment, Service, Secrets, webhook configs) so that the deletion-protection admission webhook can identify and protect them from accidental deletion.

Variables

This section is empty.

Functions

func WithDeletionProtection

func WithDeletionProtection(m map[string]string) map[string]string

WithDeletionProtection returns a copy of m with DeletionProtectionLabel set to "true". The input map is never modified.

Types

This section is empty.

Jump to

Keyboard shortcuts

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