-
-
Notifications
You must be signed in to change notification settings - Fork 327
Description
Describe the bug
For the SERVICES
checks all services are reporting [POP-1109] Single endpoint is associated with this service.
However this is not the case.
An example of one of the warnings produced is:
· traefik/traefik-metrics........................................................................😱
😱 [POP-1109] Single endpoint is associated with this service.
But if I look at the endpoints for this there are more than one:
$ kubectl -n traefik get endpoints
NAME ENDPOINTS AGE
traefik-metrics 10.9.128.150:9200,10.9.128.222:9200,10.9.129.168:9200 + 3 more... 12d
Or in more detail from the kubectl -n traefik get endpoints -o yaml traefik-metrics
command:
apiVersion: v1
kind: Endpoints
metadata:
annotations:
endpoints.kubernetes.io/last-change-trigger-time: "2024-02-28T01:50:38Z"
creationTimestamp: "2024-02-28T01:50:24Z"
labels:
app.kubernetes.io/component: metrics
app.kubernetes.io/instance: traefik-traefik
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: traefik
helm.sh/chart: traefik-26.1.0
name: traefik-metrics
namespace: traefik
resourceVersion: "14073"
uid: 1c75b85b-df16-4d73-b74f-338457f41350
subsets:
- addresses:
- ip: 10.9.128.150
nodeName: i-0d75932ff80159969
targetRef:
kind: Pod
name: traefik-8gvs7
namespace: traefik
uid: e5646859-a0e6-402a-8acd-0824aeaaa0f2
- ip: 10.9.128.222
nodeName: i-0ee22b17bffdb7461
targetRef:
kind: Pod
name: traefik-xmjr8
namespace: traefik
uid: 5778a08d-d5b8-4444-8353-98950c20e65c
- ip: 10.9.129.168
nodeName: i-0b233037342313af8
targetRef:
kind: Pod
name: traefik-kvw8j
namespace: traefik
uid: 472fb300-8422-44d0-970a-150caa5e93c2
- ip: 10.9.129.186
nodeName: i-005173f692492bbf2
targetRef:
kind: Pod
name: traefik-tfjbm
namespace: traefik
uid: 43abfd55-d771-47e3-9ce2-94428fae0491
- ip: 10.9.130.61
nodeName: i-049e48f99d51a727a
targetRef:
kind: Pod
name: traefik-sqjpv
namespace: traefik
uid: d51b18a5-dcb8-47c3-a0ec-28a9257a4abf
- ip: 10.9.130.82
nodeName: i-092198aa0e9ae66cc
targetRef:
kind: Pod
name: traefik-99kgs
namespace: traefik
uid: 85fdeac6-8d91-41b0-ba8d-efb80086aaf6
ports:
- name: metrics
port: 9200
protocol: TCP
The code in internal/lint/svc.go
seems to be:
if len(ep.Subsets) == 1 {
s.AddCode(ctx, 1109)
}
And indeed the YAML above only has one list item in subsets, however that subset contains multiple addresses and these haven't been catered for.
To Reproduce
Steps to reproduce the behavior:
- Use
popeye
versionv0.21.0
- In a cluster with services that have multiple endpoints run:
popeye -A -s services
- See that the services that have multiple endpoints have the
[POP-1109] Single endpoint is associated with this service.
warning against them.
Expected behavior
This is a false alert and it shouldn't be saying that services only have one endpoint when they have 2 or more.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- OS:
Debian Linux (12 stable / bookworm)
- Popeye:
0.21.0
- K8s:
1.28.7
Additional context
Add any other context about the problem here.