From 1aca8fa856bd4c1d1b58972c7c78266e8478a30c Mon Sep 17 00:00:00 2001 From: auricom Date: Sat, 24 Apr 2021 01:39:11 +0200 Subject: [PATCH] feat: add flux monitoring --- .../infrastructure/flux/kustomization.yaml | 1 + .../helm-controller/kustomization.yaml | 4 ++++ .../monitoring/helm-controller/podmonitor.yaml | 18 ++++++++++++++++++ .../flux/monitoring/kustomization.yaml | 7 +++++++ .../kustomize-controller/kustomization.yaml | 4 ++++ .../kustomize-controller/podmonitor.yaml | 18 ++++++++++++++++++ .../notification-controller/kustomization.yaml | 4 ++++ .../notification-controller/podmonitor.yaml | 18 ++++++++++++++++++ .../source-controller/kustomization.yaml | 4 ++++ .../source-controller/podmonitor.yaml | 18 ++++++++++++++++++ 10 files changed, 96 insertions(+) create mode 100644 cluster/core/infrastructure/flux/monitoring/helm-controller/kustomization.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/helm-controller/podmonitor.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/kustomization.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/kustomize-controller/kustomization.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/kustomize-controller/podmonitor.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/notification-controller/kustomization.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/notification-controller/podmonitor.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/source-controller/kustomization.yaml create mode 100644 cluster/core/infrastructure/flux/monitoring/source-controller/podmonitor.yaml diff --git a/cluster/core/infrastructure/flux/kustomization.yaml b/cluster/core/infrastructure/flux/kustomization.yaml index e2ace2e4f..82bc82c76 100644 --- a/cluster/core/infrastructure/flux/kustomization.yaml +++ b/cluster/core/infrastructure/flux/kustomization.yaml @@ -1,4 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - monitoring - notifications diff --git a/cluster/core/infrastructure/flux/monitoring/helm-controller/kustomization.yaml b/cluster/core/infrastructure/flux/monitoring/helm-controller/kustomization.yaml new file mode 100644 index 000000000..82f399cdd --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/helm-controller/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- podmonitor.yaml \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/helm-controller/podmonitor.yaml b/cluster/core/infrastructure/flux/monitoring/helm-controller/podmonitor.yaml new file mode 100644 index 000000000..861f1684d --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/helm-controller/podmonitor.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: helm-controller + namespace: flux-system + labels: + app.kubernetes.io/instance: flux-system + app.kubernetes.io/version: latest +spec: + namespaceSelector: + matchNames: + - flux-system + selector: + matchLabels: + app: helm-controller + podMetricsEndpoints: + - port: http-prom \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/kustomization.yaml b/cluster/core/infrastructure/flux/monitoring/kustomization.yaml new file mode 100644 index 000000000..94f7d22a7 --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- helm-controller +- kustomize-controller +- notification-controller +- source-controller \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/kustomize-controller/kustomization.yaml b/cluster/core/infrastructure/flux/monitoring/kustomize-controller/kustomization.yaml new file mode 100644 index 000000000..82f399cdd --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/kustomize-controller/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- podmonitor.yaml \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/kustomize-controller/podmonitor.yaml b/cluster/core/infrastructure/flux/monitoring/kustomize-controller/podmonitor.yaml new file mode 100644 index 000000000..98850eefb --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/kustomize-controller/podmonitor.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: kustomize-controller + namespace: flux-system + labels: + app.kubernetes.io/instance: flux-system + app.kubernetes.io/version: latest +spec: + namespaceSelector: + matchNames: + - flux-system + selector: + matchLabels: + app: kustomize-controller + podMetricsEndpoints: + - port: http-prom \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/notification-controller/kustomization.yaml b/cluster/core/infrastructure/flux/monitoring/notification-controller/kustomization.yaml new file mode 100644 index 000000000..82f399cdd --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/notification-controller/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- podmonitor.yaml \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/notification-controller/podmonitor.yaml b/cluster/core/infrastructure/flux/monitoring/notification-controller/podmonitor.yaml new file mode 100644 index 000000000..52f21474b --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/notification-controller/podmonitor.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: notification-controller + namespace: flux-system + labels: + app.kubernetes.io/instance: flux-system + app.kubernetes.io/version: latest +spec: + namespaceSelector: + matchNames: + - flux-system + selector: + matchLabels: + app: notification-controller + podMetricsEndpoints: + - port: http-prom \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/source-controller/kustomization.yaml b/cluster/core/infrastructure/flux/monitoring/source-controller/kustomization.yaml new file mode 100644 index 000000000..82f399cdd --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/source-controller/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- podmonitor.yaml \ No newline at end of file diff --git a/cluster/core/infrastructure/flux/monitoring/source-controller/podmonitor.yaml b/cluster/core/infrastructure/flux/monitoring/source-controller/podmonitor.yaml new file mode 100644 index 000000000..475e8722e --- /dev/null +++ b/cluster/core/infrastructure/flux/monitoring/source-controller/podmonitor.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: source-controller + namespace: flux-system + labels: + app.kubernetes.io/instance: flux-system + app.kubernetes.io/version: latest +spec: + namespaceSelector: + matchNames: + - flux-system + selector: + matchLabels: + app: source-controller + podMetricsEndpoints: + - port: http-prom \ No newline at end of file