Skip to content

If using ConfigMaps with envFrom there should be an option to add checksum annotation to deployments #168

@robertaistleitner

Description

@robertaistleitner

According to https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments one should calculate a checksum for config map contents to be able to automatically roll deployments.

One could easily detect if such envFrom with ConfigMaps are used in a deployment and then add the required annotation to the rendered template:

kind: Deployment
spec:
  template:
    metadata:
      annotations:
        checksum/config/configmap-one: {{ include (print $.Template.BasePath "/configmap-one.yaml") . | sha256sum }}

At the moment I hacked this into kompose but actually the better place is to implement it here since it's specific to helm.

What do you think? I'm not fluent in go but probably could start a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions