From ef5ae28305415eb62e91449f506193a01ec91f64 Mon Sep 17 00:00:00 2001 From: Klaus Erber Date: Tue, 4 Oct 2022 10:04:07 +0200 Subject: [PATCH] feat: add init and sidecar containers --- Chart.yaml | 2 +- README.md | 8 ++++++++ templates/statefulset.yaml | 7 +++++++ values.yaml | 13 ++++++++++++- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 11c7ac5..dd60797 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -12,4 +12,4 @@ maintainers: - name: Lester Guerzon email: lester@pidnull.io url: https://github.com/guerzon -version: 0.3.0 +version: 0.4.0 diff --git a/README.md b/README.md index c341375..68ed063 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,14 @@ Detailed configuration options can be found in the [Storage Configuration](#stor | `storage.dataDir` | Specify the data directory | `/data` | +### Extra containers Configuration + +| Name | Description | Value | +| ---------------- | --------------------------------------------------------------- | ----- | +| `initContainers` | extra init containers for initializing the vaultwarden instance | `[]` | +| `sidecars` | extra containers running alongside the vaultwarden instance | `[]` | + + ## Uninstall To uninstall/delete the `vaultwarden-demo` release: diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index 8dd41d0..7528205 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -18,6 +18,10 @@ spec: app: vaultwarden app.kubernetes.io/component: vaultwarden spec: + initContainers: + {{- if .Values.initContainers }} + {{- toYaml .Values.initContainers | nindent 8 }} + {{- end }} containers: - image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} @@ -60,6 +64,9 @@ spec: requests: cpu: 50m memory: 256Mi + {{- if .Values.sidecars }} + {{- toYaml .Values.sidecars | nindent 8 }} + {{- end }} {{- if .Values.serviceAccount.create }} serviceAccountName: {{ .Values.serviceAccount.name }} {{- end }} diff --git a/values.yaml b/values.yaml index a7181b6..d5c841b 100644 --- a/values.yaml +++ b/values.yaml @@ -89,7 +89,7 @@ ingress: ## nginxIngressAnnotations: true ## @param ingress.additionalAnnotations Additional annotations for the ingress resource. - ## + ## additionalAnnotations: {} ## @param ingress.tls Enable TLS on the ingress resource. ## @@ -217,3 +217,14 @@ storage: ## @param storage.dataDir Specify the data directory ## dataDir: "/data" + +## @section Extra containers Configuration +## + +## @param initContainers extra init containers for initializing the vaultwarden instance +## +initContainers: [] + +## @param sidecars extra containers running alongside the vaultwarden instance +## +sidecars: [] \ No newline at end of file