Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-2474

Resolve issue with service account override for backup in helm

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • helm
    • None
    • 42: GA items and Connect
    • 1

    Description

      The helm template function is currently using an invalid field to override the backup service account name. We need to make sure it uses the right one.

      .Values.cluster.backup.serviceAccountName instead of .Values.cluster.serviceAccountName

      https://github.com/couchbase-partners/helm-charts/blob/a6d9e1b5e3b8b24eccf73e158f35adb1d4254ae5/charts/couchbase-operator/templates/_helpers.tpl#L417

      Using this YAML:

      backups:
         default-backup:
           name: my-backup-2
           strategy: full_incremental
           full:
             schedule: "0 3 * * *"
           incremental:
             schedule: "*/1 * * * *"
           successfulJobsHistoryLimit: 3
           failedJobsHistoryLimit: 5
           backoffLimit: 2 
           backupRetention: 24h
           logRetention: 168h
           size: 35Gi
      install:
        couchbaseOperator: true
        admissionController: false
        couchbaseCluster: true
      cluster:
        image: "couchbase/server:7.0.1"
        servers:
          default:
            size: 1
        backup:
          managed: true
          serviceAccountName: couchbase-backup
      

      With helm gives you these errors:

      helm upgrade --install couchbase couchbase/couchbase-operator --values=./test.yaml --namespace test --create-namespace
      ...
      kubectl get events --namespace test
      LAST SEEN   TYPE      REASON                 OBJECT                                 MESSAGE
      4m14s       Warning   FailedCreate           job/my-backup-2-incremental-27245645   Error creating: pods "my-backup-2-incremental-27245645-" is forbidden: error looking up service account test/couchbase-backup: serviceaccount "couchbase-backup" not found
      27m         Warning   FailedCreate           job/my-backup-2-incremental-27245645   Error creating: Unauthorized
      98m         Normal    JobAlreadyActive       cronjob/my-backup-2-incremental        Not starting job because prior execution is running and concurrency policy is Forbid
      2m6s        Warning   TooManyMissedTimes     cronjob/my-backup-2-incremental        too many missed start times: 0. Set or decrease .spec.startingDeadlineSeconds or check clock skew
      4m32s       Normal    WaitForFirstConsumer   persistentvolumeclaim/my-backup-2      waiting for first consumer to be created before binding
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            roo.thorp Roo Thorp
            patrick.stephens Patrick Stephens (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty