pxc-backup add nodeSelector

Description

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.

Environment

None

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

  1. serviceAccountName: percona-xtradb-cluster-operator

  2. imagePullSecrets:

  3. - name: private-registry-credentials
    pitr:
    enabled: false
    storageName: STORAGE-NAME-HERE
    timeBetweenUploads: 60
    storages:
    s3-us-west:
    type: s3

  4. nodeSelector:

  5. storage: tape

  6. backupWorker: 'True'

  7. resources:

  8. requests:

  9. memory: 1G

  10. cpu: 600m

  11. affinity:

  12. nodeAffinity:

  13. requiredDuringSchedulingIgnoredDuringExecution:

  14. nodeSelectorTerms:

  15. - matchExpressions:

  16. - key: backupWorker

  17. operator: In

  18. values:

  19. - '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 ,
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 }}

Not a Bug

Details

Assignee

Reporter

Priority

Smart Checklist

Created August 10, 2021 at 6:45 AM
Updated March 5, 2024 at 5:46 PM
Resolved June 3, 2022 at 1:40 PM

Flag notifications