From 2e339680b2962d1265b8c6948d3bcea9394b40bd Mon Sep 17 00:00:00 2001 From: Jean-Christophe LOSAPIO Date: Tue, 29 Oct 2024 17:07:51 +0100 Subject: [PATCH] add scheduler config file parameter --- jobs/k3s-server/spec | 12 ++++++++++++ .../templates/config/scheduler-config.yaml.erb | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 jobs/k3s-server/templates/config/scheduler-config.yaml.erb diff --git a/jobs/k3s-server/spec b/jobs/k3s-server/spec index 8bd8d0cb..111d909d 100644 --- a/jobs/k3s-server/spec +++ b/jobs/k3s-server/spec @@ -225,6 +225,18 @@ properties: shutdownGracePeriod: 30s shutdownGracePeriodCriticalPods: 10s +# scheduler config + k3s.scheduler-config-file: + description: content of scheduler config file, to enable tuning + # Note: no default set. no scheduler config file by default + # default: | + # # This is an example config that sets percentageOfNodesToScore to 50% + # apiVersion: kubescheduler.config.k8s.io/v1alpha1 + # kind: KubeSchedulerConfiguration + # algorithmSource: + # provider: DefaultProvider + # percentageOfNodesToScore: 50 + k3s.containerd_additional_env_vars: description: additional env vars (name/value map array) to set for containerd (the key will be prefixed with CONTAINERD_, and set in k3s launch context default: [] diff --git a/jobs/k3s-server/templates/config/scheduler-config.yaml.erb b/jobs/k3s-server/templates/config/scheduler-config.yaml.erb new file mode 100644 index 00000000..244c1338 --- /dev/null +++ b/jobs/k3s-server/templates/config/scheduler-config.yaml.erb @@ -0,0 +1,3 @@ +<% if_p('k3s.scheduler-config-file') do |value| %> +<%= p('k3s.scheduler-config-file') %> +<% end %> \ No newline at end of file