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

Select/Exclude KRM resources passed to KRM functions #5787

Closed
2 tasks done
jashandeep-sohi opened this issue Oct 10, 2024 · 2 comments
Closed
2 tasks done

Select/Exclude KRM resources passed to KRM functions #5787

jashandeep-sohi opened this issue Oct 10, 2024 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@jashandeep-sohi
Copy link

jashandeep-sohi commented Oct 10, 2024

Eschewed features

  • This issue is not requesting templating, unstuctured edits, build-time side-effects from args or env vars, or any other eschewed feature.

What would you like to have added?

Allow specifying a selector to include or exclude KRM resources passed to a KRM function in the config.kubernetes.io/function spec annotation. Something similar to how KPT lets you do that, https://kpt.dev/book/04-using-functions/01-declarative-function-execution?id=specifying-selectors

For example, to only pass KRMs of kind Deployment:

    config.kubernetes.io/function: |
      container:
        image: krm-fn-image
      select:
        kind: Deployment

Or, to pass everything but all Deployment:

    config.kubernetes.io/function: |
      container:
        image: krm-fn-image
      exclude:
        kind: Deployment

select & exclude would naturally be mutually exclusive.

Why is this needed?

Sometimes you only want KRM functions to run on a subset of resources.

Can you accomplish the motivating task without this feature, and if so, how?

Perhaps. Every KRM function would have to implement some kind of selector/exclude logic.

What other solutions have you considered?

A wrapper exec KRM function that does the filtering and then calls the original KRM function.

Anything else we should know?

No response

Feature ownership

  • I am interested in contributing this feature myself! 🎉
@jashandeep-sohi jashandeep-sohi added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 10, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 10, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants