sidecar container detached
This commit is contained in:
parent
bb3c6cf438
commit
5c197fd0f1
2 changed files with 42 additions and 42 deletions
|
@ -1,26 +1,26 @@
|
||||||
apiVersion: v1
|
# apiVersion: v1
|
||||||
kind: ConfigMap
|
# kind: ConfigMap
|
||||||
metadata:
|
# metadata:
|
||||||
name: sidecar-container-alloy-config
|
# name: sidecar-container-alloy-config
|
||||||
data:
|
# data:
|
||||||
config.alloy: |
|
# config.alloy: |
|
||||||
logging {
|
# logging {
|
||||||
level = "info"
|
# level = "info"
|
||||||
format = "logfmt"
|
# format = "logfmt"
|
||||||
}
|
# }
|
||||||
|
|
||||||
loki.write "local_loki" {
|
# loki.write "local_loki" {
|
||||||
endpoint {
|
# endpoint {
|
||||||
url = "http://loki-loki-distributed-gateway.monitoring.svc.cluster.local/loki/api/v1/push"
|
# url = "http://loki-loki-distributed-gateway.monitoring.svc.cluster.local/loki/api/v1/push"
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
local.file_match "applogs" {
|
# local.file_match "applogs" {
|
||||||
path_targets = [{"__path__" = "/openbao/logs/*"}]
|
# path_targets = [{"__path__" = "/openbao/logs/*"}]
|
||||||
sync_period = "5s"
|
# sync_period = "5s"
|
||||||
}
|
# }
|
||||||
|
|
||||||
loki.source.file "openbao_logs" {
|
# loki.source.file "openbao_logs" {
|
||||||
targets = local.file_match.applogs.targets
|
# targets = local.file_match.applogs.targets
|
||||||
forward_to = [loki.write.local_loki.receiver]
|
# forward_to = [loki.write.local_loki.receiver]
|
||||||
}
|
# }
|
|
@ -1,25 +1,25 @@
|
||||||
server:
|
server:
|
||||||
extraContainers:
|
# extraContainers:
|
||||||
- name: grafana-alloy
|
# - name: grafana-alloy
|
||||||
image: grafana/alloy:latest
|
# image: grafana/alloy:latest
|
||||||
ports:
|
# ports:
|
||||||
- containerPort: 12345
|
# - containerPort: 12345
|
||||||
securityContext:
|
# securityContext:
|
||||||
runAsUser: 100
|
# runAsUser: 100
|
||||||
volumeMounts:
|
# volumeMounts:
|
||||||
- name: alloy-data
|
# - name: alloy-data
|
||||||
mountPath: /var/lib/alloy
|
# mountPath: /var/lib/alloy
|
||||||
- name: config-volume
|
# - name: config-volume
|
||||||
mountPath: /etc/alloy
|
# mountPath: /etc/alloy
|
||||||
- name: host-log-storage
|
# - name: host-log-storage
|
||||||
mountPath: /openbao/logs
|
# mountPath: /openbao/logs
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: alloy-data
|
# - name: alloy-data
|
||||||
emptyDir: {}
|
# emptyDir: {}
|
||||||
- name: config-volume
|
# - name: config-volume
|
||||||
configMap:
|
# configMap:
|
||||||
name: sidecar-container-alloy-config
|
# name: sidecar-container-alloy-config
|
||||||
- name: host-log-storage
|
- name: host-log-storage
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /var/log
|
path: /var/log
|
||||||
|
|
Loading…
Reference in a new issue