Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
fix cidr templating for ctl
Browse files Browse the repository at this point in the history
  • Loading branch information
poblin-orange committed Apr 20, 2023
1 parent a8fdd0a commit 47d6d98
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions jobs/k3s-server/templates/bin/ctl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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| %>
Expand Down

0 comments on commit 47d6d98

Please sign in to comment.