Mercurial > code > home > repos > infra
comparison kube.py @ 107:d70816c7c7db
fix pipe net forwarding after update to ubuntu 22.04
author | drewp |
---|---|
date | Tue, 19 Jul 2022 17:40:02 -0700 |
parents | 8b8ef9d8f0fd |
children | 301869fa0ed6 |
comparison
equal
deleted
inserted
replaced
106:5faa7e3aa38f | 107:d70816c7c7db |
---|---|
62 server.sysctl(key='net.ipv4.conf.default.rp_filter', value=loose, persist=True) | 62 server.sysctl(key='net.ipv4.conf.default.rp_filter', value=loose, persist=True) |
63 | 63 |
64 if is_pi: | 64 if is_pi: |
65 pi_cgroup_setup() | 65 pi_cgroup_setup() |
66 | 66 |
67 # https://github.com/k3s-io/k3s/issues/1812 unclear | |
68 server.shell(commands=[ | |
69 'update-alternatives --set iptables /usr/sbin/iptables-legacy', | |
70 'update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy', | |
71 ]) | |
72 # needs reboot if this changed | |
73 | |
74 | 67 |
75 def config_and_run_service(): | 68 def config_and_run_service(): |
76 download_k3s() | 69 download_k3s() |
77 service_name = 'k3s.service' if host.name == server_node else 'k3s-node.service' | 70 service_name = 'k3s.service' if host.name == server_node else 'k3s-node.service' |
78 role = 'server' if host.name == server_node else 'agent' | 71 role = 'server' if host.name == server_node else 'agent' |
107 files.directory(path='/etc/rancher/k3s') | 100 files.directory(path='/etc/rancher/k3s') |
108 | 101 |
109 # docs: https://rancher.com/docs/k3s/latest/en/installation/private-registry/ | 102 # docs: https://rancher.com/docs/k3s/latest/en/installation/private-registry/ |
110 # user confusions: https://github.com/rancher/k3s/issues/1802 | 103 # user confusions: https://github.com/rancher/k3s/issues/1802 |
111 files.template(src='templates/kube/registries.yaml.j2', dest='/etc/rancher/k3s/registries.yaml') | 104 files.template(src='templates/kube/registries.yaml.j2', dest='/etc/rancher/k3s/registries.yaml') |
105 # also note that podman dropped the default `docker.io/` prefix on image names (see https://unix.stackexchange.com/a/701785/419418) | |
112 config_and_run_service() | 106 config_and_run_service() |
113 | 107 |
114 if host.name in admin_from: | 108 if host.name in admin_from: |
115 files.directory(path='/etc/rancher/k3s') | 109 files.directory(path='/etc/rancher/k3s') |
116 install_skaffold() | 110 install_skaffold() |