feat/cluster-dashboard #250
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/cluster-dashboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a
ClusterDashboardsScorethat deploys a complete Grafana observability stack — operator, instance, Prometheus datasource, and 8 pre-built OKD/k8s monitoring dashboards — as a single score. Includes infrastructure improvements to make Grafana installation portable across OpenShift and plain Kubernetes.What's included
Cluster dashboards (
ClusterDashboardsScore)Grafana operator install (
GrafanaOperatorScore)chart_versionparameterHelm improvements (
HelmChartInterpret)HelmChartScoreusersCRD audit (
crd_grafana.rs)GrafanaSpecto match the real upstreamgrafanas.grafana.integreatly.org/v1beta1schema (verified against the live CRD)admin_user/admin_passwordat top-level,persistence,resources, typedGrafanaConfig).spec.configasBTreeMap<String, BTreeMap<String, String>>(matching the upstream map-of-maps forgrafana.ini)deployment,route, andingresssub-treesrhob_grafana.rsas a stale duplicateDomain resolution (
K8sClient::get_domain)K8sAnywhereTopologytoK8sClientso bothK8sAnywhereTopologyandHAClusterTopologycan resolve hostnames without extra trait boundsExamples
examples/grafana/— standalone Grafana operator install with pinned chart versionexamples/cluster_dashboards/— deploysClusterDashboardsScorewith default settings- Add `examples/grafana` demonstrating a standalone Grafana install via the existing helm-chart score, with chart version pinned and an env.sh - Add `chart_version` parameter to `grafana_helm_chart_score` - Introduce `GrafanaOperatorScore`: composite score that auto-detects OpenShift (via `K8sClient::get_k8s_distribution`) and applies the `route.openshift.io` ClusterRole/Binding the operator needs before running the helm install - Make `HelmChartInterpret` idempotent on re-run: if the release is already at the requested chart version, warn and skip; if at a different version, refuse rather than silently upgrade - Hand Route ownership to grafana-operator in `ClusterDashboardsScore` by adding `.spec.route` to the Grafana CR and dropping the manual Route creation - Rename the Grafana-to-Prometheus ServiceAccount from `cluster-grafana-sa` to `grafana-prometheus-datasource-sa` to avoid a collision with the SA grafana-operator creates for the Grafana pod- Rewrite `GrafanaSpec` to match the real `grafanas.grafana.integreatly.org/v1beta1` schema (verified against the live CRD). Drop non-existent fields (top-level `admin_user`/ `admin_password`, `ingress{enabled,hosts}`, `persistence`, top-level `resources`). Model `.spec.config` as nested `BTreeMap` to preserve arbitrary `grafana.ini` sections (including `auth.anonymous`). Add narrow `deployment` and `route` sub-trees. - Replace raw-YAML + `apply_dynamic` in `cluster_dashboards` with typed CRs applied via `K8sResourceScore::single`. Migrate the two all-`None` `GrafanaSpec` call sites to `GrafanaSpec::default()`. - Flag `rhob_grafana.rs` as a stale duplicate with a module-level warning; keep it in place since its only caller passes all `None`.- Move domain-resolution logic from `K8sAnywhereTopology::get_domain` to `K8sClient::get_domain()` in `harmony-k8s` so both `K8sAnywhereTopology` and `HAClusterTopology` can resolve hostnames without requiring the `Ingress` trait bound. - `ClusterDashboardsScore::create_grafana` now auto-detects the k8s distribution: OpenShift → `.spec.route` on the Grafana CR (as before), non-OpenShift → `.spec.ingress` with hostname from `K8sClient::get_domain`. - Add typed `GrafanaIngress` sub-tree to `crd_grafana.rs` matching the upstream CRD's standard k8s IngressSpec shape. - `K8sAnywhereTopology::get_domain` retains its k3d shortcut, then delegates to the client for all other cases.