Merge pull request #148 from digitalocean/mrieger/fix/CON-7086

fix: Clusterlint panic on valid PVCs when storageClassName specified as annotation
master
Moritz Rieger 2022-08-05 13:58:13 +02:00 committed by GitHub
commit 1f3819e971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,8 @@ func (c *Client) FetchObjects(ctx context.Context, filter ObjectFilter) (*Object
}
for _, s := range objects.StorageClasses.Items {
if v, _ := s.Annotations["storageclass.kubernetes.io/is-default-class"]; v == "true" {
objects.DefaultStorageClass = &s
defaultStorageClass := s
objects.DefaultStorageClass = &defaultStorageClass
}
}
return