helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Default ports are not getting removed when passed as null from Parent chart

Open Venkatesh1505 opened this issue 1 year ago • 0 comments

From ArgoCD Parent application, when HAProxy helm charts are added as a dependency and containerPorts for http, https and stat are passed as null(since it's not needed and intended to be removed), the null value passed are not being considered.

Chart.yaml:

apiVersion: v2
name: test-haproxy
description: This helm chart is used to extend the haproxytech haproxy helm chart.

type: application
version: 1.21.0
appVersion: 2.9.5

dependencies:
  - repository: https://haproxytech.github.io/helm-charts
    name: haproxy
    version: 1.21.0

containerPorts passed as null as helm values from Parent application:

helm:
  values: |
    haproxy:
      containerPorts:
        http: null
        https: null
        stat: null
        mariadb: 3306
        metrics: 8404

The extra ports given 3306 and 8404 are being added, but http, https and stat passed as null are not being considered and removed from the deployments and services.

Seems like this issue is reported in helm long before, but it still exists - here, here

Are there any workarounds to make this work? Requirement is to remove the default ports for stat, http and https in values.yaml

Helm Version details: version.BuildInfo{Version:"v3.13.2", GitCommit:"2a2fb3b98829f1e0be6fb18af2f6599e0f4e8243", GitTreeState:"clean", GoVersion:"go1.21.4"}

Venkatesh1505 avatar Apr 18 '24 17:04 Venkatesh1505