diff --git a/template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml b/template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml deleted file mode 100644 index 31f85ae..0000000 --- a/template/stacks/ref-implementation/openbao-logging/grant-priviledges-to-logrotate.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: logrotate-priviledges - namespace: openbao -spec: - selector: - matchLabels: - app: logrotate-priviledges - template: - metadata: - labels: - app: logrotate-priviledges - spec: - initContainers: - - name: creator - image: alpine:latest - command: ["/bin/sh", "-c"] - args: - - | - set -e - echo "logrotate:x:100:100::/home/logrotate:/bin/sh" >> /etc/passwd - echo "logrotate:x:100:" >> /etc/group - chown logrotate:logrotate /var/lib - tail -f /dev/null - securityContext: - runAsUser: 0 - containers: - - name: running-container - image: busybox - command: ["sleep", "infinity"] \ No newline at end of file diff --git a/template/stacks/ref-implementation/openbao-logging/logrotate-configmap.yaml b/template/stacks/ref-implementation/openbao-logging/logrotate-configmap.yaml index 7cab8de..69ee171 100644 --- a/template/stacks/ref-implementation/openbao-logging/logrotate-configmap.yaml +++ b/template/stacks/ref-implementation/openbao-logging/logrotate-configmap.yaml @@ -5,13 +5,13 @@ metadata: data: logrotate.conf: | /openbao/logs/openbao/*.log { - size 5k + size 100M rotate 7 compress + delaycompress missingok notifempty postrotate - mkdir pupa kill -SIGHUP $(pidof bao) endscript } \ No newline at end of file diff --git a/template/stacks/ref-implementation/openbao-logging/user-configmap.yaml b/template/stacks/ref-implementation/openbao-logging/passwd-user-configmap.yaml similarity index 100% rename from template/stacks/ref-implementation/openbao-logging/user-configmap.yaml rename to template/stacks/ref-implementation/openbao-logging/passwd-user-configmap.yaml diff --git a/template/stacks/ref-implementation/openbao-logging/sidecar-container-alloy-configmap.yaml b/template/stacks/ref-implementation/openbao-logging/sidecar-container-alloy-configmap.yaml deleted file mode 100644 index b0129a6..0000000 --- a/template/stacks/ref-implementation/openbao-logging/sidecar-container-alloy-configmap.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: sidecar-container-alloy-config -data: - config.alloy: | - logging { - level = "info" - format = "logfmt" - } - loki.write "local_loki" { - endpoint { - url = "http://loki-loki-distributed-gateway.monitoring.svc.cluster.local/loki/api/v1/push" - } - } - - local.file_match "applogs" { - path_targets = [{"__path__" = "/openbao/logs/*"}] - sync_period = "5s" - } - - loki.source.file "openbao_logs" { - targets = local.file_match.applogs.targets - forward_to = [loki.write.local_loki.receiver] - } \ No newline at end of file diff --git a/template/stacks/ref-implementation/openbao/values.yaml b/template/stacks/ref-implementation/openbao/values.yaml index c1bc63d..474f26c 100644 --- a/template/stacks/ref-implementation/openbao/values.yaml +++ b/template/stacks/ref-implementation/openbao/values.yaml @@ -1,27 +1,11 @@ server: shareProcessNamespace: true extraContainers: - - name: grafana-alloy - image: grafana/alloy:latest - ports: - - containerPort: 12345 - securityContext: - runAsUser: 100 - volumeMounts: - - name: alloy-data - mountPath: /var/lib/alloy - - name: config-volume - mountPath: /etc/alloy - - name: host-log-storage - mountPath: /openbao/logs - name: logrotate - image: skymatic/logrotate:latest - # command: ["/bin/sh", "-c", "while true; do /usr/sbin/logrotate /etc/logrotate.conf; sleep 60; done"] + image: skymatic/logrotate:latest # MIT License securityContext: runAsUser: 100 volumeMounts: - - name: alloy-data - mountPath: /var/lib/ - name: host-log-storage mountPath: /openbao/logs - name: logrotate-config-volume @@ -32,13 +16,6 @@ server: mountPath: /etc/passwd subPath: passwd volumes: - - name: log-storage - emptyDir: {} - - name: alloy-data - emptyDir: {} - - name: config-volume - configMap: - name: sidecar-container-alloy-config - name: logrotate-config-volume configMap: name: logrotate-config