kubernetes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelKeyOrganizationName    = "organization-name"
	LabelKeyEnvironmentName     = "environment-name"
	LabelKeyEnvironmentID       = "environment-id"
	LabelKeyProjectName         = "project-name"
	LabelKeyProjectID           = "project-id"
	LabelKeyComponentName       = "component-name"
	LabelKeyComponentID         = "component-id"
	LabelKeyDeploymentTrackName = "deployment-track-name"
	LabelKeyDeploymentTrackID   = "deployment-track-id"
	LabelKeyBuildName           = "build-name"
	LabelKeyDeploymentName      = "deployment-name"
	LabelKeyDeploymentID        = "deployment-id"
	LabelKeyManagedBy           = "managed-by"
	LabelKeyBelongTo            = "belong-to"
	LabelKeyComponentType       = "component-type"
	LabelKeyVisibility          = "gateway-visibility"

	// LabelKeyUUID stores the Kubernetes UID (metadata.uid) of the resource.
	LabelKeyUUID = "uuid"

	// LabelKeyTarget identifies which logical target a resource belongs to
	// Allowed values: build | runtime | gateway | <future‑targets>
	LabelKeyTarget = "target"

	LabelValueBuildTarget   = "build"
	LabelValueRuntimeTarget = "runtime"
	LabelValueGatewayTarget = "gateway"

	LabelValueManagedBy = "choreo-deployment-controller"
	LabelValueBelongTo  = "user-workloads"
)
View Source
const (
	MaxLabelNameLength     = 63
	MaxResourceNameLength  = maxNameLength
	MaxCronJobNameLength   = 52
	MaxJobNameLength       = 63
	MaxServiceNameLength   = 63
	MaxNamespaceNameLength = 63
	MaxContainerNameLength = 63
	MaxVolumeNameLength    = 63
)
View Source
const (
	// SystemNamespace is the namespace used by OpenChoreo data plane components.
	SystemNamespace = "openchoreo-data-plane" // TODO: Make this configurable
)

Variables

This section is empty.

Functions

func GenerateK8sName

func GenerateK8sName(names ...string) string

GenerateK8sName generates a Kubernetes-compliant name within the length limit, ensuring uniqueness by appending a hash of the full concatenated names. See https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names NOTE: Changes to this function will impact the generated names of all resources that can cause resource recreation and stale resources in the k8s cluster.

func GenerateK8sNameWithLengthLimit

func GenerateK8sNameWithLengthLimit(limit int, names ...string) string

GenerateK8sNameWithLengthLimit generates a Kubernetes-compliant name within the given length limit. This is useful when the name must be within a specific length limit, that is different from the default limit. Example: CronJob names must be within 52 characters.

func GetDPClient added in v0.2.0

func GetDPClient(dpClientMgr *KubeClientManager, dataplane *openchoreov1alpha1.DataPlane) (client.Client, error)

Types

type KubeClientManager added in v0.2.0

type KubeClientManager struct {
	// contains filtered or unexported fields
}

func NewManager added in v0.2.0

func NewManager() *KubeClientManager

NewManager creates a manager with initialized client map

func (*KubeClientManager) GetClient added in v0.2.0

GetClient returns a cached clientset or creates a new one if not found

Directories

Path Synopsis
Package types contains resource type definitions for the Kubernetes integration that are derived from the following projects: - Cilium: https://github.com/cilium/cilium/tree/main/pkg/k8s/apis/cilium.io - Argo Workflow: https://github.com/argoproj/argo-workflows/tree/main/pkg/apis/workflow - Secret Store CSI Driver: https://github.com/kubernetes-sigs/secrets-store-csi-driver/tree/main/apis/v1
Package types contains resource type definitions for the Kubernetes integration that are derived from the following projects: - Cilium: https://github.com/cilium/cilium/tree/main/pkg/k8s/apis/cilium.io - Argo Workflow: https://github.com/argoproj/argo-workflows/tree/main/pkg/apis/workflow - Secret Store CSI Driver: https://github.com/kubernetes-sigs/secrets-store-csi-driver/tree/main/apis/v1
argoproj.io/workflow/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.

Jump to

Keyboard shortcuts

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