From e544f97783d319901ac261237ed6540c4096abb1 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:11:02 +0000 Subject: [PATCH 1/8] e2e ci should use built image in e2e tests currently it pulls it from the registry's :latest. Signed-off-by: clux --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37c13d3..b5fe183 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,9 +151,9 @@ jobs: - uses: actions/checkout@v4 - uses: nolar/setup-k3d-k3s@v1 with: - version: v1.27 + version: v1.31 k3d-name: kube - k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" + k3d-args: "--no-lb --no-rollback --registry-create --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" - run: kubectl apply -f yaml/crd.yaml - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 2b0a00c894ce3659e2c3ed7c5866332462352632 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:13:46 +0000 Subject: [PATCH 2/8] ah that needs a name Signed-off-by: clux --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5fe183..1c8ea7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,7 @@ jobs: with: version: v1.31 k3d-name: kube - k3d-args: "--no-lb --no-rollback --registry-create --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" + k3d-args: "--no-lb --no-rollback --registry-create 'reg' --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" - run: kubectl apply -f yaml/crd.yaml - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 66c26082520887f17aa2c13f436b2ab635256497 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:15:47 +0000 Subject: [PATCH 3/8] syntax + k3d image import Signed-off-by: clux --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c8ea7d..afeb5dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,7 @@ jobs: with: version: v1.31 k3d-name: kube - k3d-args: "--no-lb --no-rollback --registry-create 'reg' --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" + k3d-args: "--no-lb --no-rollback --registry-create reg --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" - run: kubectl apply -f yaml/crd.yaml - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -164,6 +164,8 @@ jobs: path: /tmp - name: Load docker image from tarball run: docker load --input /tmp/image.tar + - name: Load image into k3d registry + run: k3d image import ghcr.io/kube-rs/controller:latest --cluster kube - name: helm template | kubctl apply run: | apiserver="$(kubectl get endpoints kubernetes -ojson | jq '.subsets[0].addresses[0].ip' -r)" From 4a84ec63c0b3baf4071986ae2fdb357d4b7f26b3 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:16:51 +0000 Subject: [PATCH 4/8] do it from tarball to be sure Signed-off-by: clux --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afeb5dd..925512d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,10 +162,10 @@ jobs: with: name: controller-image path: /tmp - - name: Load docker image from tarball - run: docker load --input /tmp/image.tar + # - name: Load docker image from tarball + # run: docker load --input /tmp/image.tar - name: Load image into k3d registry - run: k3d image import ghcr.io/kube-rs/controller:latest --cluster kube + run: k3d image import /tmp/image.tar --cluster kube - name: helm template | kubctl apply run: | apiserver="$(kubectl get endpoints kubernetes -ojson | jq '.subsets[0].addresses[0].ip' -r)" From bb303e63945253eefc5848db0d13a9d43330243b Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:29:14 +0000 Subject: [PATCH 5/8] specific test tag Signed-off-by: clux --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 925512d..2dbe74a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: type=pep440,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} type=ref,event=pr + type=raw,value=test,enable={{is_default_branch != true}} - name: Docker login on main origin uses: docker/login-action@v3 @@ -165,12 +166,12 @@ jobs: # - name: Load docker image from tarball # run: docker load --input /tmp/image.tar - name: Load image into k3d registry - run: k3d image import /tmp/image.tar --cluster kube + run: k3d image import /tmp/image.tar --cluster kube --verbose - name: helm template | kubctl apply run: | apiserver="$(kubectl get endpoints kubernetes -ojson | jq '.subsets[0].addresses[0].ip' -r)" helm template charts/doc-controller \ - --set version=latest \ + --set version=test \ --set networkPolicy.enabled=true \ --set networkPolicy.apiserver.0=${apiserver}/32 \ | kubectl apply -f - From 569b339ac1266e119828fa4f1126b5d50270e0c3 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:33:33 +0000 Subject: [PATCH 6/8] not ends with main Signed-off-by: clux --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dbe74a..9af41cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: type=pep440,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} type=ref,event=pr - type=raw,value=test,enable={{is_default_branch != true}} + type=raw,value=test,enable=${{ !endsWith(github.ref, 'main') - name: Docker login on main origin uses: docker/login-action@v3 From 893d9de8bf04a9251bd6f962bd8ea8485d21515c Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:43:57 +0000 Subject: [PATCH 7/8] ping hooks - 2025-02-08 Signed-off-by: clux From 6874900a7043de020749a816fac387cf04536462 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 8 Feb 2025 12:44:41 +0000 Subject: [PATCH 8/8] ugh Signed-off-by: clux --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9af41cd..4486da4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: type=pep440,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} type=ref,event=pr - type=raw,value=test,enable=${{ !endsWith(github.ref, 'main') + type=raw,value=test,enable=${{ !endsWith(github.ref, '/main')}} - name: Docker login on main origin uses: docker/login-action@v3