Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Setup system metrics collection (host, k8s, cilium, kubevirt) #95

Merged
merged 21 commits into from
Jan 23, 2025
1 change: 1 addition & 0 deletions flux/components/kubevirt/app/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- https://github.com/kubevirt/containerized-data-importer/releases/download/v1.61.0/cdi-operator.yaml
- https://github.com/kubevirt/containerized-data-importer/releases/download/v1.61.0/cdi-cr.yaml
- disable-selinux.yml
- service-monitor.yml
patches:
- target:
kind: Deployment
Expand Down
17 changes: 17 additions & 0 deletions flux/components/kubevirt/app/service-monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: kubevirt
namespace: kubevirt
labels:
app.kubernetes.io/part-of: kubevirt
app.kubernetes.io/component: monitoring
spec:
selector:
matchLabels:
prometheus.kubevirt.io: "true"
endpoints:
- port: metrics
scheme: https
tlsConfig:
insecureSkipVerify: true
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ configMapGenerator:
- dashboards/cluster.json
- dashboards/logs.json
options:
annotations:
grafana_folder: "Flux"
labels:
grafana_dashboard: "1"
app.kubernetes.io/part-of: flux
Expand Down
32 changes: 32 additions & 0 deletions flux/monitoring/configs/kubernetes/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
generatorOptions:
disableNameSuffixHash: true
labels:
grafana_dashboard: "1"
app.kubernetes.io/component: monitoring
app.kubernetes.io/part-of: kubernetes
commonAnnotations:
grafana_folder: "Kubernetes"

configMapGenerator:
- name: dashboards-k8s-views-global
files:
- https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/refs/tags/v2.5.3/dashboards/k8s-views-global.json

- name: dashboards-k8s-views-namespaces
files:
- https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/refs/tags/v2.5.3/dashboards/k8s-views-namespaces.json

- name: dashboards-k8s-views-nodes
files:
- https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/refs/tags/v2.5.3/dashboards/k8s-views-nodes.json

- name: dashboards-k8s-views-pods
files:
- https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/refs/tags/v2.5.3/dashboards/k8s-views-pods.json

- name: dashboards-k8s-kubevirt
files:
- https://raw.githubusercontent.com/aenix-io/cozystack/refs/tags/v0.23.1/dashboards/kubevirt/kubevirt-control-plane.json
7 changes: 7 additions & 0 deletions flux/monitoring/configs/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: monitoring
resources:
- flux
- system
- kubernetes
Loading
Loading