Skip to content

Commit

Permalink
Merge pull request #148 from digitalocean/mrieger/fix/CON-7086
Browse files Browse the repository at this point in the history
fix: Clusterlint panic on valid PVCs when storageClassName specified as annotation
  • Loading branch information
mo-rieger authored Aug 5, 2022
2 parents 87ddf5e + f741391 commit 1f3819e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kube/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f3819e

Please sign in to comment.