Documentation ¶
Index ¶
- Variables
- func APIServerNamespace(v operatorv1.ProductVariant) string
- func AnnotationHash(i interface{}) string
- func DefaultOperatorCASignerName() string
- func GetResourceRequirements(i *operatorv1.InstallationSpec, name operatorv1.ComponentName) corev1.ResourceRequirements
- func SecretsAnnotationHash(secrets ...*corev1.Secret) string
- type OSType
Constants ¶
This section is empty.
Variables ¶
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 ¶
func GetResourceRequirements(i *operatorv1.InstallationSpec, name operatorv1.ComponentName) corev1.ResourceRequirements
GetResourceRequirements retrieves the component ResourcesRequirements from the installation. If it doesn't exist, it returns an empty ResourceRequirements struct.
func SecretsAnnotationHash ¶
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" )