Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the sha256 added to the appVersion in the Chart.yaml via GitHub action breaks the deployment #19

Closed
peterbueschel opened this issue May 8, 2024 · 1 comment

Comments

@peterbueschel
Copy link
Contributor

Input

I've noticed the that starting with v1.2.0 the Helm Chart deployment will fail with:

Deployment.apps "k8s-aws-operator" is invalid: [metadata.labels: Invalid value: "v1.2.0@sha256:6239fd33496c67d4ed2c234ae52328931da62e264c7a39f4e2e1a797be107917": must be no more than 63 characters, metadata.labels: Invalid value: "v1.2.0@sha256:6239fd33496c67d4ed2c234ae52328931da62e264c7a39f4e2e1a797be107917": 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])?')

The sha256 added by the github action:

    - name: Helm package
      shell: bash
      run: helm package charts/${{ github.event.repository.name }} --app-version ${{ github.event.release.tag_name }}@${{needs.build-and-push-image.outputs.imageDigest}}

is causing this issue as the appVersion is used for the recommened labels added in #18

Expected

The appVersion shouldn't contain the sha256 value.
If we really need that, we should instead add this to the values.yaml file under image.tag or as usual to the templates/deployment.yaml file under the containers.[...].image.

Current Workaround

Explicitly set the image tag in the values.yaml file, like:

      image:
        registry: ....
        tag: v1.2.0

The templates/_helpers.tpl will take that value instead of the appVersion

@alfredkrohmer
Copy link
Collaborator

Fixed in #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants