pxc-backup add nodeSelector
Description
Environment
Smart Checklist
Activity
Tomislav Plavcic June 3, 2022 at 1:37 PM
nodeSelector can be specified in the storages section for specific storage, since helm chart is using whatever you put into storages without changes there is no difference here between using cr.yaml directly and helm chart.
So it can be specified like this:
s3-us-west:
type: s3
nodeSelector:
storage: tape
backupWorker: 'True'
s3:
bucket: tomislav-backup-test
credentialsSecret: my-cluster-name-backup-s3
region: us-west-2
And this is what will be generated:
backup:
image: percona/percona-xtradb-cluster-operator:1.10.0-pxc8.0-backup
pitr:
enabled: false
storages:
fs-pvc:
type: filesystem
volume:
persistentVolumeClaim:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 6Gi
s3-us-west:
nodeSelector:
backupWorker: "True"
storage: tape
s3:
bucket: tomislav-backup-test
credentialsSecret: my-cluster-name-backup-s3
region: us-west-2
type: s3
schedule:
- keep: 5
name: daily-backup
schedule: 0 0 * * *
storageName: fs-pvc
Veer Pratap October 8, 2021 at 10:17 AM
backup:
image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0-backup
serviceAccountName: percona-xtradb-cluster-operator
imagePullSecrets:
- name: private-registry-credentials
pitr:
enabled: false
storageName: STORAGE-NAME-HERE
timeBetweenUploads: 60
storages:
s3-us-west:
type: s3nodeSelector:
storage: tape
backupWorker: 'True'
resources:
requests:
memory: 1G
cpu: 600m
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: backupWorker
operator: In
values:
- 'True'
i am not sure if this is where i we have to make changes
Veer Pratap October 8, 2021 at 9:57 AM
i know
For a new pod, you can add the selector to the pod specification directly:
apiVersion: v1
kind: Pod
...
spec: nodeSelector:
<key>: <value>
i don't understand what is the backup pod referring to here?
Jira Bot September 8, 2021 at 10:57 AM
Hello @yangyk,
I'm jira-bot, Percona's automated helper script. Your bug report is important
to us but we've been unable to reproduce it, and asked you for more
information. If we haven't heard from you on this in 3 more weeks, the issue
will be automatically closed.
yangyk August 11, 2021 at 1:58 AM
it's helm, need to modify the pxc-db/templates/_helpers.tpl, about the pxc-database.storages part, to achive the affinity: node-role.kubernetes.io/{{ .Release.Namespace }}
Need to add the support for nodeSelector variable in the helm chart for backup pod. Right now it is not working, but can be configured through regular cr.yaml.