From ee5916307eda4e6c24c8ade11d3adc509cd4468a Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 19 Dec 2023 17:44:58 +0800 Subject: [PATCH] add clusters/monitor observability-agent config --- clusters/monitor/helmrepo.yaml | 8 +++++ clusters/monitor/kustomization.yaml | 7 +++++ clusters/monitor/namespace.yaml | 4 +++ clusters/monitor/observability-agent.yaml | 36 +++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 clusters/monitor/helmrepo.yaml create mode 100644 clusters/monitor/kustomization.yaml create mode 100644 clusters/monitor/namespace.yaml create mode 100644 clusters/monitor/observability-agent.yaml diff --git a/clusters/monitor/helmrepo.yaml b/clusters/monitor/helmrepo.yaml new file mode 100644 index 0000000..1b83e6e --- /dev/null +++ b/clusters/monitor/helmrepo.yaml @@ -0,0 +1,8 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: stable + namespace: monitoring +spec: + interval: 1m + url: https://charts.onwalk.net/ diff --git a/clusters/monitor/kustomization.yaml b/clusters/monitor/kustomization.yaml new file mode 100644 index 0000000..433cd6d --- /dev/null +++ b/clusters/monitor/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: monitoring +resources: + - namespace.yaml + - helmrepo.yaml + - observability-agent.yaml diff --git a/clusters/monitor/namespace.yaml b/clusters/monitor/namespace.yaml new file mode 100644 index 0000000..d325236 --- /dev/null +++ b/clusters/monitor/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: monitoring diff --git a/clusters/monitor/observability-agent.yaml b/clusters/monitor/observability-agent.yaml new file mode 100644 index 0000000..949243f --- /dev/null +++ b/clusters/monitor/observability-agent.yaml @@ -0,0 +1,36 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: observabilityagent + namespace: monitoring +spec: + chart: + spec: + chart: observabilityagent + version: "0.1.6" + sourceRef: + kind: HelmRepository + name: stable + namespace: monitoring + interval: 1m + values: + deepflow-agent: + enabled: false + prometheus: + enabled: true + server: + extraFlags: + - enable-feature=expand-external-labels + - web.enable-lifecycle + remoteWrite: + - name: remote_prometheus + url: 'https://prometheus.svc.plus/api/v1/write' + alertmanager: + enabled: false + rometheus-pushgateway: + enabled: false + promtail: + enabled: true + config: + clients: + - url: https://data-gateway.svc.plus/loki/api/v1/push