Skip to content

Commit

Permalink
feat(helm): install descheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao committed Dec 3, 2024
1 parent 6e49589 commit 7e76029
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kubernetes/raspberry/flux/repositories/helm/descheduler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://github.com/fluxcd-community/flux2-schemas/raw/main/helmrepository-source-v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: descheduler
namespace: flux-system
spec:
interval: 2h
url: https://kubernetes-sigs.github.io/descheduler
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: Kustomization
resources:
- bjw-s.yaml
- cilium.yaml
- descheduler.yaml
- external-dns.yaml
- ingress-nginx.yaml
- jetstack.yaml
Expand Down
88 changes: 88 additions & 0 deletions kubernetes/raspberry/kube-system/descheduler/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
# yaml-language-server: $schema=https://github.com/fluxcd-community/flux2-schemas/raw/main/helmrelease-helm-v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app descheduler
namespace: kube-system
spec:
interval: 1h
chart:
spec:
chart: descheduler
version: 0.30.2
sourceRef:
kind: HelmRepository
name: descheduler
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
kind: Deployment
deschedulerPolicy:
profiles:
- name: Default
pluginConfig:
- name: DefaultEvictor
args:
evictFailedBarePods: true
evictLocalStoragePods: true
evictSystemCriticalPods: true
nodeFit: true
- name: RemoveDuplicates
- name: RemovePodsHavingTooManyRestarts
args:
podRestartThreshold: 100
includingInitContainers: true
- name: RemovePodsViolatingInterPodAntiAffinity
- name: RemovePodsViolatingNodeAffinity
args:
nodeAffinityType:
- requiredDuringSchedulingIgnoredDuringExecution
- name: RemovePodsViolatingNodeTaints
- name: RemovePodsViolatingTopologySpreadConstraint
args:
constraints:
- DoNotSchedule
- ScheduleAnyway
- name: LowNodeUtilization
namespaces:
exclude:
- "longhorn-system"
args:
thresholds:
cpu: 40
memory: 40
targetThresholds:
cpu: 60
memory: 60
plugins:
balance:
enabled:
- RemoveDuplicates
- RemovePodsViolatingTopologySpreadConstraint
- LowNodeUtilization
deschedule:
enabled:
- RemovePodsViolatingInterPodAntiAffinity
- RemovePodsViolatingNodeAffinity
- RemovePodsViolatingNodeTaints
service:
enabled: true
serviceMonitor:
enabled: true
leaderElection:
enabled: true
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
memory: 128Mi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helmrelease.yaml
21 changes: 21 additions & 0 deletions kubernetes/raspberry/kube-system/descheduler/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-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/raspberry/kube-system/descheduler/app
prune: true
sourceRef:
kind: GitRepository
name: flux-system
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
1 change: 1 addition & 0 deletions kubernetes/raspberry/kube-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cilium/ks.yaml
- descheduler/ks.yaml
- metrics-server/ks.yaml
- namespace.yaml

0 comments on commit 7e76029

Please sign in to comment.