Skip to content

Commit

Permalink
feat: extended app chart taking config names and their mount paths
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-kupries committed Oct 24, 2022
1 parent 75722b5 commit 2dbc5fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chart/application/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions chart/application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ 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:
- name: {{ include "epinio-truncate" .Values.epinio.appName }}
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 }}
Expand Down
8 changes: 8 additions & 0 deletions chart/application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2dbc5fe

Please sign in to comment.