jfrog / charts

JFrog official Helm Charts
https://jfrog.com/integration/helm-repository/
Apache License 2.0
255 stars 441 forks source link

Artifactory not upgradable with Flux #1914

Open ktarplee opened 1 month ago

ktarplee commented 1 month ago

I am using Flux to install the artifactory chart. During an upgrade it looks like flux set the version of the chart to 107.90.8+2. The +2 is what is causing the artifactory helm chart issues. See this line. artifactory-107.80.8+2 is not a valid label value due to the +. IMHO the chart label should be an annotation instead since it is not used in a label selector. Alternatively it can be sanitized to be a valid label.

To reproduce this without flux simply set the version in the Chart.yaml to 107.90.8+2 then run helm install to see the error.

My current workaround is to use a post render to fix the chart.

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: artifactory
spec:
...
  postRenderers:
    - kustomize:
        patches:
          - target:
              version: v1
              kind: ConfigMap
              name: artifactory-configmaps
            patch: |
              - op: remove
                path: /metadata/labels/chart

I am using artifactory 107.90.8 and helm version v3.15.4.