From fb01c43e0206cbc8fb4a740058f972d08d42685c Mon Sep 17 00:00:00 2001 From: Pierre Oblin Date: Tue, 25 Apr 2023 00:04:54 +0200 Subject: [PATCH] add support for server disable-kube-proxy --- jobs/k3s-server/spec | 3 +++ jobs/k3s-server/templates/bin/ctl.erb | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/jobs/k3s-server/spec b/jobs/k3s-server/spec index aa17ffa4..ac894495 100644 --- a/jobs/k3s-server/spec +++ b/jobs/k3s-server/spec @@ -70,6 +70,9 @@ properties: k3s.disable-network-policy: description: "(components) Disable k3s default network policy controller" + k3s.disable-kube-proxy: + description: "(components) Disable running kube-proxy" + k3s.token: description: (cluster) Shared secret used to join a server or agent to a cluster [$K3S_TOKEN] diff --git a/jobs/k3s-server/templates/bin/ctl.erb b/jobs/k3s-server/templates/bin/ctl.erb index ae158396..1fbae95a 100755 --- a/jobs/k3s-server/templates/bin/ctl.erb +++ b/jobs/k3s-server/templates/bin/ctl.erb @@ -69,6 +69,12 @@ case $1 in export FLAGS="$FLAGS --disable-network-policy" <% end %> +<% if_p('k3s.disable-kube-proxy') do |value| %> + export FLAGS="$FLAGS --disable-kube-proxy" +<% end %> + + + <% if_p('k3s.node-labels') do |value| %> <% p('k3s.node-labels').each do |label| %>