-
Notifications
You must be signed in to change notification settings - Fork 6
Support 1.34 and 1.36 kubernetes version #76
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
alicefr
wants to merge
2
commits into
bootc-dev:main
Choose a base branch
from
alicefr:add-k8s-versions
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| name: Integration Tests (K8s Versions) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: integration-k8s-versions-${{ github.head_ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| EXTERNAL_IMAGES: >- | ||
| docker.io/library/registry:2 | ||
| docker.io/library/haproxy:lts-alpine | ||
| quay.io/libpod/busybox:latest | ||
|
|
||
| jobs: | ||
| integration-tests: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 120 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| kube-minor: ['1.34', '1.36'] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here as well. Otherwise, bumping this every quarter is going to get tiring. :) |
||
|
|
||
| env: | ||
| BINK_NODE_IMAGE: ghcr.io/bootc-dev/bink/node:v${{ matrix.kube-minor }}-fedora-44-disk | ||
| BINK_IMAGES: >- | ||
| ghcr.io/bootc-dev/bink/cluster:latest | ||
| ghcr.io/bootc-dev/bink/node:v${{ matrix.kube-minor }}-fedora-44-disk | ||
| ghcr.io/bootc-dev/bink/dns:latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Configure kernel for nested containers | ||
| run: | | ||
| sudo aa-teardown 2>/dev/null || true | ||
| sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | ||
| sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 | ||
| sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 | ||
|
|
||
| - name: Enable KSM (Kernel Same-page Merging) | ||
| run: | | ||
| sudo sh -c 'echo 1 > /sys/kernel/mm/ksm/run' | ||
| sudo sh -c 'echo 5000 > /sys/kernel/mm/ksm/pages_to_scan' | ||
| cat /sys/kernel/mm/ksm/run | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: true | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| podman \ | ||
| libgpgme-dev \ | ||
| libbtrfs-dev \ | ||
| libdevmapper-dev \ | ||
| pkg-config | ||
|
|
||
| - name: Set up KVM | ||
| run: | | ||
| sudo chmod 666 /dev/kvm | ||
| ls -la /dev/kvm | ||
|
|
||
| - name: Configure Podman | ||
| run: | | ||
| podman --version | ||
| sudo mkdir -p /etc/containers | ||
| echo '{"defaultAction":"SCMP_ACT_ALLOW"}' | sudo tee /etc/containers/seccomp.json | ||
| printf '[containers]\napparmor_profile = "unconfined"\nseccomp_profile = "/etc/containers/seccomp.json"\n' | sudo tee /etc/containers/containers.conf | ||
| grep -q '^root:' /etc/subuid || echo 'root:100000:65536' | sudo tee -a /etc/subuid | ||
| grep -q '^root:' /etc/subgid || echo 'root:100000:65536' | sudo tee -a /etc/subgid | ||
| sudo systemctl start podman.socket | ||
| sudo podman info --format '{{.Store.GraphRoot}}' | ||
|
|
||
| - name: Build bink binary | ||
| run: sudo make build-bink | ||
|
|
||
| - name: Verify prerequisites | ||
| run: | | ||
| test -f ./bink | ||
| sudo podman images --format "table {{.Repository}}:{{.Tag}}\t{{.Size}}" | ||
| df -h / | ||
| free -h | ||
|
|
||
| - name: Get image digests | ||
| id: digests | ||
| run: | | ||
| ALL_DIGESTS="" | ||
| for img in $BINK_IMAGES $EXTERNAL_IMAGES; do | ||
| digest=$(skopeo inspect --no-creds "docker://${img}" --format '{{.Digest}}') | ||
| echo "${img}: ${digest}" | ||
| ALL_DIGESTS="${ALL_DIGESTS}${digest}" | ||
| done | ||
| echo "hash=$(echo -n "${ALL_DIGESTS}" | sha256sum | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Restore cached images | ||
| id: image-cache | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: /tmp/podman-image-cache | ||
| key: podman-images-v2-k8s-${{ matrix.kube-minor }}-${{ steps.digests.outputs.hash }} | ||
|
|
||
| - name: Load cached images | ||
| if: steps.image-cache.outputs.cache-hit == 'true' | ||
| run: | | ||
| for f in /tmp/podman-image-cache/*.tar; do | ||
| sudo podman load -i "$f" | ||
| done | ||
| sudo podman images --format "table {{.Repository}}:{{.Tag}}\t{{.Size}}" | ||
|
|
||
| - name: Pre-pull container images | ||
| if: steps.image-cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| mkdir -p /tmp/podman-image-cache | ||
| for img in $BINK_IMAGES $EXTERNAL_IMAGES; do | ||
| sudo podman pull "$img" | ||
| name=$(echo "$img" | sed 's|[/:]|_|g') | ||
| sudo podman save -o "/tmp/podman-image-cache/${name}.tar" "$img" | ||
| done | ||
| sudo chown -R $(id -u):$(id -g) /tmp/podman-image-cache | ||
|
|
||
| - name: Save image cache | ||
| if: steps.image-cache.outputs.cache-hit != 'true' | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: /tmp/podman-image-cache | ||
| key: podman-images-v2-k8s-${{ matrix.kube-minor }}-${{ steps.digests.outputs.hash }} | ||
|
|
||
| - name: Run integration tests (K8s ${{ matrix.kube-minor }}) | ||
| run: sudo make test-integration GINKGO_FOCUS="should create and initialize a complete Kubernetes cluster" | ||
| timeout-minutes: 90 | ||
| env: | ||
| CONTAINER_HOST: unix:///run/podman/podman.sock | ||
| BINK_NODE_IMAGE: ${{ env.BINK_NODE_IMAGE }} | ||
|
|
||
| - name: Collect logs | ||
| if: failure() | ||
| run: .github/collect-logs.sh | ||
|
|
||
| - name: Upload logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-logs-k8s-${{ matrix.kube-minor }} | ||
| path: /tmp/bink-logs/ | ||
|
|
||
| - name: Cleanup test clusters | ||
| if: always() | ||
| run: | | ||
| sudo podman ps -a --filter "name=k8s-test-bink" --format '{{.Names}}' | \ | ||
| xargs -r sudo podman rm -f 2>/dev/null || true | ||
| sudo podman volume prune -f 2>/dev/null || 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
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.
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.
Shouldn't we extend https://github.com/bootc-dev/bink/blob/main/.github/workflows/integration-tests.yml instead to avoid duplicating?
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.
I would like just to run some subset of tests for the other 2 k8s version. I don't think the CI is stable enough for now to run the entire suite. Additionally, I don't think it really bring a value to duplicate the test 3 times