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:
|
||||
create: false
|
||||
name: alloy-config
|
||||
key: config.alloy
|
||||
|
||||
mounts:
|
||||
- mountPath: /openbao/logs
|
||||
name: host-log-storage
|
||||
readOnly: true
|
||||
|
||||
uiPathPrefix: "/alloy"
|
||||
|
||||
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" {
|
||||
targets = discovery.relabel.pod_logs.output
|
||||
forward_to = [loki.write.local_loki.receiver]
|
||||
|
|
|
@ -20,7 +20,7 @@ spec:
|
|||
- |
|
||||
set -e
|
||||
mkdir -p /var/log/openbao
|
||||
chown 100:100 /var/log/openbao
|
||||
chown 100:100 /var/log/openbao
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
|
@ -29,7 +29,7 @@ spec:
|
|||
containers:
|
||||
- name: running-container
|
||||
image: busybox
|
||||
command: ["sleep", "2"]
|
||||
command: ["sleep", "infinity"]
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumes:
|
||||
|
|
|
@ -5,6 +5,8 @@ metadata:
|
|||
namespace: openbao
|
||||
spec:
|
||||
schedule: "0 * * * *"
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 1
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
|
|
Loading…
Reference in a new issue