diff --git a/kraken/prometheus/client.py b/kraken/prometheus/client.py index f29d5890..13dfa93f 100644 --- a/kraken/prometheus/client.py +++ b/kraken/prometheus/client.py @@ -11,6 +11,7 @@ def instance(distribution, prometheus_url, prometheus_bearer_token): if distribution == "openshift" and not prometheus_bearer_token: prometheus_bearer_token = runcommand.invoke( "oc -n openshift-monitoring sa get-token prometheus-k8s " - "|| oc create token -n openshift-monitoring prometheus-k8s" + "|| oc create token -n openshift-monitoring prometheus-k8s --duration=12h " + "|| oc sa new-token -n openshift-monitoring prometheus-k8s" ) return prometheus_url, prometheus_bearer_token