Add GA AnnStorageProvisioner annotation to PVC

This PR adds GA AnnStorageProvisioner annotation to
a PVC if the PVC requires dynamic provisioning. This
also deprecates the beta AnnStorageProvisioner annotation
and it will be removed in a later release.
This commit is contained in:
Jiawei Wang
2021-08-25 16:30:45 -07:00
parent 1767a94f15
commit 8de0f11946
5 changed files with 84 additions and 42 deletions

View File

@@ -401,7 +401,7 @@ func newClaim(name, claimUID, capacity, boundToVolume string, phase v1.Persisten
claim.Annotations = make(map[string]string)
for _, a := range annotations {
switch a {
case pvutil.AnnStorageProvisioner:
case pvutil.AnnBetaStorageProvisioner, pvutil.AnnStorageProvisioner:
claim.Annotations[a] = mockPluginName
default:
claim.Annotations[a] = "yes"