-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: add OpenPERouter baremetal E2E deploy lane #83858
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
zeeke
wants to merge
2
commits into
openshift:main
Choose a base branch
from
zeeke: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
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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 | ||
|
|
67 changes: 67 additions & 0 deletions
67
ci-operator/step-registry/openperouter/e2e/openperouter-e2e-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,67 @@ | ||
| #!/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" | ||
| OPENPEROUTER_SRC="/go/src/github.com/openperouter/openperouter" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" "mkdir -p /root/openperouter" | ||
| scp "${SSHOPTS[@]}" "${OPENPEROUTER_SRC}/Makefile" "root@${IP}:/root/openperouter/" | ||
| scp "${SSHOPTS[@]}" -r "${OPENPEROUTER_SRC}/e2etests" "root@${IP}:/root/openperouter/" | ||
|
|
||
| echo "### Create OpenPERouter CR and verify deployment" | ||
| ssh "${SSHOPTS[@]}" "root@${IP}" bash -s << 'EOFDEPLOY' | ||
| set -euo pipefail | ||
| export KUBECONFIG=/root/dev-scripts/ocp/ostest/auth/kubeconfig | ||
|
|
||
| # Ensure namespace is privileged (router pods need host networking + nsenter) | ||
| 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 | ||
|
|
||
| # 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" | ||
| EOFDEPLOY | ||
17 changes: 17 additions & 0 deletions
17
ci-operator/step-registry/openperouter/e2e/openperouter-e2e-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": "openperouter/e2e/openperouter-e2e-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ], | ||
| "reviewers": [ | ||
| "fedepaol", | ||
| "maiqueb", | ||
| "oribon", | ||
| "zeeke" | ||
| ] | ||
| } | ||
| } |
14 changes: 14 additions & 0 deletions
14
ci-operator/step-registry/openperouter/e2e/openperouter-e2e-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,14 @@ | ||
| ref: | ||
| as: openperouter-e2e | ||
| from: src | ||
| grace_period: 10m | ||
| commands: openperouter-e2e-commands.sh | ||
| timeout: 3600s | ||
| resources: | ||
| requests: | ||
| cpu: 100m | ||
| memory: 200Mi | ||
| documentation: |- | ||
| Create OpenPERouter CR and verify that operator, controller, and router | ||
| daemonsets come up healthy. OLM bundle deploy is handled by the | ||
| optional-operators-operator-sdk step. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Compare complete readiness counts.
Line 59 treats
1/10as ready because it contains the substring1/1. The test can then report success while a pod has only one ready container out of ten. It also rejects valid counts above5/5.Parse the READY fraction and compare its two complete values, or wait on the Pod Ready condition.
Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents