101 lines
3.9 KiB
YAML
101 lines
3.9 KiB
YAML
{{- if .Values.gitHook.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "gitdata.fullname" . }}-git-hook
|
|
namespace: {{ include "gitdata.namespace" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "gitdata.fullname" . }}-git-hook
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
|
spec:
|
|
replicas: {{ .Values.gitHook.replicaCount | default 2 }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "gitdata.fullname" . }}-git-hook
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "gitdata.fullname" . }}-git-hook
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: git-hook
|
|
image: "{{ .Values.image.registry }}/{{ .Values.gitHook.image.repository }}:{{ .Values.gitHook.image.tag }}"
|
|
imagePullPolicy: {{ .Values.gitHook.image.pullPolicy | default .Values.image.pullPolicy }}
|
|
env:
|
|
- name: APP_DATABASE_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "gitdata.fullname" . }}-config
|
|
key: APP_DATABASE_URL
|
|
optional: true
|
|
- name: APP_REDIS_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "gitdata.fullname" . }}-config
|
|
key: APP_REDIS_URL
|
|
optional: true
|
|
- name: HOOK_POOL_REDIS_LIST_PREFIX
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "gitdata.fullname" . }}-config
|
|
key: HOOK_POOL_REDIS_LIST_PREFIX
|
|
optional: true
|
|
- name: HOOK_POOL_REDIS_LOG_CHANNEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "gitdata.fullname" . }}-config
|
|
key: HOOK_POOL_REDIS_LOG_CHANNEL
|
|
optional: true
|
|
{{- range .Values.gitHook.env }}
|
|
- name: {{ .name }}
|
|
value: {{ .value | quote }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.gitHook.resources | nindent 10 }}
|
|
{{- if .Values.gitHook.livenessProbe }}
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
{{- range .Values.gitHook.livenessProbe.exec.command }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
initialDelaySeconds: {{ .Values.gitHook.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.gitHook.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.gitHook.livenessProbe.timeoutSeconds }}
|
|
failureThreshold: {{ .Values.gitHook.livenessProbe.failureThreshold }}
|
|
{{- end }}
|
|
{{- if .Values.gitHook.readinessProbe }}
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
{{- range .Values.gitHook.readinessProbe.exec.command }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
initialDelaySeconds: {{ .Values.gitHook.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.gitHook.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.gitHook.readinessProbe.timeoutSeconds }}
|
|
failureThreshold: {{ .Values.gitHook.readinessProbe.failureThreshold }}
|
|
{{- end }}
|
|
{{- with .Values.gitHook.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.gitHook.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.gitHook.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.storage.enabled }}
|
|
volumes:
|
|
- name: shared-data
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "gitdata.fullname" . }}-shared-data
|
|
{{- end }}
|
|
{{- end }}
|