Created
February 21, 2022 19:15
-
-
Save jarrpa/bf7021492da07ef3037b65589d7e060f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/services/provider/server/server.go b/services/provider/server/server.go | |
index 17a83900..a0d67bca 100644 | |
--- a/services/provider/server/server.go | |
+++ b/services/provider/server/server.go | |
@@ -280,7 +280,11 @@ func (s *OCSProviderServer) getExternalResources(ctx context.Context, consumerRe | |
// Get mgr pod hostIP | |
podList := &corev1.PodList{} | |
- err = s.client.List(ctx, podList, client.MatchingLabels(map[string]string{"app": "rook-ceph-mgr"})) | |
+ listOpts := []client.ListOption{ | |
+ client.InNamespace(s.namespace), | |
+ client.MatchingLabels(map[string]string{"app": "rook-ceph-mgr"}), | |
+ } | |
+ err = s.client.List(ctx, podList, listOpts...) | |
if err != nil { | |
return nil, fmt.Errorf("failed to list pod with rook-ceph-mgr label. %v", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment