-
Notifications
You must be signed in to change notification settings - Fork 523
Open
Labels
Description
What happened?
We have vclusters since 0.14 (or earlier), which some were created with fake-pv=true
. Before upgrading a vcluster called vcluster--sshd-gateway
, there are 2 PVs labeled as fake-pv
:
kubectl get pv -l vcluster.loft.sh/fake-pv=true | grep sshd-gateway
pvc-081794f4-0f6d-4937-a6ec-ff60a5640d6d 10Gi ROX Delete Bound vcluster--sshd-gateway/slac-apps-x-dev-x-vcluster--sshd-gateway wekafs--sdf-k8s01 <unset> 721d
pvc-0bf51f69-eb2a-4fcf-be6b-612a00ecebfc 10Gi ROX Delete Bound vcluster--sshd-gateway/slac-apps-x-prod-x-vcluster--sshd-gateway wekafs--sdf-k8s01 <unset> 707d
then, after upgrading to 0.26.1 (we tried first 0.26.0), we see:
pvc-081794f4-0f6d-4937-a6ec-ff60a5640d6d 10Gi ROX Delete Bound vcluster--sshd-gateway/slac-apps-x-dev-x-vcluster--sshd-gateway vcluster-wekafs--sdf-k8s01-x-vcluster--sshd-gateway--c4bd828f58 <unset> 721d
pvc-0bf51f69-eb2a-4fcf-be6b-612a00ecebfc 10Gi ROX Delete Bound vcluster--sshd-gateway/slac-apps-x-prod-x-vcluster--sshd-gateway vcluster-wekafs--sdf-k8s01-x-vcluster--sshd-gateway--c4bd828f58 <unset> 707d
which is a non-existing storageClass
, causing a fair amount of failed APIServer Events.
What did you expect to happen?
After upgrading, PV should keep the original storageClass
that it had prior to the upgrade.
How can we reproduce it (as minimally and precisely as possible)?
- Create a vCluster with
--set sync.fake-persistentvolumes.enabled: true
. For us they were created with minimum values in version v0.7.1 - Create a PV+PVC in the vcluster context without specifying the
storageClass
(so it defaults) - the PV and PVC should show the correct
storageClass
both at the vcluster and parent context - Upgrade the vcluster 1 minor at a time up to 0.25.0.
- Upgrade from 0.25.0 to 0.26.
Anything else we need to know?
Our default storageClass has always been wekafs--sdf-k8s01
.
Within the vcluster context the PVs looks as they should:
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS VOLUMEATTRIBUTESCLASS REASON AGE
pvc-081794f4-0f6d-4937-a6ec-ff60a5640d6d 10Gi ROX Delete Bound dev/slac-apps wekafs--sdf-k8s01 <unset> 721d
pvc-0bf51f69-eb2a-4fcf-be6b-612a00ecebfc 10Gi ROX Delete Bound prod/slac-apps wekafs--sdf-k8s01 <unset> 707d
sync.fake-persistentvolumes.enabled: true
was disabled in release 0.14.
Host cluster Kubernetes version
```console
$ kubectl version
Client Version: v1.32.5
Kustomize Version: v5.5.0
Server Version: v1.32.5
```
vcluster version
```console
$ vcluster --version
vcluster version 0.27.0
```
VCluster Config
# Sync describes how to sync resources from the virtual cluster to host cluster and back.
sync:
toHost:
ingresses:
enabled: true
volumeSnapshots:
enabled: true
volumeSnapshotContents:
enabled: true
persistentVolumes:
enabled: true
fromHost:
csiDrivers:
enabled: true
csiNodes:
enabled: true
csiStorageCapacities:
enabled: true
storageClasses:
enabled: true
ingressClasses:
enabled: true
nodes:
enabled: true
controlPlane:
distro:
k8s:
enabled: true
version: "${K8S_VERSION}"
imagePullPolicy: ""
image:
registry: ghcr.io
repository: "loft-sh/kubernetes"
tag: "$v1.32.5"
apiServer:
enabled: true
backingStore:
database:
embedded:
enabled: false
external:
enabled: false
backingStore:
etcd:
deploy:
enabled: true
highAvailability:
replicas: 3
statefulSet:
image:
repository: "loft-sh/vcluster-oss"
policies:
resourceQuota:
enabled: false
limitRange:
enabled: false
telemetry:
enabled: false