update alloy configuration with configmap.yaml
This commit is contained in:
parent
fcf742127f
commit
ab6f9ea673
29
v2-configmap-yaml/alloy-configmap.yaml
Normal file
29
v2-configmap-yaml/alloy-configmap.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
name: alloy-config
|
||||||
|
|
||||||
|
data:
|
||||||
|
config.alloy: |-
|
||||||
|
// 여기서부터 컴포넌트 코드 작성
|
||||||
|
// Alloy 에서는 //, /* */를 주석으로 사용합니다.
|
||||||
|
discovery.kubernetes "kube_system_pods" {
|
||||||
|
role = "pod"
|
||||||
|
|
||||||
|
namespaces {
|
||||||
|
names = ["kube-system"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loki.source.kubernetes "kube_system_pods" {
|
||||||
|
targets = discovery.kubernetes.kube_system_pods.targets
|
||||||
|
forward_to = [loki.write.loki_instance.receiver]
|
||||||
|
}
|
||||||
|
|
||||||
|
loki.write "loki_instance" {
|
||||||
|
endpoint {
|
||||||
|
url = "<LOKI_ENDPOINT>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
8
v2-configmap-yaml/helm-values.yaml
Normal file
8
v2-configmap-yaml/helm-values.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
alloy:
|
||||||
|
resources: {} # resource 설정 가능
|
||||||
|
|
||||||
|
configMap:
|
||||||
|
create: false
|
||||||
|
name: alloy-config
|
||||||
|
key: config.alloy
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user