From 0415c0a0797b5794770be86a8c441cd3d389d70c Mon Sep 17 00:00:00 2001 From: Jan-Niklas Weghorn Date: Fri, 9 Feb 2024 23:05:06 +0100 Subject: [PATCH] [vikunja] removeOpenIdInitContainer and replace with general initContainers --- README.md | 4 +++- charts/vikunja/Chart.yaml | 4 ++-- charts/vikunja/README.md | 11 +++++---- .../vikunja/templates/backend/deployment.yaml | 23 ++++++------------- .../templates/frontend/deployment.yaml | 12 ++++++++++ charts/vikunja/values.yaml | 10 ++++---- 6 files changed, 37 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 2546f99..1bf763a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # charts -Here you can find a collection of oecis charts :) +Here you can find a collection of oecis helm charts :) + +You can see most of them in action at https://gitlab.com/oecis/fountain # Publish charts diff --git a/charts/vikunja/Chart.yaml b/charts/vikunja/Chart.yaml index 63399c6..469dde3 100644 --- a/charts/vikunja/Chart.yaml +++ b/charts/vikunja/Chart.yaml @@ -6,8 +6,8 @@ sources: - https://kolaente.dev/vikunja/ - https://gitlab.com/oecis/charts/-/tree/main/charts/vikunja type: application -version: 0.1.3 -appVersion: "0.22.0" +version: 0.1.4 +appVersion: "0.22.1" dependencies: - condition: postgresql.enabled name: postgresql diff --git a/charts/vikunja/README.md b/charts/vikunja/README.md index 46dd989..931a461 100644 --- a/charts/vikunja/README.md +++ b/charts/vikunja/README.md @@ -1,6 +1,6 @@ # vikunja -![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.22.0](https://img.shields.io/badge/AppVersion-0.22.0-informational?style=flat-square) +![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.22.1](https://img.shields.io/badge/AppVersion-0.22.1-informational?style=flat-square) The to-do app to organize your life @@ -28,9 +28,12 @@ The to-do app to organize your life | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | backend.extraEnv | list | `[]` | | +| backend.extraVolumeMounts | list | `[]` | | +| backend.extraVolumes | list | `[]` | | | backend.image.pullPolicy | string | `"IfNotPresent"` | | | backend.image.repository | string | `"vikunja/api"` | | | backend.image.tag | string | `"latest"` | | +| backend.initContainers | list | `[]` | | | backend.service.port | int | `3456` | | | backend.service.type | string | `"ClusterIP"` | | | config.cache.enabled | bool | `false` | | @@ -53,9 +56,12 @@ The to-do app to organize your life | config.registration | bool | `true` | | | config.taskAttachments | bool | `true` | | | frontend.extraEnv | list | `[]` | | +| frontend.extraVolumeMounts | list | `[]` | | +| frontend.extraVolumes | list | `[]` | | | frontend.image.pullPolicy | string | `"IfNotPresent"` | | | frontend.image.repository | string | `"vikunja/frontend"` | | | frontend.image.tag | string | `"latest"` | | +| frontend.initContainers | list | `[]` | | | frontend.service.port | int | `80` | | | frontend.service.type | string | `"ClusterIP"` | | | fullnameOverride | string | `""` | | @@ -67,9 +73,6 @@ The to-do app to organize your life | ingress.tls | list | `[]` | | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | -| openIdInitContainer.config | object | `{}` | | -| openIdInitContainer.enabled | bool | `false` | | -| openIdInitContainer.env | list | `[]` | | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | | | postgresql.enabled | bool | `true` | | diff --git a/charts/vikunja/templates/backend/deployment.yaml b/charts/vikunja/templates/backend/deployment.yaml index 2f903b1..f562f6f 100644 --- a/charts/vikunja/templates/backend/deployment.yaml +++ b/charts/vikunja/templates/backend/deployment.yaml @@ -27,21 +27,13 @@ spec: serviceAccountName: {{ include "vikunja.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.openIdInitContainer.enabled }} + {{- if not (empty .Values.backend.extraVolumes ) }} volumes: - - name: openid-config - emptyDir: - medium: Memory + {{- toYaml .Values.backend.extraVolumes | nindent 8 }} + {{- end }} + {{- if not (empty .Values.backend.initContainers)}} initContainers: - - name: {{ .Chart.Name }}-openid-config-injector - image: busybox - volumeMounts: - - mountPath: /config - name: openid-config - command: ["/bin/sh"] - args: ["-c", {{ quote (printf "echo -e %q > /config/config.yaml" ( .Values.openIdInitContainer.config | toYaml ))}}] - env: - {{- toYaml .Values.openIdInitContainer.env | nindent 12}} + {{- toYaml .Values.backend.initContainers | nindent 10}} {{- end }} containers: - name: {{ .Chart.Name }}-backend @@ -100,10 +92,9 @@ spec: {{- if not (empty .Values.backend.extraEnv) }} {{- toYaml .Values.backend.extraEnv | nindent 12 }} {{- end }} - {{- if .Values.openIdInitContainer.enabled }} + {{- if not (empty .Values.backend.extraVolumeMounts) }} volumeMounts: - - mountPath: /etc/vikunja - name: openid-config + {{- toYaml .Values.backend.extraVolumeMounts | nindent 12 }} {{- end}} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/vikunja/templates/frontend/deployment.yaml b/charts/vikunja/templates/frontend/deployment.yaml index 4820d1f..c43dd4b 100644 --- a/charts/vikunja/templates/frontend/deployment.yaml +++ b/charts/vikunja/templates/frontend/deployment.yaml @@ -27,6 +27,14 @@ spec: serviceAccountName: {{ include "vikunja.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if not (empty .Values.frontend.extraVolumes ) }} + volumes: + {{- toYaml .Values.frontend.extraVolumes | nindent 8 }} + {{- end }} + {{- if not (empty .Values.frontend.initContainers)}} + initContainers: + {{- toYaml .Values.frontend.initContainers | nindent 10}} + {{- end }} containers: - name: {{ .Chart.Name }}-frontend securityContext: @@ -51,6 +59,10 @@ spec: env: {{- toYaml .Values.backend.extraEnv | nindent 12 }} {{- end }} + {{- if not (empty .Values.frontend.extraVolumeMounts) }} + volumeMounts: + {{- toYaml .Values.frontend.extraVolumeMounts | nindent 12 }} + {{- end}} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/vikunja/values.yaml b/charts/vikunja/values.yaml index 4c5ce61..034b7d3 100644 --- a/charts/vikunja/values.yaml +++ b/charts/vikunja/values.yaml @@ -14,6 +14,9 @@ frontend: type: ClusterIP port: 80 extraEnv: [] + extraVolumes: [] + extraVolumeMounts: [] + initContainers: [] backend: image: repository: vikunja/api @@ -24,10 +27,9 @@ backend: type: ClusterIP port: 3456 extraEnv: [] -openIdInitContainer: - enabled: false - config: {} - env: [] + extraVolumes: [] + extraVolumeMounts: [] + initContainers: [] ingress: enabled: false