From 4ad35c7334470bb126687123e1dd6ed8c394f07a Mon Sep 17 00:00:00 2001 From: Riccardo Petraglia Date: Sun, 25 Jun 2023 16:17:17 +0200 Subject: [PATCH 1/2] Allow to set annotations for the UI service Signed-off-by: Riccardo Petraglia Signed-off-by: Riccardo Petraglia --- charts/longhorn/templates/deployment-ui.yaml | 6 +++++- charts/longhorn/values.yaml | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/longhorn/templates/deployment-ui.yaml b/charts/longhorn/templates/deployment-ui.yaml index 6bad5cd4..4c3c326b 100644 --- a/charts/longhorn/templates/deployment-ui.yaml +++ b/charts/longhorn/templates/deployment-ui.yaml @@ -89,7 +89,11 @@ metadata: {{- end }} name: longhorn-frontend namespace: {{ include "release_namespace" . }} -spec: + {{- if .Values.longhornManager.serviceAnnotations }} + annotations: +{{ toYaml .Values.longhornManager.serviceAnnotations | indent 4 }} + {{- end }} +sspec: {{- if eq .Values.service.ui.type "Rancher-Proxy" }} type: ClusterIP {{- else }} diff --git a/charts/longhorn/values.yaml b/charts/longhorn/values.yaml index 55805f8b..2f6aadf8 100644 --- a/charts/longhorn/values.yaml +++ b/charts/longhorn/values.yaml @@ -219,6 +219,11 @@ longhornUI: ## and uncomment this example block # label-key1: "label-value1" # label-key2: "label-value2" + serviceAnnotations: {} + ## If you want to set annotations for the Longhorn Manager service, delete the `{}` in the line above + ## and uncomment this example block + # annotation-key1: "annotation-value1" + # annotation-key2: "annotation-value2" longhornConversionWebhook: replicas: 2 From 1a8c29461b3ff8079ea2f21ebe55ff2eaed715ed Mon Sep 17 00:00:00 2001 From: Riccardo Petraglia Date: Sun, 25 Jun 2023 16:33:22 +0200 Subject: [PATCH 2/2] fix typo and description of value Signed-off-by: Riccardo Petraglia --- charts/longhorn/templates/deployment-ui.yaml | 2 +- charts/longhorn/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/longhorn/templates/deployment-ui.yaml b/charts/longhorn/templates/deployment-ui.yaml index 4c3c326b..cc61fa77 100644 --- a/charts/longhorn/templates/deployment-ui.yaml +++ b/charts/longhorn/templates/deployment-ui.yaml @@ -93,7 +93,7 @@ metadata: annotations: {{ toYaml .Values.longhornManager.serviceAnnotations | indent 4 }} {{- end }} -sspec: +spec: {{- if eq .Values.service.ui.type "Rancher-Proxy" }} type: ClusterIP {{- else }} diff --git a/charts/longhorn/values.yaml b/charts/longhorn/values.yaml index 2f6aadf8..a476d392 100644 --- a/charts/longhorn/values.yaml +++ b/charts/longhorn/values.yaml @@ -220,7 +220,7 @@ longhornUI: # label-key1: "label-value1" # label-key2: "label-value2" serviceAnnotations: {} - ## If you want to set annotations for the Longhorn Manager service, delete the `{}` in the line above + ## If you want to set annotations for the Longhorn UI service, delete the `{}` in the line above ## and uncomment this example block # annotation-key1: "annotation-value1" # annotation-key2: "annotation-value2"