alloy config added
This commit is contained in:
parent
0771b1deb9
commit
b89cfa49fd
3 changed files with 25 additions and 2 deletions
|
@ -1,8 +1,19 @@
|
||||||
|
controller:
|
||||||
|
volumes:
|
||||||
|
- name: host-log-storage
|
||||||
|
hostPath:
|
||||||
|
path: /var/log
|
||||||
|
type: Directory
|
||||||
alloy:
|
alloy:
|
||||||
create: false
|
create: false
|
||||||
name: alloy-config
|
name: alloy-config
|
||||||
key: config.alloy
|
key: config.alloy
|
||||||
|
|
||||||
|
mounts:
|
||||||
|
- mountPath: /openbao/logs
|
||||||
|
name: host-log-storage
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
uiPathPrefix: "/alloy"
|
uiPathPrefix: "/alloy"
|
||||||
|
|
||||||
configMap:
|
configMap:
|
||||||
|
@ -72,6 +83,16 @@ alloy:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local.file_match "file_logs" {
|
||||||
|
path_targets = [{"__path__" = "/openbao/logs/openbao/*"}]
|
||||||
|
sync_period = "5s"
|
||||||
|
}
|
||||||
|
|
||||||
|
loki.source.file "local_files" {
|
||||||
|
targets = local.file_match.file_logs.targets
|
||||||
|
forward_to = [loki.write.local_loki.receiver]
|
||||||
|
}
|
||||||
|
|
||||||
loki.source.kubernetes "all_pod_logs" {
|
loki.source.kubernetes "all_pod_logs" {
|
||||||
targets = discovery.relabel.pod_logs.output
|
targets = discovery.relabel.pod_logs.output
|
||||||
forward_to = [loki.write.local_loki.receiver]
|
forward_to = [loki.write.local_loki.receiver]
|
||||||
|
|
|
@ -20,7 +20,7 @@ spec:
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
mkdir -p /var/log/openbao
|
mkdir -p /var/log/openbao
|
||||||
chown 100:100 /var/log/openbao
|
chown 100:100 /var/log/openbao
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
@ -29,7 +29,7 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: running-container
|
- name: running-container
|
||||||
image: busybox
|
image: busybox
|
||||||
command: ["sleep", "2"]
|
command: ["sleep", "infinity"]
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -5,6 +5,8 @@ metadata:
|
||||||
namespace: openbao
|
namespace: openbao
|
||||||
spec:
|
spec:
|
||||||
schedule: "0 * * * *"
|
schedule: "0 * * * *"
|
||||||
|
successfulJobsHistoryLimit: 1
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Reference in a new issue