80 lines
2.5 KiB
YAML
Raw Normal View History

2024-02-07 23:03:10 -05:00
apiVersion: apps/v1
kind: Deployment
metadata:
2024-02-08 22:45:35 -05:00
name: {{ include "core-api.fullname" . }}
2024-02-07 23:03:10 -05:00
labels:
2024-02-08 22:45:35 -05:00
{{- include "core-api.labels" . | nindent 4 }}
2024-02-07 23:03:10 -05:00
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
2024-02-08 22:45:35 -05:00
{{- include "core-api.selectorLabels" . | nindent 6 }}
2024-02-07 23:03:10 -05:00
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
2024-02-08 22:45:35 -05:00
{{- include "core-api.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
2024-02-07 23:03:10 -05:00
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
2024-02-08 22:45:35 -05:00
serviceAccountName: {{ include "core-api.serviceAccountName" . }}
2024-02-07 23:03:10 -05:00
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 }}
2024-02-10 01:34:47 -05:00
env:
- name: Database__Host
2024-02-10 01:40:52 -05:00
value: '{{ .Values.postgresHost }}'
2024-02-10 01:34:47 -05:00
- name: Database__Port
2024-02-10 01:40:52 -05:00
value: '{{ .Values.postgresPort }}'
2024-02-10 01:34:47 -05:00
- name: Database__Database
value: '{{ .Values.postgresDatabase }}'
- name: Database__username
value: '{{ .Values.postgresUser }}'
- name: Database__password
value: '{{ .Values.postgresPassword }}'
2024-02-07 23:03:10 -05:00
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
2024-02-08 22:45:35 -05:00
{{- toYaml .Values.livenessProbe | nindent 12 }}
2024-02-07 23:03:10 -05:00
readinessProbe:
2024-02-08 22:45:35 -05:00
{{- toYaml .Values.readinessProbe | nindent 12 }}
2024-02-07 23:03:10 -05:00
resources:
{{- toYaml .Values.resources | nindent 12 }}
2024-02-08 22:45:35 -05:00
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
2024-02-07 23:03:10 -05:00
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}