Markus Pesch
ea2ca22e7c
All checks were successful
continuous-integration/drone/push Build is passing
70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "droneRunner.fullname" . }}
|
|
labels:
|
|
{{- include "droneRunner.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount | default 1 }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "droneRunner.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "droneRunner.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ include "droneRunner.fullname" . }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- if and (hasKey .Values.envFile "content") (hasKey .Values.config "DRONE_RUNNER_ENV_FILE") }}
|
|
volumeMounts:
|
|
- name: custom-env-vars
|
|
mountPath: {{ dir .Values.config.DRONE_RUNNER_ENV_FILE }}
|
|
readOnly: true
|
|
{{- end}}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.podPriorityClassName }}
|
|
priorityClassName: {{ .Values.podPriorityClassName }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "droneRunner.fullname" . }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if and (hasKey .Values.envFile "content") (hasKey .Values.config "DRONE_RUNNER_ENV_FILE") }}
|
|
volumes:
|
|
- name: custom-env-vars
|
|
configMap:
|
|
name: {{ include "droneRunner.fullname" . }}
|
|
items:
|
|
- key: custom-env-vars
|
|
path: {{ base .Values.config.DRONE_RUNNER_ENV_FILE }}
|
|
{{- end}}
|