limitranges

package
v0.7.12 Latest Latest
Warning

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

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

Documentation

Overview

pkg/resources/limitranges/limitrange.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply added in v0.7.12

Apply creates or updates a LimitRange using Server-Side Apply. Sends only the fields Orkestra owns; k8s-injected defaults are invisible.

func CopyToNamespaces

func CopyToNamespaces(
	ctx context.Context,
	kube kubeclient.KubeClient,
	owner domain.Object,
	spec ResolvedLimitRangeSpec,
	toNamespaces []string,
) error

CopyToNamespaces copies a LimitRange to multiple target namespaces. Reads the source once and creates copies in each namespace. Idempotent — skips namespaces where the LimitRange already exists.

func Create

Create creates a LimitRange if it does not already exist. Idempotent — skips if it already exists. Owner reference set for cascade deletion.

func Delete

Delete deletes the LimitRange if it exists.

func DeleteIfOwned

func DeleteIfOwned(ctx context.Context, kube kubeclient.KubeClient,
	owner domain.Object, name, namespace string) error

DeleteIfOwned deletes the LimitRange only if it is owned by the CR.

func Update

Update applies the LimitRange via SSA. Delegates to Apply.

Types

type ResolvedLimitRangeSpec

type ResolvedLimitRangeSpec struct {
	Name           string
	Namespace      string
	Limits         []orktypes.LimitRangeItem
	FromLimitRange string
	FromNamespace  string
	Labels         map[string]string
	Sleep          string
}

ResolvedLimitRangeSpec is the fully resolved LimitRange specification.

func Resolve

Resolve builds a ResolvedLimitRangeSpec from a LimitRangeTemplateSource. Template expressions must already be evaluated by template.Resolver before calling.

Jump to

Keyboard shortcuts

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