Skip to content

Commit

Permalink
Merge pull request #127 from hyperspike/pvc-bug
Browse files Browse the repository at this point in the history
bug(storage): Fix label assignment in PVCs
  • Loading branch information
dmolik authored Nov 27, 2024
2 parents 0509620 + 7395896 commit 0a07573
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/controller/valkey_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1730,8 +1730,12 @@ func generatePVC(valkey *hyperv1.Valkey) corev1.PersistentVolumeClaim {
if valkey.Spec.Storage != nil {
pv = *valkey.Spec.Storage
pv.ObjectMeta.Name = "valkey-data"
for k, v := range labels(valkey) {
pv.ObjectMeta.Labels[k] = v
if pv.ObjectMeta.Labels == nil {
pv.ObjectMeta.Labels = labels(valkey)
} else {
for k, v := range labels(valkey) {
pv.ObjectMeta.Labels[k] = v
}
}
}
return pv
Expand Down

0 comments on commit 0a07573

Please sign in to comment.