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

Label selectors for compilation #387

Closed
adrianchifor opened this issue Oct 4, 2019 · 0 comments · Fixed by #388
Closed

Label selectors for compilation #387

adrianchifor opened this issue Oct 4, 2019 · 0 comments · Fixed by #388
Assignees
Labels
enhancement enhancement to an existing feature

Comments

@adrianchifor
Copy link
Member

adrianchifor commented Oct 4, 2019

Problem

Currently we can only selectively compile targets using -t flag. In cases where we can't remember target names or there are just too many targets to input, we need an alternative.

Proposal

Similar to how you can filter Kubernetes objects by label on kubectl with -l flag, I'm proposing an additional kapitan compile flag --labels, -l.

Spec and usage

class-inherited-by-dev-targets.yml:

kapitan:
  labels:
    env: dev

class-inherited-by-prod-targets.yml:

kapitan:
  labels:
    env: prod

Only compile dev targets:

kapitan compile -l env=dev
@adrianchifor adrianchifor added the enhancement enhancement to an existing feature label Oct 4, 2019
@adrianchifor adrianchifor self-assigned this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant