Skip to content

Commit

Permalink
feat: add flux PodMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao committed Mar 26, 2024
1 parent 376d630 commit 431a12b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kubernetes/flux/config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./flux.yaml
- ./cluster.yaml
- ./flux.yaml
- ./podmonitor.yaml
- ./telegram-provider.yaml
30 changes: 30 additions & 0 deletions kubernetes/flux/config/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: flux-system
namespace: flux-system
labels:
app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring
spec:
namespaceSelector:
matchNames:
- flux-system
selector:
matchExpressions:
- key: app
operator: In
values:
- helm-controller
- source-controller
- kustomize-controller
- notification-controller
- image-automation-controller
- image-reflector-controller
podMetricsEndpoints:
- port: http-prom
relabelings:
# https://github.com/prometheus-operator/prometheus-operator/issues/4816
- sourceLabels: [__meta_kubernetes_pod_phase]
action: keep
regex: Running

0 comments on commit 431a12b

Please sign in to comment.