meta

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TolerateMaster allows pod to be scheduled on master nodes
	TolerateMaster = corev1.Toleration{
		Key:    "node-role.kubernetes.io/master",
		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,
	}

	// 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 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 OperatorNamespace

func OperatorNamespace() string

OperatorNamespace returns the namespace the operator is running in. If the namespace is defined in the environment with the OPERATOR_NAMESPACE key then that is return, otherwise the default "tigera-operator" namespace is returned.

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 (
	DefaultCertificateDuration = 100 * 365 * 24 * time.Hour

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

	// 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