charts icon indicating copy to clipboard operation
charts copied to clipboard

Artifactory not upgradable with Flux

Open ktarplee opened this issue 1 year ago • 2 comments

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.

ktarplee avatar Aug 16 '24 13:08 ktarplee

is this still an issue ? are you able to get past it ?

chukka avatar Apr 08 '25 05:04 chukka

I believe this is still an issue. You just need to sanitize your labels in your chart here. Or simply move that line to be an annotation if you don't ever use it in a label selector.

ktarplee avatar Apr 08 '25 19:04 ktarplee