From 1afc8b3f42e9a5705927e1addfab14ca7b5fe461 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 12:16:12 +0100 Subject: [PATCH 01/18] Adding defautl configmap and secret to promtail-app --- CHANGELOG.md | 2 +- helm/observability-bundle/values.yaml | 61 +++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd8081c..c177959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add `promtail-app` v1.0.1. +- Add `promtail-app` v1.0.1 with configmap and secret resources. ## [0.2.0] - 2023-02-21 diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index e80a7d2..e583d67 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -188,13 +188,68 @@ apps: chartName: promtail catalog: giantswarm enabled: false - namespace: kube-system + namespace: promtail # used by renovate # repo: giantswarm/promtail-app version: 1.0.1 # User values can be provided via a ConfigMap or Secret for each individual app - userConfig: {} + userConfig: { + configMap: + values: | + promtail: + rbac: + create: true + pspEnabled: true + extraArgs: + - '-log-config-reverse-order' + config: + clients: + - url: https://loki.zj88t.k8s.gorilla.eu-central-1.aws.gigantic.io/loki/api/v1/push + # the whole client config for this URL + # including but not limited to authentication credentials + # is stored in Flux secret + snippets: + extraScrapeConfigs: | + # this one includes also system logs reported by systemd-journald + - job_name: systemd_journal_run + journal: + path: /run/log/journal + max_age: 12h + json: true + relabel_configs: + - source_labels: ['__journal__systemd_unit'] + target_label: 'systemd_unit' + - source_labels: ['__journal__hostname'] + target_label: 'hostname' + - job_name: systemd_journal_var + journal: + path: /var/log/journal + max_age: 12h + json: true + relabel_configs: + - source_labels: ['__journal__systemd_unit'] + target_label: 'systemd_unit' + - source_labels: ['__journal__hostname'] + target_label: 'hostname' + extraVolumes: + - name: journal-run + hostPath: + path: /run/log/journal/ + - name: journal-var + hostPath: + path: /var/log/journal/ + extraVolumeMounts: + - name: journal-run + mountPath: /run/log/journal/ + readOnly: true + - name: journal-var + mountPath: /var/log/journal/ + readOnly: true + } # a list of extraConfigs for the App, # It can be secret or configmap # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example - extraConfigs: [] + extraConfigs: + - kind: secret + name: promtail-user-secrets + namespace: giantswarm From 87ff009bc41b8d50420185eaadb662bf7cfaf526 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 12:22:54 +0100 Subject: [PATCH 02/18] Fix yaml --- helm/observability-bundle/values.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index e583d67..eec4631 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -193,7 +193,7 @@ apps: # repo: giantswarm/promtail-app version: 1.0.1 # User values can be provided via a ConfigMap or Secret for each individual app - userConfig: { + userConfig: configMap: values: | promtail: @@ -245,7 +245,6 @@ apps: - name: journal-var mountPath: /var/log/journal/ readOnly: true - } # a list of extraConfigs for the App, # It can be secret or configmap # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example From a84f93d2e1f5cc0094d5e3eaef358f5a1aeaa5bb Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 12:23:58 +0100 Subject: [PATCH 03/18] Fix yaml --- helm/observability-bundle/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index eec4631..4ab56e5 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -193,7 +193,7 @@ apps: # repo: giantswarm/promtail-app version: 1.0.1 # User values can be provided via a ConfigMap or Secret for each individual app - userConfig: + userConfig: configMap: values: | promtail: From d9bd6370800f05700f7d508d5620627fe745917a Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 14:01:27 +0100 Subject: [PATCH 04/18] Revert namespace update for promtail-app --- helm/observability-bundle/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 4ab56e5..c0fd343 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -188,7 +188,7 @@ apps: chartName: promtail catalog: giantswarm enabled: false - namespace: promtail + namespace: kube-system # used by renovate # repo: giantswarm/promtail-app version: 1.0.1 From 4548c4638de10184455a5c0479436da740bbe139 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 14:44:30 +0100 Subject: [PATCH 05/18] Move promtail secret definition --- helm/observability-bundle/values.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index c0fd343..669531b 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -194,6 +194,9 @@ apps: version: 1.0.1 # User values can be provided via a ConfigMap or Secret for each individual app userConfig: + secret: + name: promtail-user-secrets + namespace: giantswarm configMap: values: | promtail: @@ -248,7 +251,5 @@ apps: # a list of extraConfigs for the App, # It can be secret or configmap # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example - extraConfigs: - - kind: secret - name: promtail-user-secrets - namespace: giantswarm + extraConfigs: [] + From 5c0236a1c767e3f8db6ad210add29bb9872a9e04 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 14:46:24 +0100 Subject: [PATCH 06/18] Remove space --- helm/observability-bundle/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 669531b..c6759d0 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -252,4 +252,4 @@ apps: # It can be secret or configmap # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: [] - + From 2d4b909e6a69df5b228987d4cbeac42b8ee195c6 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 14:48:14 +0100 Subject: [PATCH 07/18] Remove blank line --- helm/observability-bundle/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index c6759d0..deefef0 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -252,4 +252,3 @@ apps: # It can be secret or configmap # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: [] - From 6e7fd9a30e4459eb306a5c73fdfb87e120c37258 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 15:16:19 +0100 Subject: [PATCH 08/18] Use extraConfigs in place of userConfigs for promtail-app --- helm/observability-bundle/values.yaml | 64 ++++----------------------- 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index deefef0..5be9ff1 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -193,62 +193,14 @@ apps: # repo: giantswarm/promtail-app version: 1.0.1 # User values can be provided via a ConfigMap or Secret for each individual app - userConfig: - secret: - name: promtail-user-secrets - namespace: giantswarm - configMap: - values: | - promtail: - rbac: - create: true - pspEnabled: true - extraArgs: - - '-log-config-reverse-order' - config: - clients: - - url: https://loki.zj88t.k8s.gorilla.eu-central-1.aws.gigantic.io/loki/api/v1/push - # the whole client config for this URL - # including but not limited to authentication credentials - # is stored in Flux secret - snippets: - extraScrapeConfigs: | - # this one includes also system logs reported by systemd-journald - - job_name: systemd_journal_run - journal: - path: /run/log/journal - max_age: 12h - json: true - relabel_configs: - - source_labels: ['__journal__systemd_unit'] - target_label: 'systemd_unit' - - source_labels: ['__journal__hostname'] - target_label: 'hostname' - - job_name: systemd_journal_var - journal: - path: /var/log/journal - max_age: 12h - json: true - relabel_configs: - - source_labels: ['__journal__systemd_unit'] - target_label: 'systemd_unit' - - source_labels: ['__journal__hostname'] - target_label: 'hostname' - extraVolumes: - - name: journal-run - hostPath: - path: /run/log/journal/ - - name: journal-var - hostPath: - path: /var/log/journal/ - extraVolumeMounts: - - name: journal-run - mountPath: /run/log/journal/ - readOnly: true - - name: journal-var - mountPath: /var/log/journal/ - readOnly: true + userConfig: {} # a list of extraConfigs for the App, # It can be secret or configmap # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example - extraConfigs: [] + extraConfigs: + - kind: secret + name: promtail-app-extra-secrets + namespace: giantswarm + - kind: configMap + name: promtail-app-extra-values + namespace: giantswarm From c6059a532cb94ecda70685736eb237b7ae358e85 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 16:20:12 +0100 Subject: [PATCH 09/18] Templating configmap/secret name and namespace for promtail --- CHANGELOG.md | 2 +- helm/observability-bundle/templates/apps.yaml | 4 ++-- helm/observability-bundle/values.yaml | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c177959..fd8081c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Add `promtail-app` v1.0.1 with configmap and secret resources. +- Add `promtail-app` v1.0.1. ## [0.2.0] - 2023-02-21 diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index e76e6c7..d7a9964 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,8 +62,8 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $extraConfig.name }} - namespace: {{ $extraConfig.namespace }} + name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} + namespace: {{ $.Release.Namespace }} {{- end }} {{- end }} {{- if .userConfig }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 5be9ff1..18598c2 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -199,8 +199,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: promtail-app-extra-secrets - namespace: giantswarm + name: logging-secret - kind: configMap - name: promtail-app-extra-values - namespace: giantswarm + name: logging-config From d7d33a39f45dfd81985bf6ee3f1d3ba451c1447c Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 16:37:58 +0100 Subject: [PATCH 10/18] Move templating in values --- helm/observability-bundle/templates/apps.yaml | 4 ++-- helm/observability-bundle/values.yaml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index d7a9964..e76e6c7 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,8 +62,8 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} - namespace: {{ $.Release.Namespace }} + name: {{ $extraConfig.name }} + namespace: {{ $extraConfig.namespace }} {{- end }} {{- end }} {{- if .userConfig }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 18598c2..43e87a0 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -199,6 +199,8 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: logging-secret + name: {{ $.Values.clusterID }}-logging-secret + namespace: {{ $.Release.Namespace }} - kind: configMap - name: logging-config + name: {{ $.Values.clusterID }}-logging-config + namespace: {{ $.Release.Namespace }} From a03d480e80997fdde895a21b28ab486029ee15a3 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 16:48:58 +0100 Subject: [PATCH 11/18] Revert the move of the templating --- helm/observability-bundle/templates/apps.yaml | 4 ++-- helm/observability-bundle/values.yaml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index e76e6c7..d7a9964 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,8 +62,8 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $extraConfig.name }} - namespace: {{ $extraConfig.namespace }} + name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} + namespace: {{ $.Release.Namespace }} {{- end }} {{- end }} {{- if .userConfig }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 43e87a0..18598c2 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -199,8 +199,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: {{ $.Values.clusterID }}-logging-secret - namespace: {{ $.Release.Namespace }} + name: logging-secret - kind: configMap - name: {{ $.Values.clusterID }}-logging-config - namespace: {{ $.Release.Namespace }} + name: logging-config From b212d90b0cf8bdda418fc19a2faa2e64956dd10b Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 17:04:08 +0100 Subject: [PATCH 12/18] Using anchor to get clusterId --- helm/observability-bundle/templates/apps.yaml | 4 ++-- helm/observability-bundle/values.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index d7a9964..5a2bbc3 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,8 +62,8 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} - namespace: {{ $.Release.Namespace }} + name: {{ $extraConfig.name }} + namespace: {{ $extraConfig.namespace | default $.Release.Namespace }} {{- end }} {{- end }} {{- if .userConfig }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 18598c2..02da86c 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -1,4 +1,4 @@ -clusterID: "" +clusterID: &clusterId "" organization: "" apps: @@ -199,6 +199,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: logging-secret + name: !join [*clusterId, "-logging-secret"] - kind: configMap - name: logging-config + name: !join [*clusterId, "-logging-config"] From fec17adef4d3e1621a2e820bfd2294631a144cf0 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 17:08:22 +0100 Subject: [PATCH 13/18] Fix join syntax --- helm/observability-bundle/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 02da86c..783a5bd 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -199,6 +199,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: !join [*clusterId, "-logging-secret"] + name: !join [*clusterId, -logging-secret] - kind: configMap - name: !join [*clusterId, "-logging-config"] + name: !join [*clusterId, -logging-config] From 332cec32f8bf6c732cdf2439b04238ec9ac6def0 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 17:35:54 +0100 Subject: [PATCH 14/18] Revert anchor --- helm/observability-bundle/templates/apps.yaml | 2 +- helm/observability-bundle/values.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index 5a2bbc3..18f2b3d 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,7 +62,7 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $extraConfig.name }} + name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} namespace: {{ $extraConfig.namespace | default $.Release.Namespace }} {{- end }} {{- end }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 783a5bd..18598c2 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -1,4 +1,4 @@ -clusterID: &clusterId "" +clusterID: "" organization: "" apps: @@ -199,6 +199,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: !join [*clusterId, -logging-secret] + name: logging-secret - kind: configMap - name: !join [*clusterId, -logging-config] + name: logging-config From 1a1a05222ab0277228651f49eba002163337fb1e Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 19:22:53 +0100 Subject: [PATCH 15/18] Try using tpl function to reuse clusterID in values --- helm/observability-bundle/templates/apps.yaml | 2 +- helm/observability-bundle/values.yaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index 18f2b3d..5a2bbc3 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,7 +62,7 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} + name: {{ $extraConfig.name }} namespace: {{ $extraConfig.namespace | default $.Release.Namespace }} {{- end }} {{- end }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 18598c2..9b29fbe 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -1,5 +1,6 @@ clusterID: "" organization: "" +clusterIdTpl: "{{ .Values.clusterID }}" apps: prometheus-operator-crd: @@ -199,6 +200,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: logging-secret + name: {{ tpl .Values.clusterIdTpl . }}-logging-secret - kind: configMap - name: logging-config + name: {{ tpl .Values.clusterIdTpl . }}-logging-config From b74960302bd0493b909bd913a2425d48ec69bf16 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Wed, 22 Mar 2023 19:25:28 +0100 Subject: [PATCH 16/18] Revert using tpl function to reuse clusterID in values --- helm/observability-bundle/templates/apps.yaml | 2 +- helm/observability-bundle/values.yaml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index 5a2bbc3..18f2b3d 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,7 +62,7 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $extraConfig.name }} + name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} namespace: {{ $extraConfig.namespace | default $.Release.Namespace }} {{- end }} {{- end }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 9b29fbe..18598c2 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -1,6 +1,5 @@ clusterID: "" organization: "" -clusterIdTpl: "{{ .Values.clusterID }}" apps: prometheus-operator-crd: @@ -200,6 +199,6 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: {{ tpl .Values.clusterIdTpl . }}-logging-secret + name: logging-secret - kind: configMap - name: {{ tpl .Values.clusterIdTpl . }}-logging-config + name: logging-config From 38f2ad3ffc97d05c38bdcf2e6477567fe8038989 Mon Sep 17 00:00:00 2001 From: QuentinBisson Date: Wed, 22 Mar 2023 21:13:34 +0100 Subject: [PATCH 17/18] Use template to set cluster-id --- helm/observability-bundle/templates/apps.yaml | 4 ++-- helm/observability-bundle/values.yaml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/helm/observability-bundle/templates/apps.yaml b/helm/observability-bundle/templates/apps.yaml index 18f2b3d..5cacaf1 100644 --- a/helm/observability-bundle/templates/apps.yaml +++ b/helm/observability-bundle/templates/apps.yaml @@ -62,8 +62,8 @@ spec: {{- end }} {{- range $extraConfig := .extraConfigs }} - kind: {{ $extraConfig.kind }} - name: {{ $.Values.clusterID }}-{{ $extraConfig.name }} - namespace: {{ $extraConfig.namespace | default $.Release.Namespace }} + name: {{ tpl $extraConfig.name $ }} + namespace: {{ tpl $extraConfig.namespace $ }} {{- end }} {{- end }} {{- if .userConfig }} diff --git a/helm/observability-bundle/values.yaml b/helm/observability-bundle/values.yaml index 18598c2..efcaa88 100644 --- a/helm/observability-bundle/values.yaml +++ b/helm/observability-bundle/values.yaml @@ -199,6 +199,8 @@ apps: # https://github.com/giantswarm/rfc/tree/main/multi-layer-app-config#example extraConfigs: - kind: secret - name: logging-secret + name: "{{ $.Values.clusterID }}-logging-secret" + namespace: "{{ $.Release.Namespace }}" - kind: configMap - name: logging-config + name: "{{ $.Values.clusterID }}-logging-config" + namespace: "{{ $.Release.Namespace }}" From 7121cc7a18b8f0381f927c1169c7fbc40738b523 Mon Sep 17 00:00:00 2001 From: Marie Roque Date: Fri, 24 Mar 2023 09:26:07 +0100 Subject: [PATCH 18/18] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f75c21..ce17d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add extra configmap and secret to `promtail-app`. + ## [0.3.0] - 2023-03-22 ### Changed