sidecar container added
This commit is contained in:
parent
29d4ca9fe6
commit
e2ad485759
2 changed files with 53 additions and 1 deletions
|
@ -32,3 +32,38 @@ spec:
|
|||
kind: MutatingWebhookConfiguration
|
||||
jqPathExpressions:
|
||||
- .webhooks[]?.clientConfig.caBundle
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: sidecar-container-alloy-config
|
||||
data:
|
||||
config.yaml: |
|
||||
logging {
|
||||
level = "info"
|
||||
format = "logfmt"
|
||||
}
|
||||
|
||||
loki.write "local_loki" {
|
||||
endpoint {
|
||||
url = "http://loki-loki-distributed-gateway/loki/api/v1/push"
|
||||
}
|
||||
}
|
||||
|
||||
discovery.kubernetes "pod" {
|
||||
role = "pod"
|
||||
}
|
||||
|
||||
discovery.relabel "openbao_pod_logs" {
|
||||
targets = discovery.kubernetes.pod.targets
|
||||
|
||||
rule {
|
||||
source_labels = ["__meta_kubernetes_pod_name"]
|
||||
action = "keep"
|
||||
regex = "openbao-0"
|
||||
}
|
||||
|
||||
forward_to = [loki.write.local_loki.receiver]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
server:
|
||||
extraContainers:
|
||||
- name: grafana-alloy
|
||||
image: grafana/alloy:latest
|
||||
ports:
|
||||
- containerPort: 12345
|
||||
volumeMounts:
|
||||
- name: sidecar-container-alloy-config
|
||||
mountPath: /etc/alloy
|
||||
subPath: config.yaml
|
||||
args:
|
||||
- --config.file=/etc/alloy/config.yaml
|
||||
|
||||
extraVolumes:
|
||||
- name: sidecar-container-alloy-config
|
||||
configMap:
|
||||
name: sidecar-container-alloy-config
|
||||
|
||||
postStart:
|
||||
- sh
|
||||
- -c
|
||||
|
@ -16,4 +33,4 @@ server:
|
|||
bao audit enable file file_path=stdout
|
||||
rm /tmp/init.txt
|
||||
ui:
|
||||
enabled: true
|
||||
enabled: true
|
Loading…
Reference in a new issue