diff --git a/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml b/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml new file mode 100644 index 00000000..2d6ad47a --- /dev/null +++ b/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml @@ -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 \ No newline at end of file diff --git a/kubernetes/apps/kube-system/descheduler/app/kustomization.yaml b/kubernetes/apps/kube-system/descheduler/app/kustomization.yaml new file mode 100644 index 00000000..2d7deaca --- /dev/null +++ b/kubernetes/apps/kube-system/descheduler/app/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml \ No newline at end of file diff --git a/kubernetes/apps/kube-system/descheduler/ks.yaml b/kubernetes/apps/kube-system/descheduler/ks.yaml new file mode 100644 index 00000000..4d91e2af --- /dev/null +++ b/kubernetes/apps/kube-system/descheduler/ks.yaml @@ -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 \ No newline at end of file diff --git a/kubernetes/apps/kube-system/kustomization.yaml b/kubernetes/apps/kube-system/kustomization.yaml index 079bf7c4..837079f5 100644 --- a/kubernetes/apps/kube-system/kustomization.yaml +++ b/kubernetes/apps/kube-system/kustomization.yaml @@ -7,6 +7,7 @@ resources: - ./namespace.yaml # Flux-Kustomizations # - ./cilium/ks.yaml + - ./descheduler/ks.yaml - ./metrics-server/ks.yaml - ./node-feature-discovery/ks.yaml - ./reloader/ks.yaml diff --git a/kubernetes/flux/repositories/helm/descheduler.yaml b/kubernetes/flux/repositories/helm/descheduler.yaml new file mode 100644 index 00000000..4a4a5a6a --- /dev/null +++ b/kubernetes/flux/repositories/helm/descheduler.yaml @@ -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 \ No newline at end of file diff --git a/kubernetes/flux/repositories/helm/kustomization.yaml b/kubernetes/flux/repositories/helm/kustomization.yaml index b320fa30..e5daf8e6 100644 --- a/kubernetes/flux/repositories/helm/kustomization.yaml +++ b/kubernetes/flux/repositories/helm/kustomization.yaml @@ -11,7 +11,7 @@ resources: - cloudnative-pg.yaml - crowdsec.yaml - crunchydata.yaml -# - democratic-csi.yaml + - descheduler.yaml - dragonflydb.yaml - elastic.yaml - external-secrets.yaml @@ -23,7 +23,6 @@ resources: - jahanson.yaml - jetstack.yaml - kubernetes-sigs-nfd.yaml -# - kubernetes-sigs-descheduler.yaml - kyverno.yaml - kubernetes-sigs-metrics-server.yaml - kubernetes-sigs-external-dns.yaml