385252cd72
With PR #17 the Helm Chart parameters for webhook secrets were missing in the README parameters. This is now fixed. A checksum for bot configuration secret resource ensures replacement of the pod when there is a configuration change. Additional: - Bump Chart default image version - Add bug fix notes to changelog Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
91 lines
3 KiB
YAML
91 lines
3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "helm.fullname" . }}
|
|
labels:
|
|
{{- include "helm.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "helm.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
|
|
{{- with .Values.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "helm.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "helm.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env:
|
|
{{- if .Values.app.configLocationOverride }}
|
|
- name: GITEA_SQ_BOT_CONFIG_PATH
|
|
value: "{{ .Values.app.configLocationOverride }}"
|
|
{{- end}}
|
|
- name: GITEA_SQ_BOT_PORT
|
|
value: "{{ .Values.app.listeningPort }}"
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.app.listeningPort }}
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ping
|
|
port: http
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: sq-bot-config
|
|
{{- if .Values.app.configLocationOverride }}
|
|
mountPath: {{ dir .Values.app.configLocationOverride }}
|
|
{{- else }}
|
|
mountPath: /home/bot/config
|
|
{{- end }}
|
|
readOnly: true
|
|
{{- if .Values.volumeMounts }}
|
|
{{- toYaml .Values.volumeMounts | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: sq-bot-config
|
|
secret:
|
|
secretName: {{ include "helm.fullname" . }}
|
|
{{- if .Values.app.configLocationOverride }}
|
|
items:
|
|
- key: config.yaml
|
|
path: {{ base .Values.app.configLocationOverride }}
|
|
{{- end }}
|
|
{{- if .Values.volumes }}
|
|
{{- toYaml .Values.volumes | nindent 8 }}
|
|
{{- end }}
|