popeye icon indicating copy to clipboard operation
popeye copied to clipboard

Can't filter containers in spinach.yaml for deployments

Open 1stewart opened this issue 3 years ago • 1 comments




Describe the bug Can't filter containers in spinach.yaml for deployments. Filtering by deployment FQN or code works as expected.

To Reproduce

  1. Have a report with a deployment warning for no resources/limits on a container

image

  1. Create a spinach.yaml file with the following content
popeye:
  excludes:
    apps/v1/deployments:
      - name: linkerd/linkerd-controller
        codes:
          - 106
  1. Run with the spinach.yaml passed in .\popeye.exe --save --out html -l warn -f .\spinach.yaml

As expected, the warn isn't there

image

  1. 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
  1. Run with the spinach.yaml passed in .\popeye.exe --save --out html -l warn -f .\spinach.yaml

  2. Container isn't picked up by configuration, fails back to showing non-matched deployment

image

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

1stewart avatar Sep 24 '21 14:09 1stewart

+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.

io-timeout avatar Aug 01 '22 11:08 io-timeout