Skip to content

Commit dcb1344

Browse files
authored
Fix pod selection when initialize storage (#184)
1 parent 78d8e32 commit dcb1344

File tree

1 file changed

+3
-1
lines changed
  • internal/controllers/storage

1 file changed

+3
-1
lines changed

internal/controllers/storage/init.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/ydb-platform/ydb-kubernetes-operator/api/v1alpha1"
1818
. "github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants" //nolint:revive,stylecheck
1919
"github.com/ydb-platform/ydb-kubernetes-operator/internal/exec"
20+
"github.com/ydb-platform/ydb-kubernetes-operator/internal/labels"
2021
"github.com/ydb-platform/ydb-kubernetes-operator/internal/resources"
2122
)
2223

@@ -113,7 +114,8 @@ func (r *Reconciler) initializeStorage(
113114
// List Pods by label Selector
114115
podList := &corev1.PodList{}
115116
matchingLabels := client.MatchingLabels{}
116-
for k, v := range storage.Labels {
117+
storageLabels := labels.StorageLabels(storage.Unwrap())
118+
for k, v := range storageLabels {
117119
matchingLabels[k] = v
118120
}
119121
opts := []client.ListOption{

0 commit comments

Comments
 (0)