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

set default config to null in Helm

    XMLWordPrintable

Details

    • Page
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • documentation, helm
    • None
    • 18: PE/Tasks/Docs
    • 1

    Description

      We have the following in the values.yaml

       servers:
            # Name for the server configuration. It must be unique.
            default:
              # Size of the couchbase cluster.
              size: 3
              # The services to run on nodes
              services:
                - data
                - index
                - query
                - search
      

      If we change default to other names without setting defalut:null, it will spin up the default config (with different node counts), we need to document this, and so if customer wants to change the name default to something else, they need to set default:null

       servers:
            # Name for the server configuration. It must be unique.
            default:null
            data-query-index:
              # Size of the couchbase cluster.
              size: 3
              # The services to run on nodes
              services:
                - data
                - index
                - query
                - search
      

      Attachments

        Issue Links

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

          Activity

            Patrick Stephens do you suppose the same doc updates we made in K8S-1932 also apply to this issue?

            eric.schneider Eric Schneider (Inactive) added a comment - Patrick Stephens do you suppose the same doc updates we made in K8S-1932 also apply to this issue?

            So this is standard Helm - it works by override only. It'll merge your overrides with the defaults provided to give you the actual values used.

            In the values we provide a configuration (helpfully called `default`). This will always be provided unless you explicitly override it to null, that's just the way helm works.

            We do keep getting similar questions about this so it might be worth making it more visible but really it is a helm usage question rather than anything we're doing.

            The doc changes are specific to disabling buckets so I'd say no, it's the same overall issue but do we want to go through every possible setting and say this is how you disable it rather than just a top-level "remember this is how helm does stuff so to disable things you must explicitly set to null"?

            patrick.stephens Patrick Stephens (Inactive) added a comment - So this is standard Helm - it works by override only. It'll merge your overrides with the defaults provided to give you the actual values used. In the values we provide a configuration (helpfully called `default`). This will always be provided unless you explicitly override it to null, that's just the way helm works. We do keep getting similar questions about this so it might be worth making it more visible but really it is a helm usage question rather than anything we're doing. The doc changes are specific to disabling buckets so I'd say no, it's the same overall issue but do we want to go through every possible setting and say this is how you disable it rather than just a top-level "remember this is how helm does stuff so to disable things you must explicitly set to null"?

            Thanks Patrick Stephens !

            You're right, it looks like we'll have to consider how to handle this issue more systemically. However, it does seem somewhat counterintuitive compared to how default overrides work for values as opposed to a default key. (Which appears to be what the cluster and bucket names are here? A value?) If the name was a value, e.g. name: default, overwriting it with your own name would override the default name as expected. But since default is the key, you need to set the value to null to properly override the key.

            Do I have the above correct? If so, maybe we craft a statement based on this idea and spread it around the helm docs?

             

            eric.schneider Eric Schneider (Inactive) added a comment - Thanks Patrick Stephens ! You're right, it looks like we'll have to consider how to handle this issue more systemically. However, it does seem somewhat counterintuitive compared to how default overrides work for values as opposed to a default key. (Which appears to be what the cluster and bucket names are here? A value?) If the name was a value , e.g. name: default , overwriting it with your own name would override the default name as expected. But since default is the key, you need to set the value to null to properly override the key. Do I have the above correct? If so, maybe we craft a statement based on this idea and spread it around the helm docs?  

            It would help I think as well if we didn't insist on using the name `default` for things. It makes people think that we just override it and then they're not done as you say. I think we have a lot of legacy though were other functionality assumes names like `default` and so is tightly coupled.

            patrick.stephens Patrick Stephens (Inactive) added a comment - It would help I think as well if we didn't insist on using the name `default` for things. It makes people think that we just override it and then they're not done as you say. I think we have a lot of legacy though were other functionality assumes names like `default` and so is tightly coupled.
            patrick.stephens Patrick Stephens (Inactive) added a comment - https://helm.sh/docs/chart_template_guide/values_files/#deleting-a-default-key  

            Good find!

            eric.schneider Eric Schneider (Inactive) added a comment - Good find!

            People

              patrick.stephens Patrick Stephens (Inactive)
              tin.tran Tin Tran
              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