meta

package
v1.35.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TolerateControlPlane allows pod to be scheduled on master nodes
	TolerateControlPlane = []corev1.Toleration{
		{
			Key:    "node-role.kubernetes.io/master",
			Effect: corev1.TaintEffectNoSchedule,
		},
		{
			Key:    "node-role.kubernetes.io/control-plane",
			Effect: corev1.TaintEffectNoSchedule,
		},
	}

	// TolerateCriticalAddonsOnly allows pods to be rescheduled while the node is in "critical add-ons only" mode.
	TolerateCriticalAddonsOnly = corev1.Toleration{
		Key:      "CriticalAddonsOnly",
		Operator: corev1.TolerationOpExists,
	}

	TolerateCriticalAddonsAndControlPlane = append(TolerateControlPlane, TolerateCriticalAddonsOnly)

	// TolerateAll returns tolerations to tolerate all taints. When used, it is not necessary
	// to include the user's custom tolerations because we already tolerate everything.
	TolerateAll = []corev1.Toleration{
		TolerateCriticalAddonsOnly,
		{
			Effect:   corev1.TaintEffectNoSchedule,
			Operator: corev1.TolerationOpExists,
		},
		{
			Effect:   corev1.TaintEffectNoExecute,
			Operator: corev1.TolerationOpExists,
		},
	}
)

Functions

func APIServerNamespace added in v1.19.0

func APIServerNamespace(v operatorv1.ProductVariant) string

APIServerNamespace returns the namespace to use for the API server component.

func AnnotationHash

func AnnotationHash(i interface{}) string

AnnotationHash is to generate a hash that can be included in a Deployment or DaemonSet to trigger a restart/rolling update when a ConfigMap or Secret is updated.

func DefaultOperatorCASignerName

func DefaultOperatorCASignerName() string

func GetResourceRequirements

GetResourceRequirements retrieves the component ResourcesRequirements from the installation. If it doesn't exist, it returns an empty ResourceRequirements struct.

func SecretsAnnotationHash

func SecretsAnnotationHash(secrets ...*corev1.Secret) string

SecretsAnnotationHash generates a hash based off of the data in each secrets Data field that can be used by Deployments or DaemonSets to trigger a restart/rolling update based on changes to one of more secrets data.

Types

type OSType

type OSType string

This type helps ensure that we only use defined os types

const (
	OSTypeAny     OSType = "any"
	OSTypeLinux   OSType = "linux"
	OSTypeWindows OSType = "windows"

	// TigeraOperatorCAIssuerPrefix The name prefix used for the CA issuer, which is used
	// for self-signed certificates issued for operator-managed certificates.
	// NOTE: Do not change this field since we use this value to identify
	// certificates managed by this operator.
	TigeraOperatorCAIssuerPrefix = "tigera-operator-signer"
)

Jump to

Keyboard shortcuts

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