From 87ce37972d55a89e6a8a78cacdc58c3ded60251e Mon Sep 17 00:00:00 2001 From: miwr Date: Tue, 22 Apr 2025 14:42:37 +0200 Subject: [PATCH] new service --- .../sidecar-script-configmap.yaml | 24 +++++++------------ .../ref-implementation/openbao/values.yaml | 14 +++++++---- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/template/stacks/ref-implementation/openbao-logging/sidecar-script-configmap.yaml b/template/stacks/ref-implementation/openbao-logging/sidecar-script-configmap.yaml index 811add3..639b8d8 100644 --- a/template/stacks/ref-implementation/openbao-logging/sidecar-script-configmap.yaml +++ b/template/stacks/ref-implementation/openbao-logging/sidecar-script-configmap.yaml @@ -5,21 +5,15 @@ metadata: namespace: openbao data: sidecar.sh: | - #!/bin/bash + #!/bin/sh echo "Sending SIGHUP to OpenBAO..." kill -SIGHUP $(pidof bao) || echo "OpenBAO process not found" - nginx.conf: | - events {} - - http { - server { - listen 8080; - - location / { - exec /tmp/sidecar.sh; - default_type text/plain; - return 200 "SIGHUP sent to OpenBAO\n"; - } - } - } \ No newline at end of file + start.sh: | + #!/bin/sh + echo "Starting mini HTTP server on port 8080..." + while true; do + # Wait for HTTP POST and respond + { echo -ne "HTTP/1.1 200 OK\r\nContent-Length: 26\r\n\r\nSIGHUP sent to OpenBAO"; \ + /tmp/sidecar.sh; } | nc -l -p 8080 -q 1 + done \ 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 3479417..e6d8a38 100644 --- a/template/stacks/ref-implementation/openbao/values.yaml +++ b/template/stacks/ref-implementation/openbao/values.yaml @@ -35,14 +35,18 @@ server: subPath: passwd - name: sidecar-script mountPath: /tmp - - name: sidecar-nginx - image: nginx:latest + - name: sidecar + image: alpine:latest + command: ["/bin/sh", "/tmp/start.sh"] ports: - - containerPort: 8080 + - containerPort: 8080 volumeMounts: - name: sidecar-script - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf + mountPath: /tmp/sidecar.sh + subPath: sidecar.sh + - name: sidecar-script + mountPath: /tmp/start.sh + subPath: start.sh - name: sidecar-script mountPath: /tmp/sidecar.sh subPath: sidecar.sh