133 lines
4.2 KiB
YAML
133 lines
4.2 KiB
YAML
{{- if eq .Values.deploymentType "Deployment" -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
{{- with .Values.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.labels }}
|
|
labels:
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
name: {{ .Values.fullNameOverride }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
serviceName: {{ .Values.fullNameOverride }}
|
|
selector:
|
|
{{- with .Values.labels }}
|
|
matchLabels:
|
|
{{ toYaml . | indent 6 }}
|
|
{{- end }}
|
|
replicas: {{ .Values.replicas }}
|
|
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
|
template:
|
|
metadata:
|
|
{{- if .Values.podAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.labels }}
|
|
labels:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if .Values.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{ toYaml .Values.topologySpreadConstraints | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.priorityClassName }}
|
|
priorityClassName: "{{ .Values.priorityClassName }}"
|
|
{{- end }}
|
|
containers:
|
|
- name: dind
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: "{{ .Values.image.imagePullPolicy }}"
|
|
{{- if .Values.containerWorkingDir }}
|
|
workingDir: {{ .Values.containerWorkingDir }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 12 }}
|
|
command:
|
|
- docker-init
|
|
- --
|
|
- dockerd
|
|
{{- range $key, $value := .Values.extraArgs }}
|
|
- --{{ $key }}={{ $value }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
env:
|
|
- name: TZ
|
|
value: Asia/Kolkata
|
|
{{- with .Values.env }}
|
|
{{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with $.Values.probe.liveness }}
|
|
livenessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with $.Values.probe.readiness }}
|
|
readinessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
resources: {{ toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: dind-volume
|
|
mountPath: {{ .Values.persistentVolume.mountPath }}
|
|
subPath: {{ .Values.persistentVolume.subPath }}
|
|
{{- range .Values.extraHostPathMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- range .Values.extraConfigmapMounts }}
|
|
- name: {{ $.Values.name }}-{{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- range .Values.extraSecretMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- with .Values.extraVolumeMounts }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{ toYaml .Values.imagePullSecrets | indent 2 }}
|
|
{{- end }}
|
|
{{- if .Values.securityContext }}
|
|
securityContext:
|
|
{{ toYaml .Values.securityContext | indent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ .Values.serviceAccountName }}
|
|
{{- if .Values.schedulerName }}
|
|
schedulerName: "{{ .Values.schedulerName }}"
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.affinity }}
|
|
affinity:
|
|
{{ toYaml .Values.affinity | indent 8 }}
|
|
{{- end }}
|
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
|
volumes:
|
|
{{- with .Values.extraVolumes }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
- name: dind-volume
|
|
emptyDir: {}
|
|
{{- end }}
|