From 2dbc5fed1e79b88238d90a6f0faa2f0cdf09ad57 Mon Sep 17 00:00:00 2001 From: Andreas Kupries Date: Mon, 24 Oct 2022 15:31:07 +0200 Subject: [PATCH] feat: extended app chart taking config names and their mount paths --- chart/application/Chart.yaml | 2 +- chart/application/templates/deployment.yaml | 12 ++++++------ chart/application/values.yaml | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/chart/application/Chart.yaml b/chart/application/Chart.yaml index 6d642ee5..974cee15 100644 --- a/chart/application/Chart.yaml +++ b/chart/application/Chart.yaml @@ -4,7 +4,7 @@ description: The helm chart for epinio applications to be deployed by icon: https://raw.githubusercontent.com/epinio/helm-charts/main/assets/epinio.png home: https://github.com/epinio/epinio type: application -version: 0.1.22 +version: 0.1.23 keywords: - epinio - paas diff --git a/chart/application/templates/deployment.yaml b/chart/application/templates/deployment.yaml index 1715b4a6..1d5e26f7 100644 --- a/chart/application/templates/deployment.yaml +++ b/chart/application/templates/deployment.yaml @@ -28,13 +28,13 @@ spec: serviceAccount: {{ .Release.Namespace }} serviceAccountName: {{ .Release.Namespace }} automountServiceAccountToken: true - {{- with .Values.epinio.configurations }} + {{- with .Values.epinio.configpaths }} volumes: {{- range . }} - - name: {{ . }} + - name: {{ .name }} secret: defaultMode: 420 - secretName: {{ . }} + secretName: {{ .name }} {{- end }} {{- end }} containers: @@ -42,11 +42,11 @@ spec: ports: - containerPort: 8080 protocol: TCP - {{- with .Values.epinio.configurations }} + {{- with .Values.epinio.configpaths }} volumeMounts: {{- range . }} - - mountPath: /configurations/{{ . }} - name: {{ . }} + - mountPath: /configurations/{{ .path }} + name: {{ .name }} readOnly: true {{- end }} {{- end }} diff --git a/chart/application/values.yaml b/chart/application/values.yaml index 3c3be9c5..4a6daec0 100644 --- a/chart/application/values.yaml +++ b/chart/application/values.yaml @@ -13,11 +13,19 @@ # routes :: sequence (route) :: routes (= domain+path+id) the app has to be reachable at # env :: sequence (assignment) :: app environment variables and values # configurations :: sequence (string) :: names of the configurations to import into the app +# configpaths :: sequence (config) :: names and mount paths of the bound configurations # start :: integer :: time of deployment, nanoseconds # ingress :: string :: ingress class name to use, if any # tlsIssuer :: string :: name of cert issuer ## # assignment :: map ('name' -> string, 'value' -> string) +# route :: map ('id' -> string, 'domain' -> string, 'path' -> string) +# config :: map ('name' -> string, 'path' -> string) +# +# The field 'configpaths' is a replacement and extension of field 'configurations', separating a +# configuration's name from from its mounting path in the application container. This allows for +# using a more human-readable path. The server fills both fields so that old(er) charts can still +# work, even if they are unable to take advantage of the nicer paths of the extension. # The `start` element can be used to force a restart of specific resources with each # re-deployment. This standard chart uses it in a pod template annotation, forcing pod