Skip to content

feat: add image.flavor to select the Alpine or Debian image - #246

Open
layertwo wants to merge 1 commit into
guerzon:mainfrom
layertwo:feat/image-flavor
Open

feat: add image.flavor to select the Alpine or Debian image#246
layertwo wants to merge 1 commit into
guerzon:mainfrom
layertwo:feat/image-flavor

Conversation

@layertwo

Copy link
Copy Markdown

What

Splits the image flavor suffix out of image.tag into a new image.flavor value, appended to the tag when set.

image:
  tag: "1.37.2"
  flavor: "alpine"   # "" for the Debian (glibc) image

Why

Upstream dani-garcia/vaultwarden publishes an Alpine (musl) and a Debian (glibc) image for every release, but the chart baked -alpine into the image.tag default. Selecting the Debian image therefore meant overriding the full tag and re-pinning the version by hand on every upgrade — the flavor choice and the version pin were coupled when they're independent concerns.

The Debian image matters in practice: on clusters with a long DNS search list, musl's getaddrinfo() doesn't reliably fall through to the absolute name for hostnames under ndots, so outbound lookups (SSO/OIDC discovery, SMTP) fail from the Alpine image while the Debian one works. Today the only way to opt out is to hardcode a tag and remember to bump it.

Effect on defaults

None. tag: "1.37.2" + flavor: "alpine" renders docker.io/vaultwarden/server:1.37.2-alpine, byte-identical to 0.46.1.

Verified with helm template:

values rendered
defaults docker.io/vaultwarden/server:1.37.2-alpine
flavor: "" docker.io/vaultwarden/server:1.37.2
tag: 1.36.0 docker.io/vaultwarden/server:1.36.0-alpine
resourceType: StatefulSet docker.io/vaultwarden/server:1.37.2-alpine

Breaking change

image.tag no longer carries the flavor suffix. Anyone pinning a full tag like 1.37.1-alpine must drop the suffix and set image.flavor, or the suffix is applied twice. Chart version bumped 0.46.10.47.0 and the upgrade is noted in the README.

Happy to invert this to a non-breaking form (default flavor: "", leave tag: "1.37.2-alpine") if you'd rather not break existing pins — it costs the feature its usefulness from the shipped defaults, but it's a one-line change.

Notes

  • image.registry / image.repository defaults are untouched.
  • ci/test-values.yaml now sets flavor: "" so the non-default path is install-tested at no extra CI cost.
  • README regenerated by hand (no Docker available locally) — please re-run ./generate-readme.sh if the formatting drifts.
  • helm lint passes.

Upstream vaultwarden publishes an Alpine (musl) and a Debian (glibc)
image for every release, but the flavor was baked into the image.tag
default, so selecting the Debian image meant overriding the full tag and
re-pinning the version by hand on every upgrade.

Split the suffix out into image.flavor, which is appended to image.tag
when set. Defaults are unchanged in effect: tag "1.37.2" plus flavor
"alpine" renders docker.io/vaultwarden/server:1.37.2-alpine, exactly as
before. Setting flavor to "" selects the Debian image, which is the
safer choice on clusters where musl's resolver misbehaves with a large
ndots search list.

BREAKING: image.tag no longer carries the flavor suffix. Users who pin a
full tag such as "1.37.1-alpine" must drop the suffix and set
image.flavor instead, otherwise the suffix is applied twice.

Signed-off-by: Lucas Messenger <1335960+layertwo@users.noreply.github.com>
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