Pod Configuration
This section describes how to configure the Pod of a Backup.
Resource Requirements
Section titled “Resource Requirements”It is possible to set the resource requirements of the Pod of the Backup process.
To do so, set the .spec.resources field to a
ResourceRequirements object.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" resources: requests: memory: "1Gi" cpu: "250m" limits: memory: "1Gi" # cpu: "500m"It is advised to set the memory limits to the same value as the memory requests, and to not set any CPU limit.
To define how much CPU and memory is needed, see the Backup Requirements.
Service Account
Section titled “Service Account”A ServiceAccount is used to provide an identity for processes that run in a Pod . The identity is used to determine what resources the process has access to.
To configure the ServiceAccount that will be attached to the Pod of the Backup,
set the .spec.serviceAccountName field to the name of the ServiceAccount.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" serviceAccountName: "backup-sa"Arguments
Section titled “Arguments”It is possible to add extra arguments to the Backup process. This can be useful for debugging or for enabling additional features.
To do so, add the .spec.extraArgs field with a list of args.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" extraArgs: - "--foo" - "bar"Environment Variables
Section titled “Environment Variables”It is possible to set environment variables for the Backup process.
To do so, set the .spec.extraEnvVars field to a list of environment variables.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" extraEnvVars: - name: "RUST_LOG" value: "debug"Image Pull Secrets
Section titled “Image Pull Secrets”When using a private container registry, it is necessary to provide credentials to pull images from the registry.
It is possible to set the image pull secrets for the Pod of the Backup process. Note that this feature is also available as a global setting during the installation of the operator. This section is only for setting the image pull secrets for a specific Backup.
To set the image pull secrets, set the .spec.imagePullSecrets field to an array of objects with the name of a Secret.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" imagePullSecrets: - name: "myregistrykey"---apiVersion: v1kind: Secretmetadata: name: myregistrykeytype: kubernetes.io/dockerconfigjsondata: .dockerconfigjson: <base64 encoded .docker/config.json>Tolerations
Section titled “Tolerations”It is possible to set Tolerations for the Pod of the Backup process.
To do so, set the .spec.tolerations field to a list of tolerations.
Note that these tolerations are in addition to the default tolerations set by the operator.
apiVersion: kannika.io/v1alphakind : Backupmetadata: name: backupspec: sink: "sink" source: "source" tolerations: - key: "key" operator: "Equal" value: "value" effect: "NoSchedule"Affinity
Section titled “Affinity”It is possible to set the affinity of the Pod of the Backup process.
To do so, set the .spec.affinity field to an
Affinity object.
Note that these affinities override the default affinities set by the operator.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: topology.kubernetes.io/zone operator: In values: - antarctica-east1 - antarctica-west1Node Selector
Section titled “Node Selector”It is possible to set the node selector of the Pod of the Backup process.
To do so, set the .spec.nodeSelector field to a map of key-value pairs.
Note that this overrides the default node selector set by the operator.
apiVersion: kannika.io/v1alphakind: Backupmetadata: name: backupspec: sink: "sink" source: "source" nodeSelector: location: "the-moon"