Skip to content

Commit

Permalink
Add chart:consul-helm to label selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Eckert committed Jun 22, 2022
1 parent 8f8b0be commit 8ef4383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/cmd/proxy/list/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (c *ListCommand) fetchPods() ([]v1.Pod, error) {

// Fetch all pods in the namespace with labels matching the gateway component names.
gatewaypods, err := c.kubernetes.CoreV1().Pods(c.namespace).List(c.Ctx, metav1.ListOptions{
LabelSelector: "component in (ingress-gateway, mesh-gateway, terminating-gateway)",
LabelSelector: "component in (ingress-gateway, mesh-gateway, terminating-gateway), chart=consul-helm",
})
if err != nil {
return nil, err
Expand Down
4 changes: 4 additions & 0 deletions cli/cmd/proxy/list/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func TestFetchPods(t *testing.T) {
Namespace: "default",
Labels: map[string]string{
"component": "ingress-gateway",
"chart": "consul-helm",
},
},
},
Expand All @@ -90,6 +91,7 @@ func TestFetchPods(t *testing.T) {
Namespace: "default",
Labels: map[string]string{
"component": "mesh-gateway",
"chart": "consul-helm",
},
},
},
Expand All @@ -99,6 +101,7 @@ func TestFetchPods(t *testing.T) {
Namespace: "default",
Labels: map[string]string{
"component": "terminating-gateway",
"chart": "consul-helm",
},
},
},
Expand Down Expand Up @@ -153,6 +156,7 @@ func TestFetchPods(t *testing.T) {
Namespace: "default",
Labels: map[string]string{
"component": "mesh-gateway",
"chart": "consul-helm",
},
},
},
Expand Down

0 comments on commit 8ef4383

Please sign in to comment.