Skip to content

Commit

Permalink
Fix querying OpenShift user workload monitoring stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
IshwarKanse committed May 23, 2024
1 parent 4ef2d6f commit 5d04173
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ scorecard-tests: operator-sdk
.PHONY: container
container: GOOS = linux
container: manager
docker build -t ${IMG} .
docker buildx build --load --platform linux/${ARCH} -t ${IMG} .

# Push the container image, used only for local dev purposes
.PHONY: container-push
Expand All @@ -311,12 +311,12 @@ container-operator-opamp-bridge-push:
.PHONY: container-target-allocator
container-target-allocator: GOOS = linux
container-target-allocator: targetallocator
docker build -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator
docker buildx build --load --platform linux/${ARCH} -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator

.PHONY: container-operator-opamp-bridge
container-operator-opamp-bridge: GOOS = linux
container-operator-opamp-bridge: operator-opamp-bridge
docker build -t ${OPERATOROPAMPBRIDGE_IMG} cmd/operator-opamp-bridge
docker buildx build --load --platform linux/${ARCH} -t ${OPERATOROPAMPBRIDGE_IMG} cmd/operator-opamp-bridge

.PHONY: start-kind
start-kind: kind
Expand Down Expand Up @@ -479,7 +479,7 @@ reset: kustomize operator-sdk manifests
# Build the bundle image, used only for local dev purposes
.PHONY: bundle-build
bundle-build:
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
docker buildx build --load --platform linux/${ARCH} -f bundle.Dockerfile -t $(BUNDLE_IMG) .

.PHONY: bundle-push
bundle-push:
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e-openshift/monitoring/check_metrics.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1}')
TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d)
TOKEN=$(oc create token prometheus-user-workload -n openshift-user-workload-monitoring)
THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host')

#Check metrics for OpenTelemetry collector instance.
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1}')
TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d)
TOKEN=$(oc create token prometheus-user-workload -n openshift-user-workload-monitoring)
THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host')

while true; do
Expand Down

0 comments on commit 5d04173

Please sign in to comment.