-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrade Higress to 2.2.0 and add deployment health test #473
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
Merged
weilei0120
merged 7 commits into
main
from
fix/andrewma/update_higress_version_in_bootstrap
Apr 23, 2026
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8d1ba71
tests: add infra test for higress
amd-ama10002-2 adb5d2a
docs: add README for Bootstrap infrastructure tests
amd-ama10002-2 44194b2
chore: update higress installation and Gateway API CRDs
amd-ama10002-2 1971a9a
chore: update .gitignore to include Bootstrap directories
amd-ama10002-2 623e40a
fix: update cleanup configuration in .chainsaw.yaml
amd-ama10002-2 17341a2
refactor: update chainsaw test for higress-gateway pod status
amd-ama10002-2 ae1a4f5
docs: update README for Bootstrap infrastructure tests
amd-ama10002-2 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: chainsaw.kyverno.io/v1alpha2 | ||
| kind: Configuration | ||
| metadata: | ||
| name: bootstrap-tests | ||
| spec: | ||
| timeouts: | ||
| apply: 10s | ||
| assert: 10s | ||
| exec: 15s | ||
|
amd-ama10002-2 marked this conversation as resolved.
|
||
| cleanup: | ||
| skipDelete: false | ||
| execution: | ||
| failFast: true | ||
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,42 @@ | ||
| # Bootstrap Infrastructure Tests | ||
|
|
||
| Infrastructure unit tests for Bootstrap components using [Kyverno Chainsaw](https://kyverno.github.io/chainsaw/latest/). | ||
|
amd-ama10002-2 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Prerequisites | ||
|
|
||
| Quickstart Chainsaw: https://kyverno.github.io/chainsaw/latest/quick-start/install/ | ||
|
|
||
| You also need `kubectl` configured with access to the target cluster. | ||
|
|
||
| ## Running Tests | ||
|
|
||
| From the `Bootstrap` directory: | ||
|
|
||
| ```bash | ||
| cd ~/Primus-SaFE/Bootstrap | ||
| sudo nerdctl run --rm \ | ||
| -v ./tests/:/chainsaw/ \ | ||
| -v ${HOME}/.kube/:/etc/kubeconfig/ \ | ||
| -e KUBECONFIG=/etc/kubeconfig/config \ | ||
| --network=host \ | ||
| ghcr.io/kyverno/chainsaw \ | ||
| test /chainsaw --config /chainsaw/.chainsaw.yaml | ||
| ``` | ||
|
|
||
| ## Test Structure | ||
|
|
||
| Each Bootstrap component gets its own folder containing a `chainsaw-test.yaml`: | ||
|
|
||
| ``` | ||
| tests/ | ||
| .chainsaw.yaml # Shared configuration | ||
| higress/ | ||
| chainsaw-test.yaml # Higress deployment health checks | ||
| README.md | ||
| ``` | ||
|
|
||
| ## Available Tests | ||
|
|
||
| | Test | What it verifies | | ||
| |------|------------------| | ||
| | `higress/` | higress-controller ready, higress-gateway pods running, Gateway resource exists | | ||
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,40 @@ | ||
| apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
| kind: Test | ||
| metadata: | ||
| name: higress-deployment-health | ||
| spec: | ||
| description: Verify that the Higress gateway deployment is healthy after running Bootstrap/higress/higress.sh | ||
| steps: | ||
| # Step 1: higress-controller Deployment has ready replicas | ||
| - name: higress-controller-is-ready | ||
| try: | ||
| - assert: | ||
| resource: | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: higress-controller | ||
| namespace: higress-system | ||
| status: | ||
| (readyReplicas > `0`): true | ||
|
|
||
| # Step 2: At least one higress-gateway pod is Running | ||
| - name: higress-gateway-pods-running | ||
| try: | ||
| - script: | ||
| content: | | ||
| kubectl get pods -n higress-system -l app=higress-gateway \ | ||
| -o jsonpath='{.items[0].status.phase}' | ||
|
amd-ama10002-2 marked this conversation as resolved.
Outdated
|
||
| check: | ||
| ($stdout): Running | ||
|
|
||
| # Step 3: Gateway resource exists in the cluster | ||
| - name: gateway-resource-exists | ||
| try: | ||
| - assert: | ||
| resource: | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| name: ssh-gateway | ||
| namespace: higress-system | ||
Oops, something went wrong.
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.