From 6083039648ad9a411923ca6c725d8d0e8736b83f Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Tue, 7 Oct 2025 08:59:30 +0200 Subject: [PATCH] fix(): explicit object identifier --- .gitea/workflows/main.yaml | 2 +- internal/k8s.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index 8b7d320..f5d393d 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -40,7 +40,7 @@ jobs: with: context: . file: ./Dockerfile - push: false + push: true tags: | lerentis/canada-kaktus:${{ github.sha }} # - name: Sign the published Docker image diff --git a/internal/k8s.go b/internal/k8s.go index dd1e8e8..e83535e 100644 --- a/internal/k8s.go +++ b/internal/k8s.go @@ -61,7 +61,13 @@ func RecreateIPPoolCrd(cfg *Config, name string, ips []string) error { decode := scheme.Codecs.UniversalDeserializer().Decode - obj, _, err := decode([]byte(body), nil, nil) + versionKind := schema.GroupVersionKind{ + Group: "cilium.io", + Version: "v2alpha1", + Kind: "CiliumLoadBalancerIPPool", + } + + obj, _, err := decode([]byte(body), &versionKind, nil) if err != nil { return fmt.Errorf("could not deserialize CRD: %v", err.Error()) }