portworx / helm

Repository for Portworx Helm assets
Apache License 2.0
48 stars 65 forks source link

PB-7958: Adding helm env variables for backup and vol delete worker thread #627

Closed kgarg-px closed 3 months ago

kgarg-px commented 3 months ago

What this PR does / why we need it: Addition of env variables for number of backup and volume delete worker threads Which issue(s) this PR fixes (optional) Closes #

Special notes for your reviewer: The env variables have been added as it can be seen in the below screenshot for the deployment spec of px-backup api Screenshot 2024-08-27 at 3 05 28 PM

yaml of the pxb deployment spec is:

root@ip-10-13-160-50:~# kubectl get deployment px-backup -n px-backup -oyaml
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "15"
    meta.helm.sh/release-name: px-central
    meta.helm.sh/release-namespace: px-backup
  creationTimestamp: "2024-08-12T06:03:10Z"
  generation: 15
  labels:
    app.kubernetes.io/component: px-backup
    app.kubernetes.io/instance: px-central
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: px-central
    app.kubernetes.io/version: 2.8.0
    helm.sh/chart: px-central-2.8.0
  name: px-backup
  namespace: px-backup
  resourceVersion: "7244272"
  uid: 8101d6c2-1779-4169-a15f-b4d945296953
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      app: px-backup
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/restartedAt: "2024-08-27T06:53:09Z"
      creationTimestamp: null
      labels:
        app: px-backup
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: pxbackup/enabled
                operator: NotIn
                values:
                - "false"
      containers:
      - command:
        - /px-backup
        - start
        - --datastoreEndpoints=mongodb://pxbackup:Password1@pxc-backup-mongodb-0.pxc-backup-mongodb-headless:27017,pxc-backup-mongodb-1.pxc-backup-mongodb-headless:27017,pxc-backup-mongodb-2.pxc-backup-mongodb-headless:27017/?authSource=px-backup&replicaSet=rs0
        - --mongo-migration=complete
        env:
        - name: PX_BACKUP_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: PX_BACKUP_DEFAULT_ORG
          value: default
        - name: BACKUP_DELETE_WORKER
          value: "5"
        - name: VOL_DELETE_WORKER
          value: "5"
        - name: ENABLE_MONITOR_BL_HEALTH
          value: "false"
        - name: MONITOR_BL_HEALTH_FREQUENCY
          value: 210m
        - name: PX_BACKUP_DEFAULT_DATASTORE
          value: mongodb
        - name: USE_PX_BACKUP_EMAIL_ALERT_TEMPLATE
          value: "true"
        - name: SOFT_LICENSING_PERIOD
          value: "36160"
        - name: AIRGAP_REPORTING_PERIOD
          value: "90"
        image: pure-artifactory.dev.purestorage.com/px-docker-remote/portworx/px-backup-base:2.8.0-dev
        imagePullPolicy: Always
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /v1/health
            port: 10001
            scheme: HTTP
          initialDelaySeconds: 1800
          periodSeconds: 60
          successThreshold: 1
          timeoutSeconds: 1
        name: px-backup
        ports:
        - containerPort: 10002
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /v1/health
            port: 10001
            scheme: HTTP
          initialDelaySeconds: 15
          periodSeconds: 60
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: docregistry-secret
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        fsGroup: 1000
        runAsNonRoot: true
        runAsUser: 1000
      serviceAccount: px-backup-account
      serviceAccountName: px-backup-account
      terminationGracePeriodSeconds: 30
status:
  conditions:
  - lastTransitionTime: "2024-08-12T06:03:10Z"
    lastUpdateTime: "2024-08-12T06:03:10Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2024-08-12T06:03:10Z"
    lastUpdateTime: "2024-08-27T09:30:10Z"
    message: ReplicaSet "px-backup-7ccdf7dd78" is progressing.
    reason: ReplicaSetUpdated
    status: "True"
    type: Progressing
  observedGeneration: 15
  replicas: 1
  unavailableReplicas: 1
  updatedReplicas: 1
prashanthpx commented 3 months ago

@kgarg-px Sorry i missed seeing this PR but should not be a helm parameter but a hard coded value in the. Can you pls correct the same?