From 8722ee20e468fc55785a170c10ea72790fafdfeb Mon Sep 17 00:00:00 2001 From: Manuel Venega <127304555+veneber@users.noreply.github.com> Date: Thu, 16 Jan 2025 04:16:08 +0100 Subject: [PATCH] Adding annotations for different resources (#11467) --- helm/defectdojo/templates/celery-beat-deployment.yaml | 6 ++++++ helm/defectdojo/templates/celery-worker-deployment.yaml | 6 ++++++ helm/defectdojo/templates/configmap.yaml | 6 ++++++ helm/defectdojo/templates/django-deployment.yaml | 6 ++++++ helm/defectdojo/templates/network-policy.yaml | 6 ++++++ helm/defectdojo/values.yaml | 2 ++ 6 files changed, 32 insertions(+) diff --git a/helm/defectdojo/templates/celery-beat-deployment.yaml b/helm/defectdojo/templates/celery-beat-deployment.yaml index aedbb117275..676067238c9 100644 --- a/helm/defectdojo/templates/celery-beat-deployment.yaml +++ b/helm/defectdojo/templates/celery-beat-deployment.yaml @@ -13,6 +13,12 @@ metadata: {{- with .Values.extraLabels }} {{- toYaml . | nindent 4 }} {{- end }} +{{- if .Values.celery.annotations }} + annotations: +{{- with .Values.celery.annotations }} + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} spec: replicas: {{ .Values.celery.beat.replicas }} {{- if .Values.revisionHistoryLimit }} diff --git a/helm/defectdojo/templates/celery-worker-deployment.yaml b/helm/defectdojo/templates/celery-worker-deployment.yaml index c9505959bda..f612b9dcecb 100644 --- a/helm/defectdojo/templates/celery-worker-deployment.yaml +++ b/helm/defectdojo/templates/celery-worker-deployment.yaml @@ -13,6 +13,12 @@ metadata: {{- with .Values.extraLabels }} {{- toYaml . | nindent 4 }} {{- end }} +{{- if .Values.celery.annotations }} + annotations: +{{- with .Values.celery.annotations }} + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} spec: replicas: {{ .Values.celery.worker.replicas }} {{- if .Values.revisionHistoryLimit }} diff --git a/helm/defectdojo/templates/configmap.yaml b/helm/defectdojo/templates/configmap.yaml index 0d8c4a238e1..5933e1bc334 100644 --- a/helm/defectdojo/templates/configmap.yaml +++ b/helm/defectdojo/templates/configmap.yaml @@ -11,6 +11,12 @@ metadata: {{- with .Values.extraLabels }} {{- toYaml . | nindent 4 }} {{- end }} +{{- if .Values.annotations }} + annotations: +{{- with .Values.annotations }} + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} data: DD_ADMIN_USER: {{ .Values.admin.user | default "admin" }} DD_ADMIN_MAIL: {{ .Values.admin.Mail | default "admin@defectdojo.local" }} diff --git a/helm/defectdojo/templates/django-deployment.yaml b/helm/defectdojo/templates/django-deployment.yaml index 5ef3dec50cc..c0fb1d7518c 100644 --- a/helm/defectdojo/templates/django-deployment.yaml +++ b/helm/defectdojo/templates/django-deployment.yaml @@ -12,6 +12,12 @@ metadata: {{- with .Values.extraLabels }} {{- toYaml . | nindent 4 }} {{- end }} +{{- if .Values.django.annotations }} + annotations: +{{- with .Values.django.annotations }} + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} spec: replicas: {{ .Values.django.replicas }} {{- if .Values.revisionHistoryLimit }} diff --git a/helm/defectdojo/templates/network-policy.yaml b/helm/defectdojo/templates/network-policy.yaml index ea0017fb1e6..e580a0df80c 100644 --- a/helm/defectdojo/templates/network-policy.yaml +++ b/helm/defectdojo/templates/network-policy.yaml @@ -12,6 +12,12 @@ metadata: {{- with .Values.extraLabels }} {{- toYaml . | nindent 4 }} {{- end }} +{{- if .Values.networkPolicy.annotations }} + annotations: +{{- with .Values.networkPolicy.annotations }} + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} spec: podSelector: matchLabels: diff --git a/helm/defectdojo/values.yaml b/helm/defectdojo/values.yaml index 0deb30aaff4..3b879912d4e 100644 --- a/helm/defectdojo/values.yaml +++ b/helm/defectdojo/values.yaml @@ -50,6 +50,7 @@ networkPolicy: # ports: # - protocol: TCP # port: 443 + annotations: {} # Configuration value to select database type # Set the "enable" field to true of the database type you select (if you want to use internal database) and false of the one you don't select @@ -136,6 +137,7 @@ celery: # To use an external celery broker, set the hostname here brokerHost: "" logLevel: INFO + annotations: {} beat: annotations: {} affinity: {}