Skip to content

Commit 1932a28

Browse files
authored
update grafana installation script and yaml files for OCP (#536)
This commit fixes three issues in the graphana installation 1) it updates the paths to reflect the new project filesystem layout introduced with PR #449 2) fix the ServiceMonitor port to point to the kepler service port name rather than the service name 3) update the README to reflect the script should be run in the top level of the repo (due to its prepending of `pwd` to the paths)
1 parent ef0ff97 commit 1932a28

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

manifests/config/dashboard/00-servicemonitoring-kepler.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
spec:
99
endpoints:
1010
- interval: 15s
11-
port: kepler-exporter
11+
port: http
1212
scheme: http
1313
selector:
1414
matchLabels:

manifests/config/dashboard/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The following cmd will:
77
- Define Prometheus datasource
88
- Define Grafana dashboard
99

10+
It should be run from the top level of the repository
1011
```bash
11-
$(pwd)/deploy-grafana.sh
12+
manifests/config/dashboard/deploy-grafana.sh
1213
```

manifests/config/dashboard/deploy-grafana.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
## Installs Grafana community operator
77
## Creates Grafana instance
88

9-
oc apply --kustomize $(pwd)/manifests/openshift/dashboard
9+
oc apply --kustomize $(pwd)/manifests/config/dashboard
1010
while ! oc get grafana --all-namespaces
1111
do
1212
echo waiting for grafana custom resource definition to register
1313
sleep 5
1414
done
15-
oc apply -f $(pwd)/manifests/openshift/dashboard/02-grafana-instance.yaml
16-
oc apply -f $(pwd)/manifests/openshift/dashboard/02-grafana-sa.yaml
17-
oc apply -f $(pwd)/manifests/openshift/dashboard/03-grafana-sa-token-secret.yaml
15+
oc apply -f $(pwd)/manifests/config/dashboard/02-grafana-instance.yaml
16+
oc apply -f $(pwd)/manifests/config/dashboard/02-grafana-sa.yaml
17+
oc apply -f $(pwd)/manifests/config/dashboard/03-grafana-sa-token-secret.yaml
1818

1919
SERVICE_ACCOUNT=grafana-serviceaccount
2020
SECRET=grafana-sa-token
@@ -44,7 +44,7 @@ do
4444
done
4545

4646
# Deploy from updated manifest
47-
envsubst < $(pwd)/manifests/openshift/dashboard/03-grafana-datasource-UPDATETHIS.yaml | oc apply -f -
47+
envsubst < $(pwd)/manifests/config/dashboard/03-grafana-datasource-UPDATETHIS.yaml | oc apply -f -
4848

4949
# Define Grafana dashboard
5050
while ! oc get grafanadashboard --all-namespaces;
@@ -53,4 +53,4 @@ do
5353
echo waiting for grafandashboard custom resource definition to register
5454
done
5555

56-
oc apply -f $(pwd)/manifests/openshift/dashboard/04-grafana-dashboard.yaml
56+
oc apply -f $(pwd)/manifests/config/dashboard/04-grafana-dashboard.yaml

0 commit comments

Comments
 (0)