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/granular dashboards #28

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ annotations:
catalog.cattle.io/display-name: CaaS Cluster Monitoring V3
name: caas-cluster-monitoring
description: A Helm chart for Rancher Cluster Monitoring V3
version: "0.0.14-rc9"
version: "0.0.14-rc10"
appVersion: "58.4.0"
icon: https://raw.githubusercontent.com/caas-team/caas-project-monitoring/main/logo.png
keywords:
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ The installation can be configured using the various parameters defined in the `
| `caas.defaultEgress` | bool | `false` | whether the cluster needs defaultEgress installed |
| `caas.dynatrace` | bool | `true` | whether a dynatrace ingress policy for kube-state-metrics is needed |
| `caas.fullnameOverride` | string | `""` | |
| `caas.grafana.configmaps` | bool | `false` | |
| `caas.grafana.dashboards.longhorn` | bool | `true` | whether to deploy the rancher longhorn dashboard |
| `caas.grafana.dashboards.nginxIngress` | bool | `true` | whether to deploy the nginx ingress controller dashboard |
| `caas.grafana.dashboards.rancherCluster` | bool | `true` | whether to deploy the rancher cluster dashboards |
| `caas.grafana.dashboards.rancherHome` | bool | `true` | whether to deploy the rancher home dashboard |
| `caas.grafana.dashboards.rancherK8sComponents` | bool | `true` | whether to deploy the rancher k8s components dashboard |
| `caas.grafana.dashboards.rancherNodes` | bool | `true` | whether to deploy the rancher nodes dashboard |
| `caas.grafana.dashboards.rancherPerformance` | bool | `true` | whether to deploy the rancher performance dashboard |
| `caas.grafana.dashboards.rancherPods` | bool | `true` | whether to deploy the rancher pods dashboard |
| `caas.grafana.dashboards.rancherWorkloads` | bool | `true` | whether to deploy the rancher workloads dashboard |
| `caas.longhorn` | bool | `true` | whether a longhorn network egress policy is needed for longhorn monitoring |
| `caas.nameOverride` | string | `""` | |
| `caas.namespaceOverride` | string | `""` | overrides the default namespace for caas related resources |
Expand Down
93 changes: 91 additions & 2 deletions templates/grafana-dashboards.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,98 @@
---
{{ if .Values.caas.grafana.dashboards.nginxIngress }}
apiVersion: v1
kind: ConfigMap
metadata:
name: rancher-monitoring-dashboards
name: dashboards-ingress-nginx
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/**").AsConfig | indent 2 }}
{{ (.Files.Glob "files/ingress-nginx/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherCluster }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-cluster
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/cluster/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherHome }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-home
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/home/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherK8sComponents }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-k8s-components
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/k8s/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherNodes }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-nodes
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/nodes/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherPerformance }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-performance
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/performance/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherPods }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-pods
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/pods/*").AsConfig | indent 2 }}
{{ end }}
---
{{ if .Values.caas.grafana.dashboards.rancherWorkloads }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-rancher-workloads
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/rancher/workloads/*").AsConfig | indent 2 }}
{{ end }}
{{ if .Values.caas.grafana.dashboards.longhorn }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dashboards-longhorn
labels:
grafana_dashboard: "1"
data:
{{ (.Files.Glob "files/longhorn/*").AsConfig | indent 2 }}
{{ end }}
25 changes: 20 additions & 5 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ caas:
# -- whether a longhorn network egress policy is needed for longhorn monitoring
longhorn: true
fullnameOverride: ""
# deploy additional nginx.conf and dashboard for Grafana, mostly covered from Rancher
# beware of the defaultDashboardsEnabled in kube-prometheus-stack
grafana:
configmaps: false
Comment on lines -17 to -18
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, this value wasn't used anymore 🤷

nameOverride: ""
# -- overrides the default namespace for caas related resources
namespaceOverride: ""
Expand All @@ -27,7 +23,26 @@ caas:
serviceAccount:
create: true
name: rancher-monitoring

grafana:
dashboards:
# -- whether to deploy the nginx ingress controller dashboard
nginxIngress: true
# -- whether to deploy the rancher cluster dashboards
rancherCluster: true
# -- whether to deploy the rancher home dashboard
rancherHome: true
# -- whether to deploy the rancher k8s components dashboard
rancherK8sComponents: true
# -- whether to deploy the rancher nodes dashboard
rancherNodes: true
# -- whether to deploy the rancher performance dashboard
rancherPerformance: true
# -- whether to deploy the rancher pods dashboard
rancherPods: true
# -- whether to deploy the rancher workloads dashboard
rancherWorkloads: true
# -- whether to deploy the rancher longhorn dashboard
longhorn: true
global:
cattle:
clusterId: local
Expand Down
Loading