deployments/charts/order-api-server/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "order-api.fullname" . }}
labels:
app: {{ template "order-api.fullname" . }}
chart: {{ template "order-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "order-api.fullname" . }}
template:
metadata:
labels:
app: {{ template "order-api.fullname" . }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [
"--log-level",
"{{ .Values.logLevel }}",
"start-server",
"--user",
$(ARANGODB_USER),
"--pass",
$(ARANGODB_PASS),
"--db",
$(ARANGODB_DATABASE),
"--port",
"{{ .Values.service.port }}",
{{- if eq .Values.endpoint "https" }}
"--is-secure"
{{- end }}
]
env:
- name: ARANGODB_DATABASE
valueFrom:
configMapKeyRef:
name: "{{ .Values.dictybaseConfiguration.configMap.name }}"
key: "{{ .Values.dictybaseConfiguration.configMap.database }}"
- name: ARANGODB_USER
valueFrom:
configMapKeyRef:
name: "{{ .Values.dictybaseConfiguration.configMap.name }}"
key: "{{ .Values.dictybaseConfiguration.configMap.user }}"
- name: ARANGODB_PASS
valueFrom:
secretKeyRef:
name: "{{ .Values.dictybaseConfiguration.secrets.name }}"
key: "{{ .Values.dictybaseConfiguration.secrets.password }}"
ports:
- name: {{ .Values.service.name }}
containerPort: {{ .Values.service.port }}
protocol: TCP
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}