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

Enhancement request: admission webhook expression filter #148

Open
Zombro opened this issue Jun 3, 2024 · 1 comment
Open

Enhancement request: admission webhook expression filter #148

Zombro opened this issue Jun 3, 2024 · 1 comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. sig/windows Categorizes an issue or PR as relevant to SIG Windows.

Comments

@Zombro
Copy link

Zombro commented Jun 3, 2024

issue

gmsa admission webhook intercepts everything, including pods that have nothing to do with gmsa.

image

the gmsa mutating webhook has no object selector / match expressions. it may be preferable to incorporate a few filters as this chart moves forward with k8s.

the easy move forward might be something like an objectSelector that matches a label like gmsa-mutate: true

a more hands-free future solution could leverage match conditions testing existence of spec securityContext.windowsOptions.gmsaCredentialSpecName

references

took a look at - https://github.com/kubernetes-sigs/windows-gmsa/pull/145/files. good. this mostly circumvents the issue.

last year k8s added enhancement to support expression filters in webhooks kubernetes/enhancements#3716, marked stable in v1.30+

k8s docs
object filter - start here: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector,
fancy new CEL expressions (1.30+): https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions

@Zombro Zombro added the sig/windows Categorizes an issue or PR as relevant to SIG Windows. label Jun 3, 2024
@Zombro Zombro changed the title Enhancement request: lfuture k8s: admission webhook expression filter Enhancement request: admission webhook expression filter Jun 3, 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 Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. sig/windows Categorizes an issue or PR as relevant to SIG Windows.
Projects
None yet
Development

No branches or pull requests

3 participants