popeye
popeye copied to clipboard
Can't filter containers in spinach.yaml for deployments

Describe the bug Can't filter containers in spinach.yaml for deployments. Filtering by deployment FQN or code works as expected.
To Reproduce
- Have a report with a deployment warning for no resources/limits on a container
- Create a spinach.yaml file with the following content
popeye:
excludes:
apps/v1/deployments:
- name: linkerd/linkerd-controller
codes:
- 106
- Run with the spinach.yaml passed in
.\popeye.exe --save --out html -l warn -f .\spinach.yaml
As expected, the warn isn't there
- Create a spinach.yaml file with the following content (adding the container)
popeye:
excludes:
apps/v1/deployments:
- name: linkerd/linkerd-controller
containers:
- public-api
codes:
- 106
-
Run with the spinach.yaml passed in
.\popeye.exe --save --out html -l warn -f .\spinach.yaml
-
Container isn't picked up by configuration, fails back to showing non-matched deployment
Expected behavior (I think) it should allow filtering to containers, unless this is a limitation of the deployments API and the way they're referenced in its spec.
kubectl get deployment -n linkerd linkerd-controller -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:
...
name: linkerd-controller
namespace: linkerd
...
spec:
...
template:
...
spec:
containers:
- args:
- public-api
...
...
name: public-api
Versions (please complete the following information):
- OS: Windows 10
- Popeye: 0.9.7 (also on 0.9.0)
- K8s 1.20.0
Additional context Ideally we don't want to filter the whole deployment or popeye code, as any other containers would require limits/requests
+1
Can confirm that this only seems to allow filtering of error codes for specific containers when used under excludes.v1/pods
Have attempted to use the pattern described by the OP to filter error codes under specific containers for daemonsets, deployments and statefulsets and this does not work.