From 4b553dd2587a4c8ff610c64a058f4b580d68b21f Mon Sep 17 00:00:00 2001 From: miwr Date: Mon, 17 Mar 2025 13:31:43 +0100 Subject: [PATCH] config map separately --- .../stacks/ref-implementation/openbao.yaml | 20 ------------ .../sidecar-container-alloy-configmap.yaml | 32 +++++++++++++++++++ 2 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 template/stacks/ref-implementation/openbao/sidecar-container-alloy-configmap.yaml diff --git a/template/stacks/ref-implementation/openbao.yaml b/template/stacks/ref-implementation/openbao.yaml index d65c7d5..8e286d9 100644 --- a/template/stacks/ref-implementation/openbao.yaml +++ b/template/stacks/ref-implementation/openbao.yaml @@ -32,23 +32,3 @@ spec: kind: MutatingWebhookConfiguration jqPathExpressions: - .webhooks[]?.clientConfig.caBundle - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: sidecar-container-alloy-config -data: - config.yaml: | - logging { - level = "info" - format = "logfmt" - } - - loki.write "local_loki" { - endpoint { - url = "http://loki-loki-distributed-gateway/loki/api/v1/push" - } - } - diff --git a/template/stacks/ref-implementation/openbao/sidecar-container-alloy-configmap.yaml b/template/stacks/ref-implementation/openbao/sidecar-container-alloy-configmap.yaml new file mode 100644 index 0000000..9a62c3f --- /dev/null +++ b/template/stacks/ref-implementation/openbao/sidecar-container-alloy-configmap.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: sidecar-container-alloy-config +data: + config.yaml: | + logging { + level = "info" + format = "logfmt" + } + + loki.write "local_loki" { + endpoint { + url = "http://loki-loki-distributed-gateway/loki/api/v1/push" + } + } + + discovery.kubernetes "pod" { + role = "pod" + } + + discovery.relabel "openbao_pod_logs" { + targets = discovery.kubernetes.pod.targets + + rule { + source_labels = ["__meta_kubernetes_pod_name"] + action = "keep" + regex = "openbao-0" + } + + forward_to = [loki.write.local_loki.receiver] + } \ No newline at end of file