From 47d6d983de0e0e485520ee9878ad269083db29cf Mon Sep 17 00:00:00 2001 From: Pierre Oblin Date: Thu, 20 Apr 2023 19:11:17 +0200 Subject: [PATCH] fix cidr templating for ctl --- jobs/k3s-server/templates/bin/ctl.erb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/jobs/k3s-server/templates/bin/ctl.erb b/jobs/k3s-server/templates/bin/ctl.erb index 4a3582c8..dbfd1bcb 100755 --- a/jobs/k3s-server/templates/bin/ctl.erb +++ b/jobs/k3s-server/templates/bin/ctl.erb @@ -117,22 +117,15 @@ case $1 in <% end %> <% if_p('k3s.cluster-cidr') do |value| %> -<% p('k3s.cluster-cidr').each do |flag| %> - export FLAGS="$FLAGS --k3s.cluster-cidr=<%= flag %>" -<% end %> + export FLAGS="$FLAGS --cluster-cidr=<%= value %>" <% end %> -<% if_p('k3s.k3s.service-cidr') do |value| %> -<% p('k3s.k3s.service-cidr').each do |flag| %> - export FLAGS="$FLAGS --k3s.service-cidr=<%= flag %>" -<% end %> +<% if_p('k3s.service-cidr') do |value| %> + export FLAGS="$FLAGS --service-cidr=<%= value %>" <% end %> - <% if_p('k3s.cluster-dns') do |value| %> -<% p('k3s.cluster-dns').each do |flag| %> - export FLAGS="$FLAGS --cluster-dns=<%= flag %>" -<% end %> + export FLAGS="$FLAGS --cluster-dns=<%= value %>" <% end %> <% if_p('k3s.containerd_additional_env_vars') do |value| %>