chore(argo-cd): Remove notification bot (#1854)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
99932a96c2
commit
2ae7e1ad0d
10 changed files with 3 additions and 316 deletions
|
|
@ -158,17 +158,6 @@ Create the name of the notifications service account to use
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the notifications bots slack service account to use
|
||||
*/}}
|
||||
{{- define "argo-cd.notificationsBotsSlackServiceAccountName" -}}
|
||||
{{- if .Values.notifications.bots.slack.serviceAccount.create -}}
|
||||
{{ default (include "argo-cd.notifications.fullname" .) .Values.notifications.bots.slack.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.notifications.bots.slack.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Argo Configuration Preset Values (Incluenced by Values configuration)
|
||||
*/}}
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
{{ if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.notifications.deploymentAnnotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
name: {{ template "argo-cd.notifications.fullname" . }}-bot
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" .Values.notifications.bots.slack.name) | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" "metrics") | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" "metrics") | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.notifications.bots.slack.imagePullSecrets | default .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.global.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "argo-cd.notificationsBotsSlackServiceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ include "argo-cd.notifications.fullname" . }}-bot
|
||||
image: {{ default .Values.global.image.repository .Values.notifications.bots.slack.image.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.notifications.bots.slack.image.tag }}
|
||||
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.notifications.bots.slack.image.pullPolicy }}
|
||||
command:
|
||||
- argocd-notifications
|
||||
- bot
|
||||
- --loglevel={{ default .Values.global.logging.level .Values.notifications.bots.slack.logLevel }}
|
||||
- --logformat={{ default .Values.global.logging.format .Values.notifications.bots.slack.logFormat }}
|
||||
{{- range .Values.notifications.bots.slack.extraArgs }}
|
||||
- {{ . | squote }}
|
||||
{{- end }}
|
||||
workingDir: /app
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
resources:
|
||||
{{- toYaml .Values.notifications.bots.slack.resources | nindent 12 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.notifications.bots.slack.containerSecurityContext | nindent 12 }}
|
||||
affinity:
|
||||
{{- include "argo-cd.affinity" (dict "context" . "component" .Values.notifications.bots.slack) | nindent 8 }}
|
||||
{{- with .Values.notifications.bots.slack.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.notifications.bots.slack.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.notifications.bots.slack.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
dnsPolicy: {{ .Values.notifications.bots.slack.dnsPolicy }}
|
||||
{{ end }}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{{- if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled .Values.notifications.bots.slack.pdb.enabled }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.notifications.fullname" . }}-bot
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" .Values.notifications.bots.slack.name) | nindent 4 }}
|
||||
{{- with .Values.notifications.bots.slack.pdb.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.notifications.bots.slack.pdb.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.notifications.bots.slack.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ . }}
|
||||
{{- else }}
|
||||
minAvailable: {{ .Values.notifications.bots.slack.pdb.minAvailable | default 0 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" "metrics") | nindent 6 }}
|
||||
{{- end }}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{{ if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "argo-cd.notifications.fullname" . }}-bot
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
{{ end }}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{{ if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "argo-cd.notifications.fullname" . }}-bot
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "argo-cd.notifications.fullname" . }}-bot
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "argo-cd.notificationsBotsSlackServiceAccountName" . }}
|
||||
{{ end }}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{{ if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "argo-cd.notifications.fullname" . }}-bot
|
||||
{{- if .Values.notifications.bots.slack.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml .Values.notifications.bots.slack.service.annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.notifications.bots.slack.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" "metrics") | nindent 6 }}
|
||||
type: {{ .Values.notifications.bots.slack.service.type }}
|
||||
{{ end }}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{{- if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled .Values.notifications.bots.slack.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
automountServiceAccountToken: {{ .Values.notifications.bots.slack.serviceAccount.automountServiceAccountToken }}
|
||||
metadata:
|
||||
name: {{ template "argo-cd.notificationsBotsSlackServiceAccountName" . }}
|
||||
{{- if .Values.notifications.bots.slack.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.notifications.bots.slack.serviceAccount.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.bots.slack.name "name" .Values.notifications.bots.slack.name) | nindent 4 }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue