Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't filter containers in spinach.yaml for deployments #200

Open
1stewart opened this issue Sep 24, 2021 · 1 comment
Open

Can't filter containers in spinach.yaml for deployments #200

1stewart opened this issue Sep 24, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@1stewart
Copy link

1stewart commented Sep 24, 2021




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

@derailed derailed added the bug Something isn't working label Oct 28, 2021
@io-timeout
Copy link

io-timeout commented Aug 1, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants