-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCTOPUS-596: refactor the NodePort scripts and tests for power workloads
Signed-off-by: Paul Bastide <[email protected]>
- Loading branch information
Showing
3 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: runner | ||
labels: | ||
app: power-net-workload | ||
spec: | ||
containers: | ||
- name: runner | ||
image: quay.io/centos/centos:stream9 | ||
imagePullPolicy: Always | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- ppc64le | ||
command: ["/bin/sleep"] | ||
args: ["infinity"] | ||
resources: | ||
limits: | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
securityContext: | ||
privileged: false | ||
seccompProfile: | ||
type: RuntimeDefault | ||
capabilities: | ||
drop: | ||
- ALL | ||
runAsNonRoot: true | ||
readOnlyRootFilesystem: true | ||
allowPrivilegeEscalation: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The default port range is 30000-32767 | ||
# https://docs.openshift.com/container-platform/4.15/networking/configuring-node-port-service-range.html | ||
for PORT in echo {30000..32767} | ||
do | ||
echo "\nTESTING PORT: ${PORT}" | ||
cat pod-service.yaml | sed 's|30007|'${PORT}'|g' | oc apply -f - | ||
echo "waiting 10 seconds" | ||
sleep 10 | ||
|
||
for TRY in echo {0..5} | ||
do | ||
echo "TRY: ${TRY}" | ||
echo "Putting a debug pod on the opposite - powerworker" | ||
oc apply -f pod-debug-run.yaml | ||
sleep 1 | ||
|
||
oc rsh pod/runner curl http://power-net-workload-svc.openshift-net-workload.svc.cluster.local:8080/status -k | ||
[ $? -eq 1 ] && echo "Failed to curl" | ||
done | ||
done |