Skip to content

Inconsistent nulling nested sub-chart values in v3.13.0, v3.13.1 #12490

Closed

Description

@aabouzaid

This issue is related to #9027 which should been fixed in v3.13.0

However, looks like there is inconsistency where some nested sub-chart values are not nulled.

TL;DR

Nulling values remote sub-charts doesn't work, and it's still not possible to remove keys from them (remote means, during the packaging, they are referenced as dependency sub-charts with repository key).

But the sub-charts within the same repo during the packaging don't have that issue (null passed normally).

Details

In Camunda Helm chart, we have different types of dependencies (in-repo, remote, or nested), and some parts are nulled, and some are not.

Let's take this case:

The C8 chart depends on some in-repo and remote sub-charts, let's just focus on Elasticsearch sub-chart as an example:

Reproduce

Here is a minimal values file to reproduce the issue:

Create the custom values file:

# values-custom.yaml

# The vars according to upstream chart here:
# https://artifacthub.io/packages/helm/bitnami/elasticsearch/19.13.2#master-elegible-nodes-parameters
elasticsearch:
  master:
    podSecurityContext:
      fsGroup: null
    containerSecurityContext:
      runAsUser: null

Add Camunda repo:

helm repo add camunda https://helm.camunda.io

Template the chart using the custom file (you will see some irrelevant warnings could be safely ignored like coalesce.go:289: warning: destination for identity.postgresql.networkPolicy):

helm template demo camunda/camunda-platform \
    --version 8.3.0 \
    --values values-custom.yaml \
    --show-only charts/elasticsearch/templates/master/statefulset.yaml

The most important highlight here:
In the Pod securityContext: fsGroup: 1001 (not nulled, still default):

securityContext:
  fsGroup: 1001

In the Container securityContext: runAsUser: 1001 (not nulled, still default):

containers:
  - name: elasticsearch
    image: docker.io/bitnami/elasticsearch:8.7.1
    imagePullPolicy: "IfNotPresent"
    securityContext:
      runAsNonRoot: true
      runAsUser: 1001

And it's the same for any remote sub-chart (happens in Keycloak, and PostgreSQL).


Output of helm version:

version.BuildInfo{Version:"v3.13.1", GitCommit:"3547a4b5bf5edb5478ce352e18858d8a552a4110", GitTreeState:"clean", GoVersion:"go1.20.8"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.6", GitCommit:"741c8db18a52787d734cbe4795f0b4ad860906d6", GitTreeState:"clean", BuildDate:"2023-09-13T09:21:34Z", GoVersion:"go1.20.8", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.5+7d22122", GitCommit:"2fc599b5fd3f060dd20094b520f0f529fd2f52db", GitTreeState:"clean", BuildDate:"2023-06-07T20:30:17Z", GoVersion:"go1.19.9", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): N/A

Activity

  1. rptaylor commented on Oct 13, 2023

    @rptaylor

    @aabouzaid are you sure it is caused by remote access to a chart? Have a look at #12488
    I updated my reproduction steps there, adding repository: "file:///home/fedora/demo-remote/charts/subchart" to the dependency in the Chart.yaml, and then

    $ ~/helm-v3.13.1/helm dependency update demo-remote/
    Saving 1 charts
    Deleting outdated charts
    $ ~/helm-v3.13.1/helm package demo-remote/
    Successfully packaged chart and saved it to: /home/fedora/demo-0.1.0.tgz
    $ ~/helm-v3.13.1/helm template demo-remote/
    ---
    # Source: demo/charts/subchart/templates/values.yaml
    global:
      hash:
        key3: 13
        key4: 4
        key5: 5
        key6: 6
    hash:
      key3: 13
      key4: 4
      key5: 5
      key6: 6
    $ ~/helm-v3.13.1/helm template demo-remote/   --values demo-remote/values.yaml 
    ---
    # Source: demo/charts/subchart/templates/values.yaml
    global:
      hash:
        key3: 13
        key4: 4
        key5: 5
        key6: 6
    hash:
      key1: 1
      key2: 2
      key3: 13
      key4: 4
      key5: 5
      key6: 6
    

    So it seems to me the issue is caused by using --values, not specifying a remote repository location.
    If you can confirm this would be a duplicate of #12488

  2. aabouzaid commented on Oct 14, 2023

    @aabouzaid
    Author

    @rptaylor no, I'm not sure, it's just an observation.
    I will try to put the vars in the default value file and see how it works.

  3. aabouzaid commented on Oct 14, 2023

    @aabouzaid
    Author

    I confirm Helm doesn't null the values from only if --values was spacified. So I'm closing this issue as it's a duplicate of #12488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions