From 5164ec03cc3490e96797b8c2ab68580ca5d799c7 Mon Sep 17 00:00:00 2001 From: Yuwei Sung Date: Fri, 20 Jan 2023 11:31:01 -0600 Subject: [PATCH 1/5] fix repeat ca tag When specify certs.internalal_issuer.typ = secret, the output of issuer spec: ca:ca: secretName: root-ca-secret --- charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml b/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml index 01ebb50a..25cc4e3a 100644 --- a/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml +++ b/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml @@ -57,8 +57,8 @@ metadata: name: "{{ template "pulsar.fullname" . }}-{{ .Values.certs.internal_issuer.component }}-ca-issuer" namespace: {{ template "pulsar.namespace" . }} spec: - ca: {{- if eq .Values.certs.internal_issuer.type "selfsigning" }} + ca: secretName: "{{ .Release.Name }}-ca-tls" {{- else if eq .Values.certs.internal_issuer.type "secret" -}} ca: From 93a390fae531cc8e6c6d46a78e5300f621f67a78 Mon Sep 17 00:00:00 2001 From: Yuwei Sung Date: Fri, 20 Jan 2023 11:42:59 -0600 Subject: [PATCH 2/5] Update tls-cert-internal-issuer.yaml fix syntax --- .../sn-platform/templates/tls/tls-cert-internal-issuer.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml b/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml index 25cc4e3a..c02333a4 100644 --- a/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml +++ b/charts/sn-platform/templates/tls/tls-cert-internal-issuer.yaml @@ -60,10 +60,10 @@ spec: {{- if eq .Values.certs.internal_issuer.type "selfsigning" }} ca: secretName: "{{ .Release.Name }}-ca-tls" -{{- else if eq .Values.certs.internal_issuer.type "secret" -}} +{{- else if eq .Values.certs.internal_issuer.type "secret" }} ca: secretName: {{ .Values.certs.issuers.secret.secretName }} -{{ else if eq .Values.certs.internal_issuer.type "custom" }} +{{- else if eq .Values.certs.internal_issuer.type "custom" }} {{- with .Values.certs.issuers.custom }} {{ toYaml . | indent 2 }} {{- end }} From 04d7672afa9773de695799711e70c1af773290d2 Mon Sep 17 00:00:00 2001 From: Yuwei Sung Date: Mon, 31 Jul 2023 15:20:25 -0500 Subject: [PATCH 3/5] add external labels --- .../templates/prometheus/prometheus-configmap.yaml | 6 ++++++ charts/sn-platform/values.yaml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml index a3261973..0a1f9e51 100644 --- a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml @@ -32,6 +32,12 @@ data: prometheus.yml: | global: scrape_interval: {{ .Values.prometheus.scrapeInterval }} +{{- if .Values.prometheus.external_labels }} + external_labels: + {{- with .Values.prometheus.external_labels }} + {{ toYaml . | indent 2 }} + {{- end }} +{{- end }} {{- if .Values.monitoring.alert_manager }} rule_files: - 'rules.yml' diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 7ff72f09..5b7b7269 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1771,6 +1771,7 @@ prometheus: # https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects - --storage.tsdb.wal-compression scrapeInterval: 15s + external_labels: {} securityContext: runAsUser: 65534 runAsNonRoot: true @@ -1789,7 +1790,7 @@ prometheus: periodSeconds: 10 customRelabelConfigs: [] extraScrapeConfigs: [] - extraCustomArgs: {} + extraCustomArgs: ## Prometheus service ## templates/prometheus-service.yaml From c0ccf58a291b5c2dde93d0695000f5db60b874fa Mon Sep 17 00:00:00 2001 From: Yuwei Sung Date: Tue, 1 Aug 2023 10:13:53 -0500 Subject: [PATCH 4/5] Update prometheus-configmap.yaml --- .../templates/prometheus/prometheus-configmap.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml index 0a1f9e51..4a264511 100644 --- a/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml +++ b/charts/sn-platform/templates/prometheus/prometheus-configmap.yaml @@ -32,11 +32,9 @@ data: prometheus.yml: | global: scrape_interval: {{ .Values.prometheus.scrapeInterval }} -{{- if .Values.prometheus.external_labels }} +{{- if .Values.prometheus.externalLabels }} external_labels: - {{- with .Values.prometheus.external_labels }} - {{ toYaml . | indent 2 }} - {{- end }} +{{ toYaml .Values.prometheus.externalLabels | indent 8 }} {{- end }} {{- if .Values.monitoring.alert_manager }} rule_files: From 1e2582e69e9563925ab74211bc842a94b12c85a5 Mon Sep 17 00:00:00 2001 From: Yuwei Sung Date: Tue, 1 Aug 2023 10:14:30 -0500 Subject: [PATCH 5/5] Update values.yaml --- charts/sn-platform/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 5b7b7269..466d067e 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1771,7 +1771,7 @@ prometheus: # https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects - --storage.tsdb.wal-compression scrapeInterval: 15s - external_labels: {} + externalLabels: {} securityContext: runAsUser: 65534 runAsNonRoot: true