policies

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AntiAffinity

type AntiAffinity struct {

	// Labels defines a list of label keys used to evaluate anti-affinity constraints for resource placement decisions.
	Labels []string `json:"labels,omitempty" yaml:"labels,omitempty"`

	// Mode specifies the enforcement level of anti-affinity constraints, such as Strict or Relaxed behavior.
	Mode AntiAffinityMode `json:"mode,omitempty" yaml:"mode,omitempty"`
}

AntiAffinity defines rules to prevent co-location of resources based on specified labels and operation mode. Labels specifies a set of key-value labels that form the basis of the anti-affinity constraints. Mode determines the mode of anti-affinity enforcement, for instance, strict or relaxed.

type AntiAffinityMode

type AntiAffinityMode string
const (
	// Strict Enforce anti-affinity rules strictly. Ensemble choosing fails if rules can't be met.
	// This mode is for high-availability systems needing strict resource separation.
	Strict AntiAffinityMode = "Strict"

	// Relaxed Try to follow anti-affinity rules, but proceed with ensemble choosing if not feasible.
	// Ideal for environments where resource utilization is limited.
	Relaxed AntiAffinityMode = "Relaxed"
)

type Policies

type Policies struct {
	// AntiAffinities defines a list of anti-affinity rules for placement policies, ensuring resources don't coexist undesirably.
	AntiAffinities []AntiAffinity `json:"antiAffinities,omitempty" yaml:"antiAffinities,omitempty"`
}

Jump to

Keyboard shortcuts

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