vCluster - Create fully functional virtual Kubernetes clusters - Each vcluster runs inside a namespace of the underlying k8s cluster. It's cheaper than creating separate full-blown clusters and it offers better multi-tenancy and isolation than regular namespaces.
I created a SA and token on bootstrap using the experimental.deploy.vcluster.manifests feature. I configured the experimental.genericSync.export to sync the resulting secret from the virtual cluster into the physical one.
This works as expected. But after that, when creating any kind of pod that mounts a secret on the virtual cluster (I tested nginx ingress controller) the pod is correctly synced to the physical cluster, but the secret is stuck on a loop of creating and deleting. Logs:
release-name-57588f9fcf-vlskk syncer 2024-09-03 16:01:49 INFO secret.ingress-nginx-admission secrets/syncer.go:111 create physical secret test-vcluster/ingress-nginx-admission-x-ingress-nginx-x-release-name {"component": "vcluster"}
release-name-57588f9fcf-vlskk syncer 2024-09-03 16:01:49 INFO secret//GenericExport.ingress-nginx-admission syncer/syncer.go:136 delete physical Secret test-vcluster/ingress-nginx-admission-x-ingress-nginx-x-release-name, because it is not used anymore {"component": "vcluster"}
What did you expect to happen?
Both the manually synced secret and the one needed by the pod are synced and not deleted from the physical cluster.
How can we reproduce it (as minimally and precisely as possible)?
It can be reproduced by enabling/disabling the genericSync export of the secret
Anything else we need to know?
I tried some workarounds like enabling all secrets sync, but it does not stop the loop, it just starts creating and deleting all of the secrets
sync:
toHost:
secrets:
all: true
Host cluster Kubernetes version
```console
$ kubectl version
Server Version: version.Info{Major:"1", Minor:"30", GitVersion:"v1.30.0", GitCommit:"7c48c2bd72b9bf5c44d21d7338cc7bea77d0ad2a", GitTreeState:"clean", BuildDate:"2024-04-17T17:27:03Z", GoVersion:"go1.22.2", Compiler:"gc", Platform:"linux/amd64"}
```
vcluster version
```console
$ vcluster --version
vcluster version 0.20.0
```
What happened?
I created a SA and token on bootstrap using the
experimental.deploy.vcluster.manifests
feature. I configured theexperimental.genericSync.export
to sync the resulting secret from the virtual cluster into the physical one.This works as expected. But after that, when creating any kind of pod that mounts a secret on the virtual cluster (I tested nginx ingress controller) the pod is correctly synced to the physical cluster, but the secret is stuck on a loop of creating and deleting. Logs:
What did you expect to happen?
Both the manually synced secret and the one needed by the pod are synced and not deleted from the physical cluster.
How can we reproduce it (as minimally and precisely as possible)?
It can be reproduced by enabling/disabling the genericSync export of the secret
Anything else we need to know?
I tried some workarounds like enabling all secrets sync, but it does not stop the loop, it just starts creating and deleting all of the secrets
Host cluster Kubernetes version
vcluster version
VCluster Config