From 825ca29558f230dbd6c66868352a9b34d835d227 Mon Sep 17 00:00:00 2001 From: Ludovic Cleroux Date: Mon, 6 May 2024 15:31:19 -0400 Subject: [PATCH] ROX-24055: Annotations for cluster upgrades --- .../dashboards/rhacs-cluster-overview-configmap.yaml | 11 +++++++++++ .../dashboards/rhacs-cluster-overview-dashboard.yaml | 11 +++++++++++ resources/grafana/sources/rhacs-cluster-overview.json | 11 +++++++++++ scripts/generate-federate-match.sh | 6 +++++- 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml b/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml index 8c10d07c..f5155355 100644 --- a/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml +++ b/resources/grafana/generated/dashboards/rhacs-cluster-overview-configmap.yaml @@ -29,6 +29,17 @@ data: "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "expr": "count by(cluster) (count by (git_version, cluster) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1", + "iconColor": "purple", + "name": "Upgrade", + "textFormat": "Kubernetes Upgrade" } ] }, diff --git a/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml b/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml index e7e3091e..73e7cab9 100644 --- a/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml +++ b/resources/grafana/generated/dashboards/rhacs-cluster-overview-dashboard.yaml @@ -29,6 +29,17 @@ spec: "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "expr": "count by(cluster) (count by (git_version, cluster) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1", + "iconColor": "purple", + "name": "Upgrade", + "textFormat": "Kubernetes Upgrade" } ] }, diff --git a/resources/grafana/sources/rhacs-cluster-overview.json b/resources/grafana/sources/rhacs-cluster-overview.json index 0841eb42..e5768524 100644 --- a/resources/grafana/sources/rhacs-cluster-overview.json +++ b/resources/grafana/sources/rhacs-cluster-overview.json @@ -18,6 +18,17 @@ "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "expr": "count by(cluster) (count by (git_version, cluster) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1", + "iconColor": "purple", + "name": "Upgrade", + "textFormat": "Kubernetes Upgrade" } ] }, diff --git a/scripts/generate-federate-match.sh b/scripts/generate-federate-match.sh index f6c57feb..cc5a29cc 100755 --- a/scripts/generate-federate-match.sh +++ b/scripts/generate-federate-match.sh @@ -1,7 +1,11 @@ #!/usr/bin/env bash set -eou pipefail -shopt -s inherit_errexit + +# only if not OSX +if [[ $(uname) != "Darwin" ]]; then + shopt -s inherit_errexit +fi function log() { echo "$@" >&2