Files
home-cluster/bootstrap/templates/kubernetes/k0s/k0sctl.yaml.j2
T
Devin Buhl 90ca5f026f fix: address talos comments (#1253)
* fix: update cni to cilium in taskfile

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: more updates

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: more cleanup

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: housekeeping

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
2024-01-26 14:59:11 -05:00

96 lines
4.3 KiB
YAML

---
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.ssh.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 -
- 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-kube-vip.sh | 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 %#
#% for item in bootstrap_nodes.worker %#
- role: worker
ssh:
address: "#{ item.address }#"
user: "#{ item.ssh.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 %#
k0s:
# renovate: datasource=github-releases depName=k0sproject/k0s
version: v1.28.6+k0s.0
dynamicConfig: false
config:
spec:
telemetry:
enabled: false
controllerManager:
extraArgs:
bind-address: "0.0.0.0"
scheduler:
extraArgs:
bind-address: "0.0.0.0"
storage:
etcd:
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
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=helm depName=cilium repository=https://helm.cilium.io
version: 1.14.6
namespace: kube-system
values: |2
#% filter indent(width=18, first=True) %#
#% include 'partials/cilium-values-init.partial.yaml.j2' %#
#% endfilter %#