Skip to content

Commit 915f575

Browse files
fix(stamper): skip svcs without ClusterIP when in-cluster (#498)
* fix(stamper): skip svcs without ClusterIP when in-cluster * fix(stamper): correct logical operator from || to && in condition
1 parent 795f113 commit 915f575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/k8s/service/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (c *Client) GetNodes(ctx context.Context, namespace, labelSelector string)
9292
// filter out services with api port and return clusterIP as Endpoint
9393
for _, svc := range svcs.Items {
9494
for _, port := range svc.Spec.Ports {
95-
if port.Name == "api" {
95+
if port.Name == "api" && svc.Spec.ClusterIP != "None" {
9696
nodes = append(nodes, NodeInfo{
9797
Name: svc.Name,
9898
Endpoint: fmt.Sprintf("http://%s:%v", svc.Spec.ClusterIP, port.Port),

0 commit comments

Comments
 (0)