util

package
v0.1.82 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNamespaceLookup = errors.New("unable to lookup namespace")
)

Functions

func ControlPlaneInitTolerations

func ControlPlaneInitTolerations() []interface{}

ControlPlaneInitTolerations are any other tolerate any other taints we put in place, or are placed there by the system, on initial control plane provisioning to ensure correct operation. This is typically only for things like the CNI and cloud provider.

func ControlPlaneNodeSelector

func ControlPlaneNodeSelector() map[string]interface{}

ControlPlaneNodeSelector returns a key/value map of labels to match in order to force scheduling on the control plane. Used in conjunction with, and for the same reason as, ControlPlaneTolerations.

func ControlPlaneTolerations

func ControlPlaneTolerations() []interface{}

ControlPlaneTolerations returns a list of tolerations required to have a pod scheduled on the control plane. This is typically used for managed services to keep them off the worker nodes and allow scale to zero.

func GetConfigurationHash

func GetConfigurationHash(config any) (string, error)

GetConfigurationHash is used to restart badly behaved apps that don't respect configuration changes.

func GetResourceNamespace

func GetResourceNamespace(ctx context.Context, l labels.Set) (*corev1.Namespace, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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