unbounded

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package unbounded holds small cross-cutting helpers shared by the unbounded components. It deliberately has no dependencies (other than the standard library) so that any package (under cmd/, internal/, or hack/cmd/) can import it without risking an import cycle.

Index

Constants

View Source
const (
	// LegacyKubeNamespace is where machina, metalman, and storage ran before
	// the consolidation onto SystemNamespace().
	LegacyKubeNamespace = "unbounded-kube"

	// LegacyNetNamespace is where unbounded-net ran before the consolidation.
	LegacyNetNamespace = "unbounded-net"
)
View Source
const DefaultSystemNamespace = "unbounded-system"

DefaultSystemNamespace is the namespace baked into the rendered manifests at build time and the default install namespace for unbounded components. It is the build-time literal that manifest namespace references carry (`{{ default "unbounded-system" .Namespace }}`), so tooling that retargets a manifest to a custom namespace must use this constant as the rewrite source, NOT SystemNamespace() (which reflects the caller's own POD_NAMESPACE and would leave build-time references unrewritten). The Makefile UNBOUNDED_NAMESPACE variable and the manifest template defaults must agree with this value; that invariant is enforced by the drift-guard test in this package.

View Source
const ReservedPrefix = "unbounded-cloud.io/"

ReservedPrefix marks the labels and annotations the operator owns on the objects it manages. They carry config hashes, Site scoping and override visibility, so a user patch may not write them and a change to one is drift the operator must repair.

It lives here rather than beside the override allowlist because both the allowlist and the workload watch predicates need it, and the override package already depends on the component package that holds those predicates.

Variables

This section is empty.

Functions

func IsLegacyNamespace

func IsLegacyNamespace(ns string) bool

IsLegacyNamespace reports whether ns is one of the pre-consolidation namespaces the operator's migration reaper drains and deletes. Installing unbounded into one of these is unsafe: the reaper would delete the very namespace it just migrated into.

func SystemNamespace

func SystemNamespace() string

SystemNamespace returns the namespace unbounded components run in. When POD_NAMESPACE is set (injected into pods via the Downward API) it is used, so components follow whatever namespace they are deployed into; otherwise the default systemNamespace is returned. Client-side tools, which have no POD_NAMESPACE, therefore see the default.

Types

This section is empty.

Jump to

Keyboard shortcuts

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