3030
This commit is contained in:
parent
3f6ec41ece
commit
d45c89c0b8
3 changed files with 8 additions and 7 deletions
|
@ -12,11 +12,11 @@ data:
|
||||||
start.sh: |
|
start.sh: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "Starting mini HTTP server on port 8080..."
|
echo "Starting mini HTTP server on port 3030..."
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
echo "Waiting for HTTP POST..."
|
echo "Waiting for HTTP POST..."
|
||||||
REQUEST=$(nc -l -p 8080)
|
REQUEST=$(nc -l -p 3030)
|
||||||
|
|
||||||
echo "$REQUEST" | grep -q "POST /" && {
|
echo "$REQUEST" | grep -q "POST /" && {
|
||||||
echo "Received POST request, sending SIGHUP..."
|
echo "Received POST request, sending SIGHUP..."
|
||||||
|
@ -26,5 +26,5 @@ data:
|
||||||
RESPONSE="HTTP/1.1 405 Method Not Allowed\r\nContent-Length: 18\r\n\r\nMethod Not Allowed"
|
RESPONSE="HTTP/1.1 405 Method Not Allowed\r\nContent-Length: 18\r\n\r\nMethod Not Allowed"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo -e "$RESPONSE" | nc -N localhost 8081
|
echo -e "$RESPONSE" | nc -N localhost 3031
|
||||||
done
|
done
|
|
@ -5,8 +5,9 @@ metadata:
|
||||||
namespace: openbao
|
namespace: openbao
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: openbao
|
app.kubernetes.io/instance: openbao
|
||||||
|
component: server
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 8080
|
port: 3030
|
||||||
targetPort: 8080
|
targetPort: 3030
|
||||||
|
|
|
@ -39,7 +39,7 @@ server:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
command: ["/bin/sh", "/tmp/start.sh"]
|
command: ["/bin/sh", "/tmp/start.sh"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 3030
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: sidecar-script
|
- name: sidecar-script
|
||||||
mountPath: /tmp/start.sh
|
mountPath: /tmp/start.sh
|
||||||
|
|
Loading…
Reference in a new issue