add prometheus-operator-agent replace observability-agent/prometheus

This commit is contained in:
Haitao Pan 2023-12-21 20:52:08 +08:00
parent 981135eaa7
commit 2cb9feb1c3
5 changed files with 61 additions and 15 deletions

View File

@ -1,8 +0,0 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: stable
namespace: monitoring
spec:
interval: 1m
url: https://charts.onwalk.net/

View File

@ -2,6 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
resources:
- namespace.yaml
- helmrepo.yaml
- observability-agent.yaml
- prometheus-operator-agent.yaml

View File

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring

View File

@ -1,3 +1,17 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: stable
namespace: monitoring
spec:
interval: 1m
url: https://charts.onwalk.net/
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
@ -22,7 +36,7 @@ spec:
- 10.0.1.3
deepflowK8sClusterID: d-rUJ4CUKMUt
prometheus:
enabled: true
enabled: false
server:
extraFlags:
- enable-feature=expand-external-labels

View File

@ -0,0 +1,45 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: prometheus-community
namespace: monitoring
spec:
interval: 1m
url: https://prometheus-community.github.io/helm-charts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: observabilityagent
namespace: monitoring
spec:
chart:
spec:
chart: kube-prometheus-stack
version: "55.5.0"
sourceRef:
kind: HelmRepository
name: prometheus-community
namespace: monitoring
interval: 1m
values:
prometheusOperator:
enabled: true
crds:
enabled: true
prometheus:
enabled: true
agentMode: true
prometheusSpec:
remoteWrite:
- name: remote_prometheus
url: 'https://prometheus.svc.ink/api/v1/write'
grafana:
enabled: false
prometheus-windows-exporter:
enabled: false