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

sync: stage to production #244

Merged
merged 8 commits into from
May 13, 2024
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions resources/grafana/sources/rhacs-central-slo.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"enable": true,
"iconColor": "purple",
"expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1",
"name": "Kubernetes Upgrade",
"textFormat": "Kubernetes Upgrade"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"enable": true,
"iconColor": "red",
"expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1",
"name": "OpenShift Upgrade",
"textFormat": "OpenShift Upgrade"
}
]
},
Expand Down
22 changes: 22 additions & 0 deletions resources/grafana/sources/rhacs-cluster-overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"enable": true,
"iconColor": "purple",
"expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1",
"name": "Kubernetes Upgrade",
"textFormat": "Kubernetes Upgrade"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"enable": true,
"iconColor": "red",
"expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1",
"name": "OpenShift Upgrade",
"textFormat": "OpenShift Upgrade"
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions resources/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"prometheus": {
"pod_monitors": [
"prometheus/pod_monitors/prometheus-self-metrics.yaml",
"prometheus/pod_monitors/rhacs-central-metrics.yaml",
"prometheus/pod_monitors/rhacs-cloudwatch-exporter.yaml",
"prometheus/pod_monitors/rhacs-fleetshard-sync-metrics.yaml",
"prometheus/pod_monitors/rhacs-scanner-metrics.yaml"
"prometheus/pod_monitors/rhacs-tenant-metrics.yaml"
],
"rules": [
"prometheus/billing-rules.yaml",
Expand Down
1 change: 1 addition & 0 deletions resources/prometheus/federation-config-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
match[]:
# This is an example.
- up{job!~"central|scanner"}
- openshift_apiserver_build_info
1 change: 1 addition & 0 deletions resources/prometheus/federation-config.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions resources/prometheus/pod_monitors/rhacs-scanner-metrics.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: rhacs-central-metrics
name: rhacs-tenant-metrics
labels:
app: rhacs
spec:
selector:
matchLabels:
app: "central"
app.kubernetes.io/name: stackrox
namespaceSelector:
any: true
podMetricsEndpoints:
Expand Down
6 changes: 5 additions & 1 deletion scripts/generate-federate-match.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down