Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/vaultwarden/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ maintainers:
- name: guerzon
email: lester@guerzon.net
url: https://github.com/guerzon
version: 0.46.1
version: 0.47.0
kubeVersion: ">=1.12.0-0"
16 changes: 13 additions & 3 deletions charts/vaultwarden/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,28 @@ helm upgrade -i \

## General configuration

This chart deploys `vaultwarden` from pre-built images on [Docker Hub](https://hub.docker.com/r/vaultwarden/server/tags): `vaultwarden/server`. The image can be defined by specifying the tag with `image.tag`.
This chart deploys `vaultwarden` from pre-built images on [Docker Hub](https://hub.docker.com/r/vaultwarden/server/tags): `vaultwarden/server`. The image is composed from `image.tag` and `image.flavor`, so `tag: "1.24.0"` with `flavor: "alpine"` resolves to `1.24.0-alpine`.

Example that uses the Alpine-based image `1.24.0-alpine` and an existing secret that contains registry credentials:

```yaml
image:
registry: ghcr.io
repository: guerzon/vaultwarden
tag: "1.24.0-alpine"
tag: "1.24.0"
flavor: "alpine"
pullSecrets:
- name: myRegKey
```

Upstream publishes an Alpine (musl) and a Debian (glibc) image for each release. Set `flavor: ""` to get the Debian image, which is the safer choice on clusters where musl's resolver misbehaves:

```yaml
image:
tag: "1.24.0"
flavor: ""
```

**Important**: specify the URL used by users with the `domain` variable, otherwise, some functionalities might not work:

```yaml
Expand Down Expand Up @@ -380,7 +389,8 @@ helm -n $NAMESPACE uninstall $RELEASE_NAME
| --------------------------- | ----------------------------------------------------------------------------------------- | -------------------- |
| `image.registry` | Vaultwarden image registry | `docker.io` |
| `image.repository` | Vaultwarden image repository | `vaultwarden/server` |
| `image.tag` | Vaultwarden image tag | `1.37.2-alpine` |
| `image.tag` | Vaultwarden image tag, without the flavor suffix | `1.37.2` |
| `image.flavor` | Image flavor, appended to `image.tag`. Set to `""` for the Debian (glibc) image | `alpine` |
| `image.pullPolicy` | Vaultwarden image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secrets | `[]` |
| `image.extraSecrets` | Vaultwarden image extra secrets | `[]` |
Expand Down
1 change: 1 addition & 0 deletions charts/vaultwarden/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ adminToken:
value: "khit9gYQV6ax9LKTTm+s6QbZi5oiuR+3s1PEn9q3IRmCl9IQn7LmBpmFCOYTb7Mr"

image:
flavor: ""
pullSecrets:
- name: myRegKey

Expand Down
11 changes: 11 additions & 0 deletions charts/vaultwarden/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Fully-qualified image reference. image.flavor, when set, is appended to image.tag.
*/}}
{{- define "vaultwarden.image" -}}
{{- $tag := .Values.image.tag -}}
{{- if .Values.image.flavor -}}
{{- $tag = printf "%s-%s" $tag .Values.image.flavor -}}
{{- end -}}
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository $tag -}}
{{- end }}

{{/*
Common labels
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/vaultwarden/templates/_podSpec.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ initContainers:
enableServiceLinks: false
{{- end }}
containers:
- image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}
- image: {{ include "vaultwarden.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: vaultwarden
envFrom:
Expand Down
8 changes: 6 additions & 2 deletions charts/vaultwarden/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ image:
##
repository: vaultwarden/server
##
## @param image.tag Vaultwarden image tag
## @param image.tag Vaultwarden image tag, without the flavor suffix
## Ref: https://hub.docker.com/r/vaultwarden/server/tags
##
tag: "1.37.2-alpine"
tag: "1.37.2"
##
## @param image.flavor Image flavor, appended to `image.tag`. Set to `""` for the Debian (glibc) image
##
flavor: "alpine"
## @param image.pullPolicy Vaultwarden image pull policy
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
Expand Down