From c6e71f8aebca74cb2977d8c4439cb44a2a84f9be Mon Sep 17 00:00:00 2001 From: miwr Date: Tue, 25 Mar 2025 12:51:00 +0100 Subject: [PATCH] logging setup --- ...figmap.yaml => openbao-logging-setup.yaml} | 2 +- .../create-logging-directory-deamonset.yaml | 37 +++++++++++++++++++ .../sidecar-container-alloy-configmap.yaml | 0 3 files changed, 38 insertions(+), 1 deletion(-) rename template/stacks/ref-implementation/{openbao-alloy-configmap.yaml => openbao-logging-setup.yaml} (90%) create mode 100644 template/stacks/ref-implementation/openbao-logging/create-logging-directory-deamonset.yaml rename template/stacks/ref-implementation/{openbao-alloy-configmap => openbao-logging}/sidecar-container-alloy-configmap.yaml (100%) diff --git a/template/stacks/ref-implementation/openbao-alloy-configmap.yaml b/template/stacks/ref-implementation/openbao-logging-setup.yaml similarity index 90% rename from template/stacks/ref-implementation/openbao-alloy-configmap.yaml rename to template/stacks/ref-implementation/openbao-logging-setup.yaml index 9daa56a..8ee0b7a 100644 --- a/template/stacks/ref-implementation/openbao-alloy-configmap.yaml +++ b/template/stacks/ref-implementation/openbao-logging-setup.yaml @@ -12,7 +12,7 @@ spec: source: repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder targetRevision: HEAD - path: "stacks/ref-implementation/openbao-alloy-configmap" + path: "stacks/ref-implementation/openbao-logging" destination: server: "https://kubernetes.default.svc" namespace: openbao diff --git a/template/stacks/ref-implementation/openbao-logging/create-logging-directory-deamonset.yaml b/template/stacks/ref-implementation/openbao-logging/create-logging-directory-deamonset.yaml new file mode 100644 index 0000000..1a0b0d0 --- /dev/null +++ b/template/stacks/ref-implementation/openbao-logging/create-logging-directory-deamonset.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: openbao-logging-dir + namespace: openbao +spec: + selector: + matchLabels: + app: openbao-logging-dir + template: + metadata: + labels: + app: openbao-logging-dir + spec: + initContainers: + - name: creator + image: busybox + command: ["/bin/sh", "-c"] + args: + - | + set -e + mkdir -p /var/log/openbao + chown 100:100 /var/log/openbao + securityContext: + runAsUser: 0 + volumeMounts: + - name: host-log + mountPath: /var/log + containers: + - name: running-container + image: busybox + command: ["sleep", "infinity"] + volumes: + - name: host-log + hostPath: + path: /var/log + type: Directory \ No newline at end of file diff --git a/template/stacks/ref-implementation/openbao-alloy-configmap/sidecar-container-alloy-configmap.yaml b/template/stacks/ref-implementation/openbao-logging/sidecar-container-alloy-configmap.yaml similarity index 100% rename from template/stacks/ref-implementation/openbao-alloy-configmap/sidecar-container-alloy-configmap.yaml rename to template/stacks/ref-implementation/openbao-logging/sidecar-container-alloy-configmap.yaml