Added support for webhooks in Helm charts (#5118)
* added webhook support * added webhook tests * update_version supports helm values * fix * debug * fix * fix remote file test * increase minikube resources * fix syntax * Update helm.yml * fixed comment * Update .github/workflows/helm.yml Co-authored-by: Kirill Sizov <kirill.sizov@cvat.ai> Co-authored-by: Kirill Sizov <kirill.sizov@cvat.ai>main
parent
1fdec2cf73
commit
469217cc55
@ -0,0 +1,117 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-backend-worker-webhooks
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app: cvat-app
|
||||||
|
tier: backend
|
||||||
|
component: worker-webhooks
|
||||||
|
{{- include "cvat.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.cvat.backend.worker.webhooks.replicas }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "cvat.labels" . | nindent 6 }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.labels }}
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
app: cvat-app-worker-webhooks
|
||||||
|
tier: backend
|
||||||
|
component: worker-webhooks
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: cvat-app-worker-webhooks
|
||||||
|
tier: backend
|
||||||
|
component: worker-webhooks
|
||||||
|
{{- include "cvat.labels" . | nindent 8 }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.labels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: cvat-app-backend-worker-webhooks-container
|
||||||
|
image: {{ .Values.cvat.backend.image }}:{{ .Values.cvat.backend.tag }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
args: ["-c", "supervisord/worker.webhooks.conf"]
|
||||||
|
env:
|
||||||
|
{{- if .Values.redis.enabled }}
|
||||||
|
- name: CVAT_REDIS_HOST
|
||||||
|
value: "{{ .Release.Name }}-redis-master"
|
||||||
|
{{- else }}
|
||||||
|
- name: CVAT_REDIS_HOST
|
||||||
|
value: "{{ .Values.redis.external.host }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
|
- name: CVAT_POSTGRES_HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}"
|
||||||
|
key: postgresql-hostname
|
||||||
|
- name: CVAT_POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}"
|
||||||
|
key: postgresql-username
|
||||||
|
- name: CVAT_POSTGRES_DBNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}"
|
||||||
|
key: postgresql-database
|
||||||
|
- name: CVAT_POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Release.Name }}-{{ .Values.postgresql.secret.name }}"
|
||||||
|
key: postgresql-password
|
||||||
|
{{- else }}
|
||||||
|
- name: CVAT_POSTGRES_HOST
|
||||||
|
value: "{{ .Values.postgresql.external.host }}"
|
||||||
|
- name: CVAT_POSTGRES_USER
|
||||||
|
value: "{{ .Values.postgresql.external.user }}"
|
||||||
|
- name: CVAT_POSTGRES_DBNAME
|
||||||
|
value: "{{ .Values.postgresql.external.dbname }}"
|
||||||
|
- name: CVAT_POSTGRES_PASSWORD
|
||||||
|
value: "{{ .Values.postgresql.external.password }}"
|
||||||
|
- name: CVAT_POSTGRES_PORT
|
||||||
|
value: "{{ .Values.postgresql.external.port }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.additionalEnv }}
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.additionalVolumeMounts }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.cvat.backend.worker.webhooks.additionalVolumes }}
|
||||||
|
volumes:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
cvat:
|
||||||
|
backend:
|
||||||
|
server:
|
||||||
|
additionalVolumeMounts:
|
||||||
|
- mountPath: /home/django/share
|
||||||
|
name: cvat-backend-data
|
||||||
|
subPath: share
|
||||||
|
worker:
|
||||||
|
default:
|
||||||
|
additionalVolumeMounts:
|
||||||
|
- mountPath: /home/django/share
|
||||||
|
name: cvat-backend-data
|
||||||
|
subPath: share
|
||||||
|
traefik:
|
||||||
|
service:
|
||||||
|
externalIPs:
|
||||||
|
- 192.168.49.2
|
||||||
Loading…
Reference in New Issue