-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly set the PVC's storageClassName
to default
#51
Explicitly set the PVC's storageClassName
to default
#51
Conversation
Skipping CI for Draft Pull Request. |
c07ed17
to
7b85be4
Compare
7b85be4
to
40a6d73
Compare
In the registry-cache extension we deploy PVCs to the Shoot. We see cases where the PVC and StorageClass creation can be racy. In K8s < 1.26, when the default StorageClass is created after the PVC, the PVC hangs in Pending state with reason `no persistent volumes available for this claim and no storage class is set`. In K8s, there is a feature gate called `RetroactiveDefaultStorageClass` which makes possible the StorageClass from PVC to be set when the PVC is created before the StorageClass. See https://kubernetes.io/docs/concepts/storage/persistent-volumes/#retroactive-default-storageclass-assignment In the registry-cache extension we decided to hard-code the StorageClass name to `default` for time being. When it is ensured that `RetroactiveDefaultStorageClass` is enabled by default in the supported K8s versions, then we can drop this.
gardener/[email protected] contains cherry-pick of gardener/gardener#8565.
db671de
to
7b41748
Compare
/approve |
629740b
to
de70605
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 81ff1d8557f1c79d508f87c1f508f37a52e3f86c
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dimitar-kostadinov, ialidzhikov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
How to categorize this PR?
/kind bug
What this PR does / why we need it:
In the registry-cache extension we deploy PVCs to the Shoot. We see cases where the PVC and StorageClass creation can be racy. In K8s < 1.26, when the default StorageClass is created after the PVC, the PVC hangs in Pending state with reason
no persistent volumes available for this claim and no storage class is set
. In K8s, there is a feature gate calledRetroactiveDefaultStorageClass
which makes possible the StorageClass from PVC to be set when the PVC is created before the StorageClass. See https://kubernetes.io/docs/concepts/storage/persistent-volumes/#retroactive-default-storageclass-assignment In the registry-cache extension we decided to hard-code the StorageClass name todefault
for time being. When it is ensured thatRetroactiveDefaultStorageClass
is enabled by default in the supported K8s versions, then we can drop this.UPDATE: We need to explicitly set the spec.storageClassName to default as marking the Gardener managed StorageClass as the default one is configurable on provider extensions side. For example, for provider-aws see the storage.managedDefaultClass field in the ControlPlaneConfig (https://github.com/gardener/gardener-extension-provider-aws/blob/v1.48.0/docs/usage/usage.md#controlplaneconfig).
Which issue(s) this PR fixes:
Part of #3
Special notes for your reviewer:
✅
The PR depends on gardener/gardener#8565 to make the e2e tests happy.Release note: