-
Notifications
You must be signed in to change notification settings - Fork 94
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
THREESCALE-10709 update monitoring stack deployment to use THANOS_QUERIER_BEARER_TOKEN #925
THREESCALE-10709 update monitoring stack deployment to use THANOS_QUERIER_BEARER_TOKEN #925
Conversation
3c1bf58
to
5fe63e2
Compare
…RIER_BEARER_TOKEN
5fe63e2
to
d00836d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few small comments but overall looks good to me
$ SECRET=`oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1 }'` | ||
# Get the THANOS_QUERIER_BEARER_TOKEN using the SECRET name | ||
$ oc get secret $SECRET -n openshift-user-workload-monitoring -o jsonpath="{.data.token}" | base64 -d | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary extra line looks odd when markdown is rendered.
Get basic auth password `basicAuthPassword` from `ns/openshift-monitoring/secrets/grafana-datasources-v2/prometheus.yaml` and update `3scale-scrape-configs.yaml` basic auth field. | ||
```bash | ||
# Get the SECRET name that contains the THANOS_QUERIER_BEARER_TOKEN | ||
$ SECRET=`oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1 }'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ SECRET=`oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1 }'` | |
SECRET=`oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1 }'` |
It makes it easier to run the commands if the leading $
is removed.
# Get the SECRET name that contains the THANOS_QUERIER_BEARER_TOKEN | ||
$ SECRET=`oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1 }'` | ||
# Get the THANOS_QUERIER_BEARER_TOKEN using the SECRET name | ||
$ oc get secret $SECRET -n openshift-user-workload-monitoring -o jsonpath="{.data.token}" | base64 -d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ oc get secret $SECRET -n openshift-user-workload-monitoring -o jsonpath="{.data.token}" | base64 -d | |
oc get secret $SECRET -n openshift-user-workload-monitoring -o jsonpath="{.data.token}" | base64 -d |
It makes it easier to run the commands if the leading $
is removed.
|
||
Then create secret: | ||
|
||
``` | ||
```bash | ||
kubectl create secret generic additional-scrape-configs --from-file=3scale-scrape-configs.yaml=./3scale-scrape-configs.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubectl create secret generic additional-scrape-configs --from-file=3scale-scrape-configs.yaml=./3scale-scrape-configs.yaml | |
oc create secret generic additional-scrape-configs --from-file=3scale-scrape-configs.yaml=./3scale-scrape-configs.yaml |
Might be better to use oc
here to be consistent throughout
Code Climate has analyzed commit e7a053b and detected 0 issues on this pull request. View more on Code Climate. |
Reviewed changes |
Issue
https://issues.redhat.com/browse/THREESCALE-10709
What
The steps for getting openshift monitoring data in the readme have been out of date for some time
You can no longer use basic auth to scrape data from openshift-monitoring see OCP docs for more information here
updated the 3scale-scrape-configs.yaml to use bearer token
added steps to the Readme to get the THANOS_QUERIER_BEARER_TOKEN
Verification
Provision a 3scale instance from this branch and follow the readme to test the monitoring stack installation.