This commit is contained in:
Santiago Lo Coco 2023-11-15 23:00:49 -03:00
parent dbbbfa87bf
commit 39a8d7d004
1 changed files with 15 additions and 15 deletions

View File

@ -1,37 +1,37 @@
{{- range $deploy := .Values.deployments }} {{- range .Values.deployments }}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "exam.fullname" $ }}-{{ $deploy.name }} name: {{ include "exam.fullname" $ }}-{{ .name }}
labels: labels:
app: {{ $deploy.name }} app: {{ .name }}
{{- include "exam.labels" $ | nindent 4 }} {{- include "exam.labels" $ | nindent 4 }}
spec: spec:
replicas: {{ .replicas }} replicas: {{ .replicas }}
selector: selector:
matchLabels: matchLabels:
app: {{ $deploy.name }} app: {{ .name }}
tier: {{ $deploy.tier }} tier: {{ .tier }}
{{- include "exam.selectorLabels" $ | nindent 6 }} {{- include "exam.selectorLabels" $ | nindent 6 }}
template: template:
metadata: metadata:
labels: labels:
app: {{ $deploy.name }} app: {{ .name }}
tier: {{ $deploy.tier }} tier: {{ .tier }}
{{- include "exam.selectorLabels" $ | nindent 8 }} {{- include "exam.selectorLabels" $ | nindent 8 }}
spec: spec:
containers: containers:
- name: {{ $deploy.name }} - name: {{ .name }}
{{- with $deploy.image }} {{- with .image }}
image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }} image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }}
{{- end }} {{- end }}
ports: ports:
- name: {{ $deploy.name }} - name: {{ .name }}
containerPort: {{ $deploy.port }} containerPort: {{ .port }}
{{- if $deploy.env }} {{- if .env }}
env: env:
{{- with $deploy.env }} {{- with .env }}
{{- range $key, $val := .nonsecrets }} {{- range $key, $val := .nonsecrets }}
{{- $envKey := $key | upper | replace "-" "_" }} {{- $envKey := $key | upper | replace "-" "_" }}
- name: {{ $envKey }} - name: {{ $envKey }}
@ -49,12 +49,12 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
resources: {} resources: {}
{{- if $deploy.mountPath }} {{- if .mountPath }}
volumeMounts: volumeMounts:
- mountPath: {{ .mountPath }} - mountPath: {{ .mountPath }}
name: {{ .storage }} name: {{ .storage }}
{{- end }} {{- end }}
{{- if $deploy.mountPath }} {{- if .mountPath }}
volumes: volumes:
- name: {{ .storage }} - name: {{ .storage }}
persistentVolumeClaim: persistentVolumeClaim: