From 417bdccf187b3f55fdfa92e46355244b6b098a40 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Thu, 11 Jan 2024 14:46:50 -0600 Subject: [PATCH] Talos --> k3s --- config-parts/service-dhcp_server.sh | 4 +- containers/.gitignore | 1 - containers/haproxy-k3s/.gitignore | 9 ----- containers/haproxy-k3s/config/haproxy.cfg | 48 ----------------------- containers/haproxy/config/haproxy.cfg | 20 +--------- 5 files changed, 3 insertions(+), 79 deletions(-) delete mode 100644 containers/haproxy-k3s/.gitignore delete mode 100644 containers/haproxy-k3s/config/haproxy.cfg diff --git a/config-parts/service-dhcp_server.sh b/config-parts/service-dhcp_server.sh index 13e4d9e..ac3e7ff 100644 --- a/config-parts/service-dhcp_server.sh +++ b/config-parts/service-dhcp_server.sh @@ -45,7 +45,7 @@ set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-ma # k8s prod workers set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping nenya ip-address '10.1.1.41' -set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping nenya mac-address 'c8:1f:66:10:4d:b9' +set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping nenya mac-address '00:a0:98:1a:5e:ed' set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping vilya ip-address '10.1.1.42' set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping vilya mac-address 'c8:1f:66:10:51:d9' set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping gollum ip-address '10.1.1.43' @@ -65,8 +65,6 @@ set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-ma # VMs set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping tulkas ip-address '10.1.1.53' set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping tulkas mac-address '26:82:2F:16:7A:36' -set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping qbee ip-address '10.1.1.55' -set service dhcp-server shared-network-name SERVERS subnet 10.1.1.0/24 static-mapping qbee mac-address '00:a0:98:00:a6:72' # k8s prod masters diff --git a/containers/.gitignore b/containers/.gitignore index 06912f5..de2fc1d 100644 --- a/containers/.gitignore +++ b/containers/.gitignore @@ -7,6 +7,5 @@ !/bind/ !/dnsdist/ !/haproxy/ -!/haproxy-k3s/ !/unifi/ !/vector-agent/ diff --git a/containers/haproxy-k3s/.gitignore b/containers/haproxy-k3s/.gitignore deleted file mode 100644 index 8842544..0000000 --- a/containers/haproxy-k3s/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -# Ignore everything -/* - -# Track certain files and directories -!.gitignore - -!/config/ -/config/* -!/config/haproxy.cfg diff --git a/containers/haproxy-k3s/config/haproxy.cfg b/containers/haproxy-k3s/config/haproxy.cfg deleted file mode 100644 index f60c1ff..0000000 --- a/containers/haproxy-k3s/config/haproxy.cfg +++ /dev/null @@ -1,48 +0,0 @@ -#--------------------------------------------------------------------- -# Global settings -#--------------------------------------------------------------------- -global - log /dev/log local0 - log /dev/log local1 notice - daemon - -#--------------------------------------------------------------------- -# common defaults that all the 'listen' and 'backend' sections will -# use if not designated in their block -#--------------------------------------------------------------------- -defaults - mode http - log global - option httplog - option dontlognull - option http-server-close - option forwardfor except 127.0.0.0/8 - option redispatch - retries 3 - timeout http-request 10s - timeout queue 20s - timeout connect 10s - timeout client 1h - timeout server 1h - timeout http-keep-alive 10s - timeout check 10s - -#--------------------------------------------------------------------- -# apiserver frontend which proxys to the control plane nodes -#--------------------------------------------------------------------- -frontend k8s_apiserver - bind *:6443 - mode tcp - option tcplog - default_backend k8s_controlplane - -#--------------------------------------------------------------------- -# round robin balancing for apiserver -#--------------------------------------------------------------------- -backend k8s_controlplane - option httpchk GET /healthz - http-check expect status 200 - mode tcp - option ssl-hello-chk - balance roundrobin - server worker2 10.1.1.55:6443 check diff --git a/containers/haproxy/config/haproxy.cfg b/containers/haproxy/config/haproxy.cfg index f9a5302..569b0d5 100644 --- a/containers/haproxy/config/haproxy.cfg +++ b/containers/haproxy/config/haproxy.cfg @@ -34,13 +34,7 @@ frontend k8s_apiserver bind *:6443 mode tcp option tcplog - default_backend k8s_controlplane - -frontend talos_apiserver - bind *:50000 - mode tcp - option tcplog - default_backend talos_controlplane + default_backend k8s_controlplane #--------------------------------------------------------------------- # round robin balancing for apiserver @@ -53,14 +47,4 @@ backend k8s_controlplane balance roundrobin server worker1 10.1.1.61:6443 check server worker2 10.1.1.62:6443 check - server worker3 10.1.1.63:6443 check - -backend talos_controlplane - option httpchk GET /healthz - http-check expect status 200 - mode tcp - option ssl-hello-chk - balance roundrobin - server worker1 10.1.1.61:50000 check - server worker2 10.1.1.62:50000 check - server worker3 10.1.1.63:50000 check + server worker3 10.1.1.63:6443 check