-
Notifications
You must be signed in to change notification settings - Fork 2.3k
WIP: add OpenPERouter baremetal E2E deploy-verify lane #83156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oribon
wants to merge
1
commit into
openshift:main
Choose a base branch
from
oribon:openperouter_e2e_step1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
10 changes: 10 additions & 0 deletions
10
ci-operator/step-registry/baremetalds/openperouter-e2e/OWNERS
This file contains hidden or 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,10 @@ | ||
| approvers: | ||
| - fedepaol | ||
| - maiqueb | ||
| - oribon | ||
| - zeeke | ||
| reviewers: | ||
| - fedepaol | ||
| - maiqueb | ||
| - oribon | ||
| - zeeke |
17 changes: 17 additions & 0 deletions
17
...registry/baremetalds/openperouter-e2e/baremetalds-openperouter-e2e-workflow.metadata.json
This file contains hidden or 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,17 @@ | ||
| { | ||
| "path": "baremetalds/openperouter-e2e/baremetalds-openperouter-e2e-workflow.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ], | ||
| "reviewers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ] | ||
| } | ||
| } |
20 changes: 20 additions & 0 deletions
20
...tor/step-registry/baremetalds/openperouter-e2e/baremetalds-openperouter-e2e-workflow.yaml
This file contains hidden or 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,20 @@ | ||
| workflow: | ||
| as: baremetalds-openperouter-e2e | ||
| steps: | ||
| pre: | ||
| - ref: ofcir-acquire | ||
| - ref: ipi-install-rbac | ||
| - ref: baremetalds-devscripts-ibm | ||
| - ref: baremetalds-devscripts-proxy | ||
| - ref: ipi-install-hosted-loki | ||
| - ref: rhcos-conf-osstream | ||
| - ref: baremetalds-openperouter-e2e-iptables | ||
| - ref: baremetalds-devscripts-setup | ||
| test: | ||
| - ref: baremetalds-openperouter-e2e-test | ||
| post: | ||
| - chain: baremetalds-ofcir-post | ||
| documentation: |- | ||
| Deploy OpenPerOuter on a baremetal OCP cluster and verify all components | ||
| come up healthy. Uses ip6tables REJECT rules to prevent bootstrap gather | ||
| from hanging on extra network IPv6 addresses. |
10 changes: 10 additions & 0 deletions
10
ci-operator/step-registry/baremetalds/openperouter-e2e/iptables/OWNERS
This file contains hidden or 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,10 @@ | ||
| approvers: | ||
| - fedepaol | ||
| - maiqueb | ||
| - oribon | ||
| - zeeke | ||
| reviewers: | ||
| - fedepaol | ||
| - maiqueb | ||
| - oribon | ||
| - zeeke |
26 changes: 26 additions & 0 deletions
26
...y/baremetalds/openperouter-e2e/iptables/baremetalds-openperouter-e2e-iptables-commands.sh
This file contains hidden or 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,26 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| echo "************ openperouter iptables fix for bootstrap gather ************" | ||
|
|
||
| # shellcheck source=/dev/null | ||
| source "${SHARED_DIR}/packet-conf.sh" | ||
|
|
||
| # Add ip6tables REJECT rules on the dev-scripts host for extra network subnets. | ||
| # The installer's bootstrap gather tries to SSH to every NIC IP on every node. | ||
| # IPv6 addresses on the extra networks (toswitch1/toswitch2) are unreachable | ||
| # via SSH, causing ~10min timeout per address. REJECT returns immediate RST | ||
| # instead of dropping packets, turning the timeout into an instant failure. | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" bash -s << 'EOFIPTABLES' | ||
| set -euo pipefail | ||
| iptables -I OUTPUT -d 192.168.11.0/24 -p tcp --dport 22 -j REJECT --reject-with tcp-reset | ||
| iptables -I OUTPUT -d 192.168.12.0/24 -p tcp --dport 22 -j REJECT --reject-with tcp-reset | ||
| ip6tables -I OUTPUT -d 2001:db8:11::/64 -p tcp --dport 22 -j REJECT --reject-with tcp-reset | ||
| ip6tables -I OUTPUT -d 2001:db8:12::/64 -p tcp --dport 22 -j REJECT --reject-with tcp-reset | ||
| echo "Added iptables REJECT rules for extra network subnets (IPv4 + IPv6)" | ||
| iptables -L OUTPUT -n | head -5 | ||
| ip6tables -L OUTPUT -n | head -5 | ||
| EOFIPTABLES |
17 changes: 17 additions & 0 deletions
17
...metalds/openperouter-e2e/iptables/baremetalds-openperouter-e2e-iptables-ref.metadata.json
This file contains hidden or 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,17 @@ | ||
| { | ||
| "path": "baremetalds/openperouter-e2e/iptables/baremetalds-openperouter-e2e-iptables-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ], | ||
| "reviewers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ] | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
...stry/baremetalds/openperouter-e2e/iptables/baremetalds-openperouter-e2e-iptables-ref.yaml
This file contains hidden or 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,13 @@ | ||
| ref: | ||
| as: baremetalds-openperouter-e2e-iptables | ||
| from: dev-scripts | ||
| commands: baremetalds-openperouter-e2e-iptables-commands.sh | ||
| timeout: 300s | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| documentation: |- | ||
| Add ip6tables REJECT rules on the dev-scripts host for extra network subnets. | ||
| This prevents the bootstrap gather from hanging on SSH timeouts to IPv6 | ||
| addresses on toswitch1/toswitch2 networks. |
11 changes: 11 additions & 0 deletions
11
ci-operator/step-registry/baremetalds/openperouter-e2e/test/OWNERS
This file contains hidden or 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,11 @@ | ||
| approvers: | ||
| - fedepaol | ||
| - maiqueb | ||
| - oribon | ||
| - zeeke | ||
| reviewers: | ||
| - fedepaol | ||
| - maiqueb | ||
| - oribon | ||
| - zeeke | ||
|
|
79 changes: 79 additions & 0 deletions
79
...-registry/baremetalds/openperouter-e2e/test/baremetalds-openperouter-e2e-test-commands.sh
This file contains hidden or 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,79 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| echo "************ openperouter deploy-verify test ************" | ||
|
|
||
| # shellcheck source=/dev/null | ||
| source "${SHARED_DIR}/packet-conf.sh" | ||
|
|
||
| echo "### Copying openperouter PR source to remote host" | ||
| scp "${SSHOPTS[@]}" -r "/go/src/github.com/openperouter/openperouter" "root@${IP}:/root/openperouter" | ||
|
|
||
| echo "### Deploy OpenPerOuter via OLM bundle and verify" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" bash -s -- "${OO_BUNDLE}" << 'EOFDEPLOY' | ||
| set -euo pipefail | ||
| OO_BUNDLE="$1" | ||
| export KUBECONFIG=/root/dev-scripts/ocp/ostest/auth/kubeconfig | ||
|
|
||
| # Install operator-sdk via Makefile (uses PR source) | ||
| cd /root/openperouter | ||
| make operator-sdk | ||
| OPERATOR_SDK=$(pwd)/_cache/operator-sdk | ||
| ${OPERATOR_SDK} version | ||
|
|
||
| # Create and configure namespace | ||
| oc create namespace openshift-openperouter-system | ||
| oc label --overwrite ns openshift-openperouter-system \ | ||
| pod-security.kubernetes.io/enforce=privileged \ | ||
| pod-security.kubernetes.io/audit=privileged \ | ||
| pod-security.kubernetes.io/warn=privileged | ||
|
|
||
| # Deploy via OLM bundle | ||
| ${OPERATOR_SDK} run bundle -n openshift-openperouter-system "${OO_BUNDLE}" --timeout 5m | ||
|
|
||
| # Wait for all operator deployments (operator + webhook) | ||
| oc wait --for condition=Available -n openshift-openperouter-system \ | ||
| deployment --all --timeout=300s | ||
|
|
||
| # Create OpenPERouter CR | ||
| cat <<'EOF' | oc apply -f - | ||
| apiVersion: network.openperouter.io/v1alpha1 | ||
| kind: OpenPERouter | ||
| metadata: | ||
| name: openperouter | ||
| namespace: openshift-openperouter-system | ||
| spec: | ||
| logLevel: debug | ||
| EOF | ||
|
|
||
| # Wait for controller and router daemonsets to be created and rolled out | ||
| for ds in controller router; do | ||
| echo "Waiting for daemonset $ds to be created..." | ||
| deadline=$((SECONDS + 300)) | ||
| until oc get daemonset "$ds" -n openshift-openperouter-system &>/dev/null; do | ||
| if (( SECONDS >= deadline )); then | ||
| echo "ERROR: Timed out waiting for daemonset $ds" | ||
| exit 1 | ||
| fi | ||
| sleep 5 | ||
| done | ||
| oc rollout status daemonset/"$ds" -n openshift-openperouter-system --timeout=300s | ||
| done | ||
|
|
||
| echo "=== Deploy verification ===" | ||
| oc get pods -n openshift-openperouter-system -o wide | ||
| oc get daemonset -n openshift-openperouter-system | ||
|
|
||
| # Verify all pods are Running and Ready | ||
| NOT_READY=$(oc get pods -n openshift-openperouter-system --no-headers | grep -v "Completed" | grep -v "1/1\|2/2\|3/3\|4/4\|5/5" || true) | ||
| if [ -n "$NOT_READY" ]; then | ||
| echo "ERROR: Some pods are not fully ready:" | ||
| echo "$NOT_READY" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "All openperouter pods are running and ready" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| EOFDEPLOY | ||
17 changes: 17 additions & 0 deletions
17
...try/baremetalds/openperouter-e2e/test/baremetalds-openperouter-e2e-test-ref.metadata.json
This file contains hidden or 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,17 @@ | ||
| { | ||
| "path": "baremetalds/openperouter-e2e/test/baremetalds-openperouter-e2e-test-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ], | ||
| "reviewers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ] | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...tep-registry/baremetalds/openperouter-e2e/test/baremetalds-openperouter-e2e-test-ref.yaml
This file contains hidden or 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,16 @@ | ||
| ref: | ||
| as: baremetalds-openperouter-e2e-test | ||
| from: src | ||
| grace_period: 10m | ||
| commands: baremetalds-openperouter-e2e-test-commands.sh | ||
| timeout: 3600s | ||
| dependencies: | ||
| - env: OO_BUNDLE | ||
| name: operator-bundle | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| documentation: |- | ||
| Deploy OpenPerOuter via OLM bundle, create CR, and verify that operator, | ||
| controller, and router daemonsets come up healthy. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.