Support IPv6 for egress metrics (#333) #746
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
defaults: | |
run: | |
working-directory: v2 | |
env: | |
go-version: "1.24" | |
cache-version: 1 | |
jobs: | |
test: | |
name: Small test | |
strategy: | |
matrix: | |
test-ipam: ["true", "false"] | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.go-version }} | |
cache-dependency-path: "**/go.sum" | |
- name: Cache tools | |
id: cache-tools | |
uses: actions/cache@v4 | |
with: | |
path: | | |
v2/bin | |
v2/include | |
key: cache-${{ env.cache-version }}-go-${{ env.go-version }}-${{ hashFiles('v2/Makefile') }} | |
- run: make setup | |
if: steps.cache-tools.outputs.cache-hit != 'true' | |
- run: make test TEST_IPAM=${{ matrix.test-ipam }} TEST_EGRESS=true | |
- run: make test-nodenet | |
timeout-minutes: 10 | |
- run: make test-founat | |
timeout-minutes: 10 | |
- run: make check-generate | |
e2e: | |
name: End-to-end Test | |
strategy: | |
matrix: | |
kindest-node: ["1.30.13", "1.31.9", "1.32.5"] | |
with-ipam: ["false", "true"] | |
ipv4: ["false", "true"] | |
ipv6: ["false", "true"] | |
ipv6-primary: ["false", "true"] | |
exclude: | |
- ipv4: "false" | |
ipv6: "false" | |
- ipv4: "false" | |
ipv6: "true" | |
ipv6-primary: "true" | |
- ipv4: "true" | |
ipv6: "false" | |
ipv6-primary: "true" | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.go-version }} | |
cache-dependency-path: "**/go.sum" | |
- run: make image | |
- run: make certs | |
- name: Enable docker IPv6 mode | |
if: matrix.ipv6 == 'true' | |
working-directory: v2/e2e | |
run: | | |
sudo mkdir -p /etc/docker | |
sudo cp daemon.json /etc/docker/daemon.json | |
sudo systemctl restart docker.service | |
sleep 10 | |
echo TEST_IPV6=true >> $GITHUB_ENV | |
- run: make start KUBERNETES_VERSION=${{ matrix.kindest-node }} WITH_KINDNET=false TEST_IPV4=${{ matrix.ipv4 }} TEST_IPV6=${{ matrix.ipv6 }} IPV6_PRIMARY=${{ matrix.ipv6-primary }} | |
if: matrix.with-ipam == 'true' | |
working-directory: v2/e2e | |
- run: make start KUBERNETES_VERSION=${{ matrix.kindest-node }} WITH_KINDNET=true TEST_IPV4=${{ matrix.ipv4 }} TEST_IPV6=${{ matrix.ipv6 }} IPV6_PRIMARY=${{ matrix.ipv6-primary }} | |
if: matrix.with-ipam == 'false' | |
working-directory: v2/e2e | |
- run: make install-coil | |
if: matrix.with-ipam == 'true' | |
working-directory: v2/e2e | |
- run: make install-coil-egress-v4 | |
if: matrix.with-ipam == 'false' && matrix.ipv4 == 'true' && matrix.ipv6 == 'false' | |
working-directory: v2/e2e | |
- run: make install-coil-egress-v6 | |
if: matrix.with-ipam == 'false' && matrix.ipv4 == 'false' && matrix.ipv6 == 'true' | |
working-directory: v2/e2e | |
- run: make install-coil-egress-dualstack | |
if: matrix.with-ipam == 'false' && matrix.ipv4 == 'true' && matrix.ipv6 == 'true' | |
working-directory: v2/e2e | |
- run: make test TEST_IPAM=${{ matrix.with-ipam }} TEST_EGRESS=true TEST_IPV4=${{ matrix.ipv4 }} TEST_IPV6=${{ matrix.ipv6 }} | |
working-directory: v2/e2e | |
- run: make logs | |
working-directory: v2/e2e | |
if: always() | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: logs-ipv4-${{ matrix.ipv4 }}-ipv6-${{ matrix.ipv6 }}-with-ipam-${{ matrix.with-ipam }}-ipv6-primary-${{ matrix.ipv6-primary }}-${{ matrix.kindest-node }}.tar.gz | |
path: v2/e2e/logs.tar.gz | |
certs-generation: | |
name: Cert generation test | |
strategy: | |
matrix: | |
kindest-node: ["1.30.13", "1.31.9", "1.32.5"] | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.go-version }} | |
cache-dependency-path: "**/go.sum" | |
- run: make image | |
- run: make enable-certs-rotation | |
working-directory: v2/e2e | |
- run: make start KUBERNETES_VERSION=${{ matrix.kindest-node }} | |
working-directory: v2/e2e | |
- run: make install-coil | |
working-directory: v2/e2e | |
- run: make test | |
working-directory: v2/e2e | |
- run: make logs | |
working-directory: v2/e2e | |
if: always() | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: logs-cert-generation-${{ matrix.kindest-node }}.tar.gz | |
path: v2/e2e/logs.tar.gz |