Add descheduler.

This commit is contained in:
Joseph Hanson 2024-02-25 02:59:33 -06:00
parent e162275385
commit a207c47aa7
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
6 changed files with 104 additions and 2 deletions

View file

@ -0,0 +1,65 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: descheduler
spec:
interval: 30m
chart:
spec:
chart: descheduler
version: 0.29.0
sourceRef:
kind: HelmRepository
name: descheduler
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
replicas: 2
kind: Deployment
deschedulerPolicyAPIVersion: descheduler/v1alpha2
deschedulerPolicy:
profiles:
- name: Default
pluginConfig:
- name: DefaultEvictor
args:
evictFailedBarePods: true
evictLocalStoragePods: true
evictSystemCriticalPods: true
nodeFit: true
- name: RemovePodsViolatingInterPodAntiAffinity
- name: RemovePodsViolatingNodeAffinity
args:
nodeAffinityType:
- requiredDuringSchedulingIgnoredDuringExecution
- name: RemovePodsViolatingNodeTaints
- name: RemovePodsViolatingTopologySpreadConstraint
args:
constraints:
- DoNotSchedule
- ScheduleAnyway
plugins:
balance:
enabled:
- RemovePodsViolatingTopologySpreadConstraint
deschedule:
enabled:
- RemovePodsViolatingInterPodAntiAffinity
- RemovePodsViolatingNodeAffinity
- RemovePodsViolatingNodeTaints
service:
enabled: true
serviceMonitor:
enabled: true
leaderElection:
enabled: true

View file

@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

View file

@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app descheduler
namespace: flux-system
spec:
targetNamespace: kube-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/kube-system/descheduler/app
prune: true
sourceRef:
kind: GitRepository
name: homelab
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m

View file

@ -7,6 +7,7 @@ resources:
- ./namespace.yaml - ./namespace.yaml
# Flux-Kustomizations # Flux-Kustomizations
# - ./cilium/ks.yaml # - ./cilium/ks.yaml
- ./descheduler/ks.yaml
- ./metrics-server/ks.yaml - ./metrics-server/ks.yaml
- ./node-feature-discovery/ks.yaml - ./node-feature-discovery/ks.yaml
- ./reloader/ks.yaml - ./reloader/ks.yaml

View file

@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/source.toolkit.fluxcd.io/helmrepository_v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: descheduler
namespace: flux-system
spec:
interval: 2h
url: https://kubernetes-sigs.github.io/descheduler

View file

@ -11,7 +11,7 @@ resources:
- cloudnative-pg.yaml - cloudnative-pg.yaml
- crowdsec.yaml - crowdsec.yaml
- crunchydata.yaml - crunchydata.yaml
# - democratic-csi.yaml - descheduler.yaml
- dragonflydb.yaml - dragonflydb.yaml
- elastic.yaml - elastic.yaml
- external-secrets.yaml - external-secrets.yaml
@ -23,7 +23,6 @@ resources:
- jahanson.yaml - jahanson.yaml
- jetstack.yaml - jetstack.yaml
- kubernetes-sigs-nfd.yaml - kubernetes-sigs-nfd.yaml
# - kubernetes-sigs-descheduler.yaml
- kyverno.yaml - kyverno.yaml
- kubernetes-sigs-metrics-server.yaml - kubernetes-sigs-metrics-server.yaml
- kubernetes-sigs-external-dns.yaml - kubernetes-sigs-external-dns.yaml