Skip to content

Commit 82d91ac

Browse files
authored
FV-110 Umzug Document-Storage-EAI
1 parent 105d2ba commit 82d91ac

File tree

16 files changed

+446
-33
lines changed

16 files changed

+446
-33
lines changed

charts/dave/Chart.lock

Lines changed: 0 additions & 27 deletions
This file was deleted.

charts/dave/Chart.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: dave
33
description: DAVe traffic counting plattform
44
type: application
5-
version: 0.1.2
5+
version: 0.1.3
66
maintainers:
77
- name: klml
88
email: klml@muenchen.de
@@ -33,3 +33,5 @@ dependencies:
3333
version: "*"
3434
- name: eai
3535
version: "*"
36+
- name: document-storage
37+
version: "*"

charts/dave/charts/admin-portal/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: admin-portal
33
description: DAVe traffic counting plattform, admin-portal
44
type: application
5-
version: 0.1.2
5+
version: 0.1.3
66
appVersion: "3.0.0"
77
maintainers:
88
- name: klml

charts/dave/charts/backend/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: backend
33
description: DAVe traffic counting plattform, backend
44
type: application
5-
version: 0.1.2
5+
version: 0.1.3
66
appVersion: "3.0.0"
77
maintainers:
88
- name: klml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: document-storage
3+
description: DAVe traffic counting platform, document-storage
4+
type: application
5+
version: 0.1.3
6+
appVersion: "3.0.0"
7+
maintainers:
8+
- name: klml
9+
email: klml@muenchen.de
10+
home: https://github.com/it-at-m/helm-charts/tree/main/charts/dave/charts/document-storage
11+
sources:
12+
- "https://github.com/it-at-m/helm-charts"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "daveDocumentStorage.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "daveDocumentStorage.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "daveDocumentStorage.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "daveDocumentStorage.labels" -}}
37+
helm.sh/chart: {{ include "daveDocumentStorage.chart" . }}
38+
{{ include "daveDocumentStorage.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "daveDocumentStorage.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "daveDocumentStorage.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "daveDocumentStorage.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "daveDocumentStorage.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "daveDocumentStorage.fullname" . }}
5+
labels:
6+
{{- include "daveDocumentStorage.labels" . | nindent 4 }}
7+
data:
8+
{{- with .Values.extraEnvVars.env }}
9+
{{- toYaml . | nindent 12 }}
10+
{{- end}}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "daveDocumentStorage.fullname" . }}
5+
labels:
6+
{{- include "daveDocumentStorage.labels" . | nindent 4 }}
7+
{{- with .Values.deploymentAnnotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
11+
spec:
12+
{{- if not .Values.autoscaling.enabled }}
13+
replicas: {{ .Values.replicaCount }}
14+
{{- end }}
15+
selector:
16+
matchLabels:
17+
{{- include "daveDocumentStorage.selectorLabels" . | nindent 6 }}
18+
template:
19+
metadata:
20+
annotations:
21+
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
22+
{{- with .Values.podAnnotations }}
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
25+
labels:
26+
{{- include "daveDocumentStorage.selectorLabels" . | nindent 8 }}
27+
spec:
28+
{{- with .Values.imagePullSecrets }}
29+
imagePullSecrets:
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
32+
serviceAccountName: {{ include "dave.serviceAccountName" . }}
33+
securityContext:
34+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
35+
volumes:
36+
- name: config
37+
configMap:
38+
{{- if .Values.existingConfigMap }}
39+
name: {{ .Values.existingConfigMap }}
40+
{{- else }}
41+
name: {{ include "daveDocumentStorage.fullname" . }}
42+
{{- end }}
43+
defaultMode: 420
44+
{{- with .Values.extraVolumes }}
45+
{{- toYaml . | nindent 8 }}
46+
{{- end }}
47+
initContainers:
48+
{{- with .Values.initContainers }}
49+
{{- toYaml . | nindent 8}}
50+
{{- end }}
51+
containers:
52+
- name: {{ .Chart.Name }}
53+
securityContext:
54+
{{- toYaml .Values.securityContext | nindent 12 }}
55+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
56+
imagePullPolicy: {{ .Values.image.pullPolicy }}
57+
env:
58+
# - name: LC_ALL
59+
# value: C.utf8
60+
{{- with .Values.global.extraEnvVars }}
61+
{{- toYaml . | nindent 12 }}
62+
{{- end}}
63+
{{- with .Values.extraEnvVarsSources }}
64+
{{- toYaml . | nindent 12 }}
65+
{{- end}}
66+
envFrom:
67+
- configMapRef:
68+
name: {{ include "daveDocumentStorage.fullname" . }}
69+
- secretRef:
70+
name: {{ include "daveDocumentStorage.fullname" . }}-secret
71+
ports:
72+
{{- range .Values.service.ports }}
73+
- name: {{ .name }}
74+
containerPort: {{ .port }}
75+
protocol: {{ .protocol }}
76+
{{- end }}
77+
volumeMounts:
78+
- name: config
79+
mountPath: /deployments/config
80+
{{- with .Values.extraVolumeMounts }}
81+
{{- toYaml . | nindent 12 }}
82+
{{- end }}
83+
# livenessProbe:
84+
# httpGet:
85+
# path: /actuator/health/liveness
86+
# port: http
87+
# initialDelaySeconds: 60
88+
# timeoutSeconds: 15
89+
# periodSeconds: 10
90+
# successThreshold: 1
91+
# failureThreshold: 5
92+
# readinessProbe:
93+
# httpGet:
94+
# path: /actuator/health/readiness
95+
# port: http
96+
# initialDelaySeconds: 10
97+
# timeoutSeconds: 5
98+
# periodSeconds: 5
99+
# successThreshold: 1
100+
# failureThreshold: 20
101+
resources:
102+
{{- toYaml .Values.resources | nindent 12 }}
103+
{{- with .Values.nodeSelector }}
104+
nodeSelector:
105+
{{- toYaml . | nindent 8 }}
106+
{{- end }}
107+
{{- with .Values.affinity }}
108+
affinity:
109+
{{- toYaml . | nindent 8 }}
110+
{{- end }}
111+
{{- with .Values.tolerations }}
112+
tolerations:
113+
{{- toYaml . | nindent 8 }}
114+
{{- end }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: {{ include "daveDocumentStorage.fullname" . }}-secret
5+
labels:
6+
{{- include "daveDocumentStorage.labels" . | nindent 4 }}
7+
stringData:
8+
{{- with .Values.credentials }}
9+
{{- toYaml . | nindent 12 }}
10+
{{- end}}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "daveDocumentStorage.fullname" . }}
5+
labels:
6+
{{- include "daveDocumentStorage.labels" . | nindent 4 }}
7+
spec:
8+
type: {{ .Values.service.type }}
9+
ports:
10+
- port: {{ .Values.service.port }}
11+
targetPort: http
12+
protocol: TCP
13+
name: http
14+
ports:
15+
{{- range .Values.service.ports }}
16+
- port: {{ .port }}
17+
targetPort: {{ .targetPort }}
18+
protocol: {{ .protocol }}
19+
name: {{ .name }}
20+
{{- end }}
21+
22+
selector:
23+
{{- include "daveDocumentStorage.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)