71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "datatracker.memcached.fullname" . }}
|
|
labels:
|
|
{{- include "datatracker.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- $podValues := .Values.memcached }}
|
|
replicas: {{ $podValues.replicaCount }}
|
|
revisionHistoryLimit: {{ $podValues.revisionHistoryLimit }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "datatracker.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "datatracker.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with $podValues.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "datatracker.serviceAccountName.memcached" . }}
|
|
securityContext:
|
|
{{- toYaml $podValues.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml $podValues.securityContext | nindent 12 }}
|
|
image: "{{ $podValues.image.repository }}:{{ default "latest" $podValues.image.tag }}"
|
|
imagePullPolicy: {{ default "IfNotPresent" $podValues.image.imagePullPolicy }}
|
|
env:
|
|
{{- if .Values.env }}
|
|
{{- range $key, $val := .Values.env }}
|
|
- name: {{ $key | quote }}
|
|
value: {{ $val | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with $podValues.volumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: memcached
|
|
containerPort: 11211
|
|
protocol: TCP
|
|
livenessProbe:
|
|
{{- toYaml $podValues.livenessProbe | nindent 12 }}
|
|
readinessProbe:
|
|
{{- toYaml $podValues.readinessProbe | nindent 12 }}
|
|
startupProbe:
|
|
{{- toYaml $podValues.startupProbe | nindent 12 }}
|
|
resources:
|
|
{{- toYaml $podValues.resources | nindent 12 }}
|
|
{{- with $podValues.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $podValues.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $podValues.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with $podValues.volumes }}
|
|
volumes:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|