Skip to content

Commit af37997

Browse files
committed
create all grafana objects in correct namespace
1 parent ca4f184 commit af37997

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/install-px

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ kubectl-pxc config cluster set --portworx-service-namespace=portworx
141141

142142
# Install Grafana
143143
if [ $platform = ocp4 ]; then
144-
kubectl apply -f <(curl -s https://docs.portworx.com/samples/portworx-enterprise/k8s/pxc/grafana-service-account.yaml | sed s/kube-system/portworx/)
144+
kubectl apply -n portworx -f https://docs.portworx.com/samples/portworx-enterprise/k8s/pxc/grafana-service-account.yaml
145145
oc -n portworx adm policy add-cluster-role-to-user cluster-monitoring-view -z grafana
146146
TOKEN=$(oc -n portworx create token grafana --duration=8760h)
147147
THANOS=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host')
148148
kubectl -n portworx create configmap grafana-source-config --from-file=grafana-datasource-ocp.yaml=<(curl -s https://docs.portworx.com/samples/portworx-enterprise/k8s/pxc/grafana-datasource-ocp.yaml | sed "s/<THANOS_QUERIER_HOST>/$THANOS/;s/<BEARER_TOKEN>/$TOKEN/g")
149-
kubectl apply -f <(curl -s https://docs.portworx.com/samples/portworx-enterprise/k8s/pxc/grafana-ocp.yaml | sed s/kube-system/portworx/)
149+
kubectl apply -n portworx -f https://docs.portworx.com/samples/portworx-enterprise/k8s/pxc/grafana-ocp.yaml
150150
# enable OCP4 console plugin
151151
kubectl patch console.operator cluster --type json -p '[{"op": "add", "path": "/spec/plugins/-", "value": "portworx"}]'
152152
else

0 commit comments

Comments
 (0)