descheduler icon indicating copy to clipboard operation
descheduler copied to clipboard

allow namespace filter to use a namespace selector

Open raffaelespazzoli opened this issue 3 years ago • 17 comments
trafficstars

Problem description

in a cluster where namespaces are frequently created and destroyed (for example because tenants are onboarded and removed) listing the included/excluded namespaces as an array makes it necessary to frequently patch the Policy object

Describe the solution you'd like a namespace selector (based on label) can be specified in alternative to the include/exclude list. This is the standard that is followed by many other operators.

Describe alternatives you've considered none

What version of descheduler are you using? latest

Additional context

raffaelespazzoli avatar Aug 05 '22 17:08 raffaelespazzoli

yet, good idea~~ would you like to have a try on this feature ? @raffaelespazzoli

JaneLiuL avatar Aug 10 '22 07:08 JaneLiuL

I also like the flexibility it brings but should we do this work as part of descheduler/v1alpha2 initiative? Given the breaking changes.

cc: @ingvagabund @damemi

a7i avatar Aug 14 '22 15:08 a7i

Would it be a breaking change to make the namespace include/exclude fields a regex? Current settings with alphanumeric namespace strings would still only match the exact name, so the functionality is the same. As long as no regex special characters are allowed in k8s namespace names.

I am not sure about taking a labelling approach as it decouples descheduler config from the descheduler itself, which I could see causing headaches

damemi avatar Aug 16 '22 14:08 damemi

In my organization, we're discussing use-cases around skipping a namespace via a label. Currently, we have to re-deploy Descheduler to exclude a namespace. [Alternatively, we can label each Deployment as well]

It would be ideal for us to label a namespace and have it be ignored by Descheduler. example:

kind: Namespace
apiVersion: v1
metadata:
  name: example
  labels:
    descheduler.k8s.io/opt-out: "true"

Where my Descheduler configuration would define a namespaceSelector at a plugin definition:

 namespaceSelector:
   matchExpressions:
   - key: descheduler.k8s.io/opt-out
     operator: NotIn
     values: ["true"]

cc: @jklaw90

a7i avatar Aug 17 '22 17:08 a7i

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

This bot triages issues and PRs 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 or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Nov 15 '22 18:11 k8s-triage-robot

/remove-lifecycle stale

aslafy-z avatar Nov 15 '22 18:11 aslafy-z

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-triage-robot avatar Feb 13 '23 19:02 k8s-triage-robot

/remove-lifecycle stale

aslafy-z avatar Feb 13 '23 20:02 aslafy-z

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-triage-robot avatar May 14 '23 20:05 k8s-triage-robot

/remove-lifecycle stale

aslafy-z avatar May 14 '23 20:05 aslafy-z

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-triage-robot avatar Jan 20 '24 09:01 k8s-triage-robot

The Kubernetes project currently lacks enough active 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 rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

k8s-triage-robot avatar Feb 19 '24 10:02 k8s-triage-robot

/remove-lifecycle rotten

aslafy-z avatar Feb 19 '24 10:02 aslafy-z

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-triage-robot avatar May 19 '24 10:05 k8s-triage-robot