From 93cba3824b6c5ce37cedf4692678ad8e6d44b4e0 Mon Sep 17 00:00:00 2001 From: Ansgar Schulte <1299623+ansgarschulte@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:07:00 +0100 Subject: [PATCH] feat: helm: add the ability to add additional annotations to the deployment. --- Makefile | 2 +- charts/steadybit-extension-prometheus/Chart.yaml | 2 +- .../templates/deployment.yaml | 6 ++++++ charts/steadybit-extension-prometheus/values.yaml | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 600bdc2..5e4f48c 100755 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ charttesting: @set -e; \ for dir in charts/steadybit-extension-*; do \ echo "Unit Testing $$dir"; \ - helm unittest $$dir; \ + helm unittest -u $$dir; \ done ## chartlint: Lint charts diff --git a/charts/steadybit-extension-prometheus/Chart.yaml b/charts/steadybit-extension-prometheus/Chart.yaml index 59635b4..d17ba42 100644 --- a/charts/steadybit-extension-prometheus/Chart.yaml +++ b/charts/steadybit-extension-prometheus/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: steadybit-extension-prometheus description: Steadybit Prometheus extension Helm chart for Kubernetes. -version: 1.5.2 +version: 1.5.3 appVersion: v2.0.8 home: https://www.steadybit.com/ icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png diff --git a/charts/steadybit-extension-prometheus/templates/deployment.yaml b/charts/steadybit-extension-prometheus/templates/deployment.yaml index 9304eb1..88b8da4 100644 --- a/charts/steadybit-extension-prometheus/templates/deployment.yaml +++ b/charts/steadybit-extension-prometheus/templates/deployment.yaml @@ -3,6 +3,12 @@ kind: Deployment metadata: name: {{ include "extensionlib.names.fullname" . }} namespace: {{ .Release.Namespace }} + {{ if .Values.deploymentAnnotations }} + annotations: + {{- with .Values.deploymentAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} labels: {{- range $key, $value := .Values.extraLabels }} {{ $key }}: {{ $value }} diff --git a/charts/steadybit-extension-prometheus/values.yaml b/charts/steadybit-extension-prometheus/values.yaml index 54ab974..daff58d 100644 --- a/charts/steadybit-extension-prometheus/values.yaml +++ b/charts/steadybit-extension-prometheus/values.yaml @@ -79,6 +79,9 @@ serviceAccount: # extra labels to apply to the Kubernetes resources extraLabels: {} +# deploymentAnnotations: Additional annotations to be added to the deployment. +deploymentAnnotations: {} + # podAnnotations -- Additional annotations to be added to the pods. podAnnotations: {}