[k8s] Can't prune the custom resource when there are multiple supported api version
Open
@ffjlabo is already working on this.
Since Aug 22, 2025.
kind/bug
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
What happened:
Custom resources that support multiple API versions may not be pruned.
Here is the example External Secrets (helm chart: v0.16.1)
This version supports both v1beta1 and v1 as API versions. Also, I deployed v1beta1 External Secret resource.
Then, I removed the resource definition from the git, but piped didn't prune it.
apiVersion: pipecd.dev/v1beta1
kind: KubernetesApp
spec:
name: secretstores
labels:
env: dev
quickSync:
prune: true
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
name: fake
namespace: external-secrets
spec:
provider:
fake:
data:
- key: "/foo/bar"
value: "HELLO1"
version: "v1"
- key: "/foo/bar"
value: "HELLO2"
version: "v2"
% kubectl get externalsecret -n external-secrets
NAME STORETYPE STORE REFRESH INTERVAL STATUS READY
fake SecretStore fake 1h SecretSynced True
What you expected to happen:
I expect to be able to prune all of the supported resources.
How to reproduce it:
Environment:
pipedversion:control-planeversion:- Others:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.