Files
manifests/attic/charts/petimeter/templates/deployment.yaml
T

100 lines
3.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "Petimeter.fullname" . }}
labels:
{{- include "Petimeter.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "Petimeter.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "Petimeter.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "Petimeter.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
env:
- name: LOG_LEVEL
value: "3"
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /data
- name: appsettings
mountPath: /app/appsettings.json
subPath: appsettings.json
readOnly: true
{{- if .Values.service.https }}
- name: tls-certificates
mountPath: /app/tls
readOnly: true
{{- end }}
{{- if .Values.init.enabled }}
initContainers:
- name: init
image: {{ .Values.init.image }}
command: {{- toYaml .Values.init.command | nindent 10 }}
volumeMounts:
- name: data
mountPath: /data
- name: appsettings
mountPath: /app/appsettings.json
subPath: appsettings.json
readOnly: true
{{- end }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "Petimeter.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end }}
- name: appsettings
configMap:
name: {{ template "Petimeter.fullname" . }}-appsettings
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}