-
Notifications
You must be signed in to change notification settings - Fork 1
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
CAPI e2e tests #13
Merged
Merged
CAPI e2e tests #13
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
cab18de
fix e2e tests and bugs
bschimke95 ea8a78f
fixup linter issues and missing flags
bschimke95 9e05e15
fix remaining tests
bschimke95 38c72a9
fixup docker build
bschimke95 493631d
ci fixup
bschimke95 a45894e
ci fixup
bschimke95 8c21eca
cleanup temlate todos
bschimke95 c3a7b27
another ci try
bschimke95 3338b2a
put skip into beforeall
bschimke95 1feb590
fix tests
bschimke95 98ad5e8
try to get some disk space back
bschimke95 306be85
another ci attempt
bschimke95 601d9fd
replace image tags for e2e
bschimke95 0bdd3c5
add no-arch make targets
bschimke95 263c445
rename no-arch to e2e
bschimke95 4f530bc
split GH workflow into build and test jobs
bschimke95 9b398a8
cleanup docker to not run into ooo
bschimke95 c6e0fa4
artifact permissions
bschimke95 c0a4b69
fix permissions
bschimke95 f95ab29
fix provider image artifacts
bschimke95 eca2cd6
still no space left ...
bschimke95 1e7861e
another no space left try...
bschimke95 f4716c0
try
bschimke95 8964362
still no space...
bschimke95 12ae2a2
merge steps again
bschimke95 fb0bd54
checkout repo
bschimke95 55374ac
remove unnecessary files
bschimke95 cdceb3f
use self hosted runners
bschimke95 10890ac
broaden self-hosted tags
bschimke95 1ab8070
try other tags
bschimke95 24a330c
another self-hosted runner config
bschimke95 4083966
use smaller machine
bschimke95 99e7b9e
install docker
bschimke95 c2eee34
install docker via apt
bschimke95 2ea4633
missing apt update
bschimke95 2128e97
convenience script
bschimke95 a739a33
update
bschimke95 df33e37
update
bschimke95 709c1c2
more docker buildx trickery
bschimke95 73e5866
getting there
bschimke95 3cc0f72
docker
bschimke95 9626058
remove maximize build space
bschimke95 34d4e6d
remove double checkout
bschimke95 3636278
provide kubectl
bschimke95 5d70501
add tmate session
bschimke95 bf13e22
fix tmate session
bschimke95 1281d5d
another fix
bschimke95 84766d4
fix make target
bschimke95 3022b79
more debugging
bschimke95 5aea859
gci
bschimke95 571edcf
docker
bschimke95 421c482
increase inotifier
bschimke95 b009865
limit test space
bschimke95 1f12d2d
sudo for inotifier
bschimke95 4a465d2
Run all tests
bschimke95 ff91102
another round
bschimke95 8b1911f
add remediation tests
bschimke95 e5840b6
address PR comments
bschimke95 f27d850
remove Go action
bschimke95 387dd31
remove extra assignment
bschimke95 8ed3b7c
update docker e2e
bschimke95 10393d4
docker-buildx
bschimke95 c309d9c
docker-buildx
bschimke95 fdfb365
address comments
bschimke95 dd1abfa
update readme and cleanup outdated sections
bschimke95 5e2952c
use semver package
bschimke95 e34ce80
update go mod
bschimke95 e10ebb9
remove docker
bschimke95 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 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,86 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-e2e-images: | ||
name: Build & Run E2E Images | ||
runs-on: [self-hosted, linux, X64, jammy, large] | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install requirements | ||
run: | | ||
sudo apt update | ||
sudo snap install go --classic --channel=1.22/stable | ||
sudo apt install make | ||
sudo apt install docker-buildx | ||
sudo snap install kubectl --classic --channel=1.30/stable | ||
- name: Build provider images | ||
run: sudo make docker-build-e2e | ||
- name: Build k8s-snap image | ||
run: | | ||
cd templates/docker | ||
sudo docker build . -t k8s-snap:dev | ||
- name: Save provider image | ||
run: | | ||
sudo docker save -o provider-images.tar ghcr.io/canonical/cluster-api-k8s/controlplane-controller:dev ghcr.io/canonical/cluster-api-k8s/bootstrap-controller:dev | ||
sudo chmod 775 provider-images.tar | ||
- name: Save k8s-snap image | ||
run: | | ||
sudo docker save -o k8s-snap-image.tar k8s-snap:dev | ||
sudo chmod 775 k8s-snap-image.tar | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: e2e-images | ||
path: | | ||
provider-images.tar | ||
k8s-snap-image.tar | ||
run-e2e-tests: | ||
name: Run E2E Tests | ||
runs-on: [self-hosted, linux, X64, jammy, large] | ||
needs: build-e2e-images | ||
strategy: | ||
matrix: | ||
ginkgo_focus: | ||
- "KCP remediation" | ||
- "MachineDeployment remediation" | ||
- "Workload cluster creation" | ||
- "Workload cluster scaling" | ||
- "Workload cluster upgrade" | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install requirements | ||
run: | | ||
sudo apt update | ||
sudo snap install go --classic --channel=1.22/stable | ||
sudo apt install make | ||
sudo apt install docker-buildx | ||
sudo snap install kubectl --classic --channel=1.30/stable | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: e2e-images | ||
path: . | ||
- name: Load provider image | ||
run: sudo docker load -i provider-images.tar | ||
- name: Load k8s-snap image | ||
run: sudo docker load -i k8s-snap-image.tar | ||
- name: Create docker network | ||
run: | | ||
sudo docker network create kind --driver=bridge -o com.docker.network.bridge.enable_ip_masquerade=true | ||
- name: Increase inotify watches | ||
run: | | ||
# Prevents https://cluster-api.sigs.k8s.io/user/troubleshooting#cluster-api-with-docker----too-many-open-files | ||
sudo sysctl fs.inotify.max_user_watches=1048576 | ||
sudo sysctl fs.inotify.max_user_instances=8192 | ||
- name: Run e2e tests | ||
run: | | ||
sudo GINKGO_FOCUS="${{ matrix.ginkgo_focus }}" SKIP_RESOURCE_CLEANUP=true make test-e2e |
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
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
2 changes: 1 addition & 1 deletion
2
bootstrap/config/samples/bootstrap_v1alpha3_ck8sconfigtemplate.yaml
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
2 changes: 1 addition & 1 deletion
2
controlplane/config/samples/controlplane_v1alpha3_ck8scontrolplane.yaml
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
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
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
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
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.
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.
Enabling this caused the e2e tests to fail.