Skip to content

flux altering chart version on helmrelease reconciliation #2868

Description

@daveoy

Describe the bug

it appears flux is altering the chart version when reconciling a helmrelease that exists already in the cluster (installed with helm cli).

this is causing problems when we're using the chart version in a metadata field, since the modification to the chart version includes the illegal character "+" for that field.

Steps to reproduce

  1. helm install helm chart
  2. allow flux to apply helmrelease

Expected behavior

flux runs a helm upgrade against the same helm chart with the modified values hierarchy supplied in the helmrelease

Screenshots and recordings

% helm history -n mychart mychart
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Thu Jun 23 21:27:52 2022 deployed mychart-1.4.4 Install complete
2 Fri Jun 24 02:28:58 2022 failed mychart-1.4.4+1 Upgrade "mychart" failed: cannot patch "mychart-mychart" with kind ConfigMap: ConfigMap "mychart-mychart" is invalid: metadata.labels: Invalid value: "mychart-1.4.4+1": a valid label must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?')

OS / Distro

linux centos 7.9

Flux version

flux: v0.31.1

Flux check

► checking prerequisites
✗ flux 0.31.1 <0.31.2 (new version is available, please upgrade)
✗ Kubernetes version v1.19.8 does not match >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► car:5000/helm-controller:v0.18.2
✔ image-automation-controller: deployment ready
► car:5000/image-automation-controller:v0.21.2
✔ image-reflector-controller: deployment ready
► car:5000/image-reflector-controller:v0.17.1
✔ kustomize-controller: deployment ready
► car:5000/kustomize-controller:v0.22.2
✔ notification-controller: deployment ready
► car:5000/notification-controller:v0.23.1
✔ source-controller: deployment ready
► car:5000/source-controller:v0.22.4

Git provider

No response

Container Registry provider

No response

Additional context

air gapped environment, thus the recent flux version against an old kubernetes version.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions