Skip to content

fix: support image.digest and keep app.kubernetes.io/version a valid label - #43

Open
eightseventhreethree wants to merge 1 commit into
Permify:mainfrom
eightseventhreethree:rs/fix-chart-label-w-digest
Open

eightseventhreethree wants to merge 1 commit into
Permify:mainfrom
eightseventhreethree:rs/fix-chart-label-w-digest

Conversation

@eightseventhreethree

Copy link
Copy Markdown

Digest-pinned images currently break the chart: the version label is built from image.tag, so a tag carrying @sha256:... renders an 88-character label containing @ and : and the API server rejects every object that includes permify.labels. The same expression also double-prefixes v (vv1.6.10) and has a dead .Chart.AppVersion fallback that renders a bare "v" on default values.

Adds an image.digest value so digests replace the tag in the rendered image reference (permify.image), and derives the version label through a new permify.versionLabel helper that strips any inline digest, truncates to 63 characters, and validates against the Kubernetes label grammar before emitting it - falling back to .Chart.AppVersion, or omitting the label entirely, otherwise. No v prefix is prepended to user-provided tags.

Verified with helm template across defaults, tag-only, tag+digest, digest-only, and legacy tag@digest values; every rendered app.kubernetes.io/version matches ^A-Za-z0-9?$ and stays under 63 characters, and helm lint passes.

…label

Digest-pinned images currently break the chart: the version label is built
from image.tag, so a tag carrying @sha256:... renders an 88-character label
containing @ and : and the API server rejects every object that includes
permify.labels. The same expression also double-prefixes v (vv1.6.10) and
has a dead .Chart.AppVersion fallback that renders a bare "v" on default
values.

Adds an image.digest value so digests replace the tag in the rendered image
reference (permify.image), and derives the version label through a new
permify.versionLabel helper that strips any inline digest, truncates to 63
characters, and validates against the Kubernetes label grammar before
emitting it - falling back to .Chart.AppVersion, or omitting the label
entirely, otherwise. No v prefix is prepended to user-provided tags.

Verified with `helm template` across defaults, tag-only, tag+digest,
digest-only, and legacy tag@digest values; every rendered
app.kubernetes.io/version matches ^[A-Za-z0-9]([-_.A-Za-z0-9]*[A-Za-z0-9])?$
and stays under 63 characters, and `helm lint` passes.
@eightseventhreethree
eightseventhreethree marked this pull request as ready for review July 30, 2026 21:32

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant