#% if bootstrap_distribution == 'k0s' %# --- apiVersion: k0sctl.k0sproject.io/v1beta1 kind: Cluster metadata: name: home-kubernetes spec: hosts: #% for item in bootstrap_nodes.master %# - role: controller+worker ssh: address: "#{ item.address }#" user: "#{ item.username }#" installFlags: - --disable-components=metrics-server - --no-taints hooks: apply: before: - curl -sfL https://raw.githubusercontent.com/#{ bootstrap_github_username }#/#{ bootstrap_github_repository_name }#/#{ bootstrap_advanced_flags.github_repository_branch|default('main', true) }#/kubernetes/k0s/resources/apply-system.sh | INSTALL_K0S_HOSTNAME="#{ item.name }#" bash -s - reset: before: - curl -sfL https://raw.githubusercontent.com/#{ bootstrap_github_username }#/#{ bootstrap_github_repository_name }#/#{ bootstrap_advanced_flags.github_repository_branch|default('main', true) }#/kubernetes/k0s/resources/reset-cilium.sh | bash -s - after: - curl -sfL https://raw.githubusercontent.com/#{ bootstrap_github_username }#/#{ bootstrap_github_repository_name }#/#{ bootstrap_advanced_flags.github_repository_branch|default('main', true) }#/kubernetes/k0s/resources/reset-system.sh | bash -s - #% endfor %# #% if bootstrap_nodes.worker | length > 0 %# #% for item in bootstrap_nodes.worker %# - role: worker ssh: address: "#{ item.address }#" user: "#{ item.username }#" hooks: apply: before: - curl -sfL https://raw.githubusercontent.com/#{ bootstrap_github_username }#/#{ bootstrap_github_repository_name }#/#{ bootstrap_advanced_flags.github_repository_branch|default('main', true) }#/kubernetes/k0s/resources/apply-system.sh | INSTALL_K0S_HOSTNAME="#{ item.name }#" bash -s - reset: before: - curl -sfL https://raw.githubusercontent.com/#{ bootstrap_github_username }#/#{ bootstrap_github_repository_name }#/#{ bootstrap_advanced_flags.github_repository_branch|default('main', true) }#/kubernetes/k0s/resources/reset-cilium.sh | bash -s - after: - curl -sfL https://raw.githubusercontent.com/#{ bootstrap_github_username }#/#{ bootstrap_github_repository_name }#/#{ bootstrap_advanced_flags.github_repository_branch|default('main', true) }#/kubernetes/k0s/resources/reset-system.sh | bash -s - #% endfor %# #% endif %# k0s: # renovate: datasource=github-releases depName=k0sproject/k0s version: "v1.28.5+k0s.0" dynamicConfig: false config: spec: telemetry: enabled: false controllerManager: extraArgs: # Required to monitor kube-controller-manager with kube-prometheus-stack bind-address: "0.0.0.0" scheduler: extraArgs: # Required to monitor kube-scheduler with kube-prometheus-stack bind-address: "0.0.0.0" storage: etcd: extraArgs: listen-metrics-urls: http://0.0.0.0:2381 # Required to monitor etcd with kube-prometheus-stack api: sans: #% if bootstrap_kube_api_addr %# - "#{ bootstrap_kube_api_addr }#" #% endif %# #% for item in bootstrap_kube_additional_tls_sans %# - "#{ item }#" #% endfor %# #% for item in bootstrap_nodes.master %# - "#{ item.address }#" - "#{ item.name }#" #% endfor %# network: podCIDR: "#{ bootstrap_cluster_cidr.split(',')[0] }#" serviceCIDR: "#{ bootstrap_service_cidr.split(',')[0] }#" provider: custom kubeProxy: disabled: true nodeLocalLoadBalancing: enabled: true type: EnvoyProxy extensions: helm: repositories: - name: cilium url: https://helm.cilium.io charts: - name: cilium chartname: cilium/cilium # renovate: datasource=github-releases depName=cilium/cilium version: "1.14.5" namespace: kube-system values: |2 #% filter indent(width=18, first=True) %# #% include 'partials/cilium-values-init.partial.yaml.j2' %# #% endfilter %# #% endif %#