From 5ae9ad46b4aa148f10890afe4c5344992b20f019 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 25 Feb 2024 20:34:29 -0500 Subject: [PATCH] feat: install keda addon in k3s cluster --- plugins/scheduler-k3s/scheduler_k3s.go | 8 ++++++++ plugins/scheduler-k3s/templates/helm-config/keda.yaml | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 plugins/scheduler-k3s/templates/helm-config/keda.yaml diff --git a/plugins/scheduler-k3s/scheduler_k3s.go b/plugins/scheduler-k3s/scheduler_k3s.go index 9064124fc..62ce97ed4 100644 --- a/plugins/scheduler-k3s/scheduler_k3s.go +++ b/plugins/scheduler-k3s/scheduler_k3s.go @@ -112,6 +112,14 @@ var HelmCharts = []HelmChart{ RepoURL: "https://kubernetes.github.io/ingress-nginx", Version: "4.7.5", }, + { + ChartPath: "keda", + CreateNamespace: true, + Namespace: "keda", + ReleaseName: "keda", + RepoURL: "https://kedacore.github.io/charts", + Version: "2.13.1", + }, } type HelmRepository struct { diff --git a/plugins/scheduler-k3s/templates/helm-config/keda.yaml b/plugins/scheduler-k3s/templates/helm-config/keda.yaml new file mode 100644 index 000000000..84c158085 --- /dev/null +++ b/plugins/scheduler-k3s/templates/helm-config/keda.yaml @@ -0,0 +1,10 @@ +--- +tolerations: + - key: CriticalAddonsOnly + operator: Exists + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule