-
Notifications
You must be signed in to change notification settings - Fork 0
Add real-cluster E2E release gate #83
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
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
06b0a34
Add real-cluster E2E release gate
colinmollenhour fb1c1f7
Trigger CI for E2E gate PR
colinmollenhour be89c05
Address E2E review comments
colinmollenhour 9759fa7
Fix kind worker selection for E2E
colinmollenhour a05be76
Harden playground replication user setup
colinmollenhour 36a8aa3
Use non-default RustFS playground credentials
colinmollenhour 7c50f96
Use TCP for playground MySQL setup
colinmollenhour 4a25027
Let playground operator tolerate DB taints
colinmollenhour 61b9a56
Tolerate readonly NoExecute taints in playground
colinmollenhour 156a17a
Use MySQL LTS for playground E2E
colinmollenhour 71326fe
Install clone plugin during MySQL init
colinmollenhour c762471
Install clone plugin during playground setup
colinmollenhour 266fdaf
Tolerate absent clone donor allowlist
colinmollenhour 2f44943
Skip removed clone DDL timeout
colinmollenhour b1a0519
Load generated MySQL config as cnf
colinmollenhour 8a8da3b
Ensure clone plugin on donors
colinmollenhour 6955eec
Pass critical MySQL settings as args
colinmollenhour e51540a
Fetch source public key for replication
colinmollenhour 34fe77c
Restore MySQL 9.6 playground target
colinmollenhour 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # kind cluster configuration for Bloodraven E2E tests. | ||
| # Uses Calico CNI so NetworkPolicy resources are enforced (the default | ||
| # kindnet CNI does not implement NetworkPolicy, which means partition / | ||
| # self-fencing scenarios would silently pass without actually testing | ||
| # policy behaviour). | ||
| # | ||
| # Usage: | ||
| # kind create cluster --config=.github/kind/e2e-calico.yaml | ||
| # # then install Calico: | ||
| # kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml | ||
| kind: Cluster | ||
| apiVersion: kind.x-k8s.io/v1alpha4 | ||
| name: bloodraven-e2e | ||
| nodes: | ||
| - role: control-plane | ||
| - role: worker | ||
| - role: worker | ||
| networking: | ||
| # Disable kindnet so Calico can manage CNI instead. | ||
| disableDefaultCNI: true | ||
| # Match the stock Calico manifest's default IPv4 pool. | ||
| podSubnet: "192.168.0.0/16" |
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,125 @@ | ||
| # Reusable E2E workflow — creates a kind cluster, deploys the playground, | ||
| # and runs playground-chaos with the selected profile. | ||
| # | ||
| # Called by: | ||
| # .github/workflows/e2e.yml (nightly, manual, PR label) | ||
| # .github/workflows/release.yml (release gate) | ||
| name: E2E (reusable) | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| profile: | ||
| description: "Chaos profile (smoke|release|full)" | ||
| required: false | ||
| default: "release" | ||
| type: string | ||
| timeout-minutes: | ||
| description: "Job timeout in minutes" | ||
| required: false | ||
| default: 90 | ||
| type: number | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BLOODRAVEN_SETUP_HELM_INSTALL_CRDS: "1" | ||
| SKIP_IMAGE_BUILD: "1" | ||
|
|
||
| concurrency: | ||
| group: e2e-${{ github.workflow }}-${{ github.ref }}-${{ inputs.profile }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| e2e: | ||
| name: Real-cluster E2E (${{ inputs.profile }}) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: ${{ inputs.timeout-minutes }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache-dependency-path: go.sum | ||
|
|
||
| - name: Build playground-chaos | ||
| run: make build-playground-chaos | ||
|
|
||
| - name: Build Docker images | ||
| run: | | ||
| docker build --target bloodraven -t bloodraven:playground . | ||
| docker build --target sidecar -t bloodraven-sidecar:playground . | ||
| docker build -t bloodraven-counter:playground playground/counter-app | ||
| docker build -t bloodraven-dashboard:playground playground/dashboard | ||
| docker build -t bloodraven-dns-webhook:playground playground/dns-webhook | ||
|
|
||
| - name: Create kind cluster | ||
| uses: helm/kind-action@v1.12.0 | ||
| with: | ||
| cluster_name: bloodraven-e2e | ||
| config: .github/kind/e2e-calico.yaml | ||
| # CNI is disabled in this kind config, so nodes cannot become | ||
| # Ready until Calico is installed in the next step. | ||
| wait: 0s | ||
|
|
||
| - name: Install Calico CNI | ||
| run: | | ||
| kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml | ||
| kubectl -n kube-system rollout status daemonset/calico-node --timeout=180s | ||
| kubectl wait nodes --all --for=condition=Ready --timeout=180s | ||
|
|
||
| - name: Load images into kind | ||
| run: | | ||
| kind load docker-image bloodraven:playground bloodraven-sidecar:playground bloodraven-counter:playground bloodraven-dashboard:playground bloodraven-dns-webhook:playground --name bloodraven-e2e | ||
|
|
||
| - name: Deploy playground | ||
| run: | | ||
| set -o pipefail | ||
| ./playground/setup.sh 2>&1 | tee playground/setup.log | ||
| timeout-minutes: 10 | ||
|
|
||
| - name: Run E2E (${{ inputs.profile }} profile) | ||
| run: make test-e2e E2E_PROFILE=${{ inputs.profile }} E2E_JUNIT_OUT=playground/chaos-results/e2e-${{ inputs.profile }}-junit.xml | ||
| timeout-minutes: ${{ inputs.timeout-minutes }} | ||
|
|
||
| - name: Upload JUnit results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: e2e-${{ inputs.profile }}-junit | ||
| path: playground/chaos-results/e2e-${{ inputs.profile }}-junit.xml | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload chaos forensics | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: e2e-${{ inputs.profile }}-forensics | ||
| path: playground/chaos-results/ | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload kind logs | ||
| if: failure() | ||
| run: | | ||
| mkdir -p /tmp/kind-logs | ||
| kind export logs --name=bloodraven-e2e /tmp/kind-logs || true | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload kind logs artifact | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: e2e-${{ inputs.profile }}-kind-logs | ||
| path: /tmp/kind-logs/ | ||
| retention-days: 14 | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload setup logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: e2e-${{ inputs.profile }}-setup-logs | ||
| path: playground/setup.log | ||
| retention-days: 14 |
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,39 @@ | ||
| # E2E trigger workflow — nightly, manual, and PR-label-gated. | ||
| # The reusable workflow is in .github/workflows/_e2e.yml. | ||
| name: E2E | ||
|
|
||
| on: | ||
| # Nightly release-profile run | ||
| schedule: | ||
| - cron: "0 5 * * *" # 05:00 UTC daily | ||
|
|
||
| # Manual dispatch with profile selection | ||
| workflow_dispatch: | ||
| inputs: | ||
| profile: | ||
| description: "Chaos profile (smoke|release|full)" | ||
| required: false | ||
| default: "release" | ||
| type: choice | ||
| options: | ||
| - smoke | ||
| - release | ||
| - full | ||
|
|
||
| # PR label gate: run smoke while the "e2e" label is present. | ||
| pull_request: | ||
| types: [opened, reopened, synchronize, labeled] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| # Skip PR-triggered runs unless the "e2e" label is present. | ||
| e2e: | ||
| if: >- | ||
| github.event_name == 'schedule' || | ||
| github.event_name == 'workflow_dispatch' || | ||
| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'e2e')) | ||
| uses: ./.github/workflows/_e2e.yml | ||
| with: | ||
| profile: ${{ github.event_name == 'pull_request' && 'smoke' || (github.event.inputs.profile || 'release') }} | ||
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
Oops, something went wrong.
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.