From f5a2ca94b895dfc554e47837397ea6f1568164ff Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Thu, 18 Jan 2024 15:02:04 -0600 Subject: [PATCH] Patch for controller-runtime upgrade Signed-off-by: Chris Doherty --- .github/workflows/ci.yaml | 1 - internal/backend/kubernetes/backend.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ced6fd8d..67852dc4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -148,5 +148,4 @@ jobs: cache-from: type=registry,ref=${{ env.IMAGE }}:latest push: ${{ startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/v') }} tags: ${{ steps.meta.outputs.tags }} - platforms: linux/amd64,linux/arm64 diff --git a/internal/backend/kubernetes/backend.go b/internal/backend/kubernetes/backend.go index ddfa4361..c17a435f 100644 --- a/internal/backend/kubernetes/backend.go +++ b/internal/backend/kubernetes/backend.go @@ -11,6 +11,7 @@ import ( kubescheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "sigs.k8s.io/controller-runtime/pkg/cache" crclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" ) @@ -50,7 +51,7 @@ func NewBackend(ctx context.Context, cfg Config) (*Backend, error) { conf := func(opts *cluster.Options) { opts.Scheme = scheme - opts.Namespace = cfg.Namespace + opts.Cache.DefaultNamespaces = map[string]cache.Config{cfg.Namespace: {}} } clstr, err := cluster.New(cfg.ClientConfig, conf)