descheduler
descheduler copied to clipboard
allow namespace filter to use a namespace selector
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
yet, good idea~~ would you like to have a try on this feature ? @raffaelespazzoli
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
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
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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
/remove-lifecycle stale
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
/remove-lifecycle stale
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
/remove-lifecycle stale
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
/remove-lifecycle rotten
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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