Skip to content

Commit

Permalink
chore(RHIDP-2120): Add resoruces for running performance test for Dev…
Browse files Browse the repository at this point in the history
…eloper Sandbox (#56)

Signed-off-by: Pavel Macík <[email protected]>
  • Loading branch information
pmacik authored Jun 27, 2024
1 parent 27c9fa8 commit 32db348
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dev-sandbox/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM registry.access.redhat.com/ubi9/ubi

ENV RHDH_BASE_URL=localhost

RUN yum install -y jq && yum clean all

COPY mvp.sh /tmp/mvp.sh

CMD /tmp/mvp.sh
9 changes: 9 additions & 0 deletions dev-sandbox/mvp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

RHDH_BASE_URL=${RHDH_BASE_URL:-localhost}

curl="curl -sSL --insecure"

token=$($curl "${RHDH_BASE_URL}/api/auth/guest/refresh" | jq -r '.backstageIdentity.token')

$curl -H "Authorization: Bearer $token" "${RHDH_BASE_URL}/api/catalog/entities?filter=kind=api" | jq -r
21 changes: 21 additions & 0 deletions dev-sandbox/rhdh-perf.job.template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: Template
apiVersion: template.openshift.io/v1
metadata:
name: user-workloads
objects:
- apiVersion: batch/v1
kind: Job
metadata:
name: rhdh-perf
spec:
template:
spec:
containers:
- name: curl-container
image: quay.io/pmacik-testing/rhdh-perf-testing-client:v1.2
imagePullPolicy: Always
env:
- name: RHDH_BASE_URL
value: "${RHDH_URL}"
restartPolicy: Never
backoffLimit: 4

0 comments on commit 32db348

Please sign in to comment.