Skip to content

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

@1stewart

Description

@1stewart




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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions