mastodon / chart

Helm chart for Mastodon deployment in Kubernetes
GNU Affero General Public License v3.0
160 stars 93 forks source link

Use .Values.image.tag for app.kubernetes.io/version #145

Closed hinricht closed 4 months ago

hinricht commented 4 months ago

When specifiying a different image.tag version, the resulting image definitions will use this tag, but the helm labels app.kubernetes.io/version values would still use the AppVersion from Chart.yaml.

Before:

$ helm template -f dev-values.yaml --set image.tag=1.2.3 . |grep -E '(4.2.8|1.2.3)'
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "v4.2.8"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "v4.2.8"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "v4.2.8"
              image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
    app.kubernetes.io/version: "v4.2.8"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "v4.2.8"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "v4.2.8"
          image: "ghcr.io/mastodon/mastodon:1.2.3"

With this PR:

 $ helm template -f dev-values.yaml --set image.tag=1.2.3 . |grep -E '(4.2.8|1.2.3)'
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
        checksum/config-secrets: "02dbb4d23850e2f2d1502951426916d5117c01338e80b5e5cea0bd474973859d"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "1.2.3"
        checksum/config-secrets: "02dbb4d23850e2f2d1502951426916d5117c01338e80b5e5cea0bd474973859d"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "1.2.3"
        checksum/config-secrets: "02dbb4d23850e2f2d1502951426916d5117c01338e80b5e5cea0bd474973859d"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "1.2.3"
              image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
    app.kubernetes.io/version: "1.2.3"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "1.2.3"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
    app.kubernetes.io/version: "1.2.3"
          image: "ghcr.io/mastodon/mastodon:1.2.3"
hinricht commented 4 months ago

Closed in favor of #146