75 lines
2.6 KiB
YAML
75 lines
2.6 KiB
YAML
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"]
|
|
securityContext:
|
|
runAsUser: 100
|
|
volumeMounts:
|
|
- name: alloy-data
|
|
mountPath: /var/lib/
|
|
- name: host-log-storage
|
|
mountPath: /openbao/logs
|
|
- name: logrotate-config-volume
|
|
mountPath: /etc/logrotate.conf
|
|
subPath: logrotate.conf
|
|
readOnly: true
|
|
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
|
|
- name: host-log-storage
|
|
hostPath:
|
|
path: /var/log
|
|
type: Directory
|
|
|
|
volumeMounts:
|
|
- mountPath: /openbao/logs
|
|
name: host-log-storage
|
|
readOnly: false
|
|
|
|
extraArgs:
|
|
- chmod o+rwx /etc/passwd
|
|
- chmod o+rwx /etc/group
|
|
|
|
postStart:
|
|
- sh
|
|
- -c
|
|
- |
|
|
sleep 10
|
|
rm -rf /openbao/data/*
|
|
bao operator init >> /tmp/init.txt
|
|
cat /tmp/init.txt | grep "Key " | awk '{print $NF}' | xargs -I{} bao operator unseal {}
|
|
echo $(grep "Initial Root Token:" /tmp/init.txt | awk '{print $NF}')| cat > /openbao/data/initial_token.txt
|
|
echo $(grep "Unseal Key 1:" /tmp/init.txt | awk '{print $NF}')| cat > /openbao/data/unseal_key1.txt
|
|
echo $(grep "Unseal Key 2:" /tmp/init.txt | awk '{print $NF}')| cat > /openbao/data/unseal_key2.txt
|
|
echo $(grep "Unseal Key 3:" /tmp/init.txt | awk '{print $NF}')| cat > /openbao/data/unseal_key3.txt
|
|
echo $(grep "Unseal Key 4:" /tmp/init.txt | awk '{print $NF}')| cat > /openbao/data/unseal_key4.txt
|
|
echo $(grep "Unseal Key 5:" /tmp/init.txt | awk '{print $NF}')| cat > /openbao/data/unseal_key5.txt
|
|
bao login $(grep "Initial Root Token:" /tmp/init.txt | awk '{print $NF}')
|
|
rm /tmp/init.txt
|
|
# bao audit enable file file_path=stdout
|
|
bao audit enable -path="file" file file_path=/openbao/logs/openbao/openbao.log
|
|
ui:
|
|
enabled: true
|