From 935b9c4404f7d33e304a6ee6bd020055875eeba8 Mon Sep 17 00:00:00 2001 From: Said Boudjelda Date: Sun, 18 Oct 2026 15:48:38 +0200 Subject: [PATCH] fix(deploy): kates deploy no longer deletes ~/.cache/helm To refresh the API server's schema cache after installing CRDs, deploy deleted ~/.kube/cache/discovery and ~/.cache/helm. The second is no discovery cache: on Linux it is Helm's repository cache. The kyverno/kyverno upgrade that wires Kyverno into Prometheus later in the same deploy runs with no repo add before it, so it could fail with "no cached repo found", and every deploy emptied the user's own `helm search repo`. macOS keeps Helm's cache in ~/Library/Caches/helm, which is why it went unnoticed there. Deploy now deletes only ~/.kube/cache/discovery, and a comment says why ~/.cache/helm stays. --- cli/cmd/deploy_components.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/cmd/deploy_components.go b/cli/cmd/deploy_components.go index 2460f3b9..ec8d3c84 100644 --- a/cli/cmd/deploy_components.go +++ b/cli/cmd/deploy_components.go @@ -1010,11 +1010,12 @@ spec: } } - // Bust Kubernetes Discovery Cache so Helm knows about the newly created CRDs + // Bust Kubernetes Discovery Cache so Helm knows about the newly created CRDs. + // Not ~/.cache/helm: on Linux that is Helm's repository cache, and the + // kyverno/kyverno upgrade that wires Kyverno into Prometheus reads it. dl.Println(" - Refreshing API server schema cache...") if home, err := os.UserHomeDir(); err == nil { os.RemoveAll(fmt.Sprintf("%s/.kube/cache/discovery", home)) - os.RemoveAll(fmt.Sprintf("%s/.cache/helm", home)) } return nil