argocd-helm/charts/argocd-notifications/templates/bots/slack/deployment.yaml
Marco Kilchhofer ba124f2587
feat(argocd-notifications): Add ability to define security context (#1116)
Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2022-02-01 22:47:44 +01:00

55 lines
1.9 KiB
YAML

{{ if .Values.bots.slack.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "argocd-notifications.name" . }}-bot
labels:
{{- include "argocd-notifications.bots.slack.labels" . | nindent 4 }}
spec:
strategy:
{{- .Values.bots.slack.updateStrategy | toYaml | nindent 4 }}
selector:
matchLabels:
{{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.bots.slack.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "argocd-notifications.bots.slack.serviceAccountName" . }}
{{- with .Values.bots.slack.securityContext }}
securityContext: {{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "argocd-notifications.name" . }}-bot
image: "{{ .Values.bots.slack.image.repository }}:{{ default .Chart.AppVersion .Values.bots.slack.image.tag }}"
imagePullPolicy: {{ .Values.bots.slack.image.pullPolicy }}
resources:
{{- toYaml .Values.bots.slack.resources | nindent 12 }}
command:
- /app/argocd-notifications-backend
- bot
workingDir: /app
ports:
- containerPort: 8080
name: http
{{- with .Values.bots.slack.containerSecurityContext }}
securityContext: {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.bots.slack.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.bots.slack.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.bots.slack.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ end }}