new service
This commit is contained in:
parent
350e3a804c
commit
87ce37972d
2 changed files with 18 additions and 20 deletions
|
@ -5,21 +5,15 @@ metadata:
|
||||||
namespace: openbao
|
namespace: openbao
|
||||||
data:
|
data:
|
||||||
sidecar.sh: |
|
sidecar.sh: |
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
echo "Sending SIGHUP to OpenBAO..."
|
echo "Sending SIGHUP to OpenBAO..."
|
||||||
kill -SIGHUP $(pidof bao) || echo "OpenBAO process not found"
|
kill -SIGHUP $(pidof bao) || echo "OpenBAO process not found"
|
||||||
|
|
||||||
nginx.conf: |
|
start.sh: |
|
||||||
events {}
|
#!/bin/sh
|
||||||
|
echo "Starting mini HTTP server on port 8080..."
|
||||||
http {
|
while true; do
|
||||||
server {
|
# Wait for HTTP POST and respond
|
||||||
listen 8080;
|
{ 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
|
||||||
location / {
|
done
|
||||||
exec /tmp/sidecar.sh;
|
|
||||||
default_type text/plain;
|
|
||||||
return 200 "SIGHUP sent to OpenBAO\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -35,14 +35,18 @@ server:
|
||||||
subPath: passwd
|
subPath: passwd
|
||||||
- name: sidecar-script
|
- name: sidecar-script
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
- name: sidecar-nginx
|
- name: sidecar
|
||||||
image: nginx:latest
|
image: alpine:latest
|
||||||
|
command: ["/bin/sh", "/tmp/start.sh"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: sidecar-script
|
- name: sidecar-script
|
||||||
mountPath: /etc/nginx/nginx.conf
|
mountPath: /tmp/sidecar.sh
|
||||||
subPath: nginx.conf
|
subPath: sidecar.sh
|
||||||
|
- name: sidecar-script
|
||||||
|
mountPath: /tmp/start.sh
|
||||||
|
subPath: start.sh
|
||||||
- name: sidecar-script
|
- name: sidecar-script
|
||||||
mountPath: /tmp/sidecar.sh
|
mountPath: /tmp/sidecar.sh
|
||||||
subPath: sidecar.sh
|
subPath: sidecar.sh
|
||||||
|
|
Loading…
Reference in a new issue