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

Helm chart issue with bucket `kind`

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • helm
    • None
    • 1

    Description

      Resolved by contributor on https://github.com/couchbase-partners/helm-charts/pull/56

      When specifying buckets in kind, the 2.2.006 and earlier charts do not default the `kind` field so if not present then triggers an exception.

       helm install test couchbase/couchbase-operator --set buckets.default.kind=null
       Error: template: couchbase-operator/templates/couchbase-bucket.yaml:21:8: executing "couchbase-operator/templates/couchbase-bucket.yaml" at <eq $spec.kind "CouchbaseEphemeralBucket">: error calling eq: incompatible types for comparison
      

      Applying the change from the PR demonstrates it working, reviewed by both Tommie McAfee and myself as correct too.

      git clone git@github.com:couchbase-partners/helm-charts.git
      cd helm-charts
      git fetch origin pull/56/head:fix_bucket_creation
      git checkout fix_bucket_creation 
      helm install test ./charts/couchbase-operator --set buckets.default.kind=null
      

      This correctly defaults it to `CouchbaseBucket`:

      kubectl describe couchbasebuckets.couchbase.com 
      Name:         default
      Namespace:    default
      Labels:       app.kubernetes.io/managed-by=Helm
                    cluster=test-couchbase-cluster
      Annotations:  meta.helm.sh/release-name: test
                    meta.helm.sh/release-namespace: default
      API Version:  couchbase.com/v2
      Kind:         CouchbaseBucket
      

      The cluster spins up correctly as well.

      Attachments

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

        Activity

          roo.thorp Roo Thorp added a comment -

          I've tested it locally and it looks fine, along with Tommie's unit tests passing, happy with this

          roo.thorp Roo Thorp added a comment - I've tested it locally and it looks fine, along with Tommie's unit tests passing, happy with this

          Thanks Roo, all merged and released as version 2.2.007 now.

          patrick.stephens Patrick Stephens (Inactive) added a comment - Thanks Roo, all merged and released as version 2.2.007 now.

          People

            patrick.stephens Patrick Stephens (Inactive)
            patrick.stephens Patrick Stephens (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty