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

Add annotation / label selectors #9

Open
eytan-avisror opened this issue Jan 21, 2022 · 0 comments
Open

Add annotation / label selectors #9

eytan-avisror opened this issue Jan 21, 2022 · 0 comments
Labels

Comments

@eytan-avisror
Copy link
Collaborator

eytan-avisror commented Jan 21, 2022

We should add annotation / label selectors for convenience under scope.

For example, instead of a basic namespaced scope:

  - name: pods
    apiVersion: v1
    names:
      include: 
      - "*"
    namespaces:
      include:
      - "kube-system"
    fields: 
    - path: .status.phase=running
    required: true

We can add scope for annotations and/or labels under scope

  - name: pods
    apiVersion: v1
    annotations:
      include:
      - some-key: some-value
    labels:
      include:
      - some-key: some-value
    namespaces:
      include:
      - "kube-system"
      
    fields: 
    - path: .status.phase=running
    required: true

This would be particularly useful in the case where resources have names that are less relevant, such as nodes, but scope selection would make more sense using labels or annotations e.g. all nodes with a specific role

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant