Compare commits

..

No commits in common. "2838fe13dbc56a5eb30a8968d1a8a72d2c171cdc" and "ad81d37119f8031eaae272e1c568657a48f4cedd" have entirely different histories.

5 changed files with 14 additions and 59 deletions

View File

@ -20,8 +20,7 @@ resource "null_resource" "kubeadm_control_plane" {
kubeconfig_path = var.kubeconfig_path
kubeconfig_owner = var.kubeconfig_owner
registry_endpoint = var.registry_endpoint
registry_config_version = "8"
cni_plugins_version = "2"
registry_config_version = "7"
node_dns_servers = join(" ", var.node_dns_servers)
persistent_volume_dirs = join(",", var.persistent_volume_dirs)
}
@ -175,29 +174,11 @@ ensure_containerd_cni_bin_dir() {
config_version="$(containerd_config_version)"
tmp="$(mktemp)"
sudo awk -v config_version="$config_version" '
function is_table(line) {
return line ~ /^[[:space:]]*\[/
}
function is_cni_table(line) {
return is_table(line) && line ~ /[.]cni[[:space:]]*\]/
}
BEGIN {
in_cni = 0
found = 0
}
is_cni_table($0) {
in_cni = 1
print
next
}
in_cni && is_table($0) {
in_cni = 0
}
in_cni && /^[[:space:]]*bin_dir[[:space:]]*=/ {
/^[[:space:]]*bin_dir[[:space:]]*=/ {
sub(/=.*/, "= \"/opt/cni/bin\"")
found = 1
}
in_cni && /^[[:space:]]*bin_dirs[[:space:]]*=/ {
/^[[:space:]]*bin_dirs[[:space:]]*=/ {
sub(/=.*/, "= [\"/opt/cni/bin\"]")
found = 1
}
@ -223,11 +204,9 @@ install_cni_plugins() {
local plugin
sudo mkdir -p /opt/cni/bin
sudo find /opt/cni/bin -maxdepth 1 -type f ! -perm -111 -delete
sudo find /opt/cni/bin -maxdepth 1 -type l ! -exec test -x {} \; -delete
if [ -d /usr/lib/cni ]; then
for plugin in /usr/lib/cni/*; do
[ -f "$plugin" ] && [ -x "$plugin" ] || continue
[ -f "$plugin" ] || continue
sudo ln -sf "$plugin" "/opt/cni/bin/$(basename "$plugin")"
done
fi
@ -363,8 +342,7 @@ resource "null_resource" "kubeadm_worker" {
user = each.value.user
ssh_key_path = each.value.ssh_key_path
registry_endpoint = var.registry_endpoint
registry_config_version = "8"
cni_plugins_version = "2"
registry_config_version = "7"
node_dns_servers = join(" ", var.node_dns_servers)
persistent_volume_dirs = join(",", var.persistent_volume_dirs)
tailscale_nodeport_version = "3"
@ -535,29 +513,11 @@ ensure_containerd_cni_bin_dir() {
config_version="$(containerd_config_version)"
tmp="$(mktemp)"
sudo awk -v config_version="$config_version" '
function is_table(line) {
return line ~ /^[[:space:]]*\[/
}
function is_cni_table(line) {
return is_table(line) && line ~ /[.]cni[[:space:]]*\]/
}
BEGIN {
in_cni = 0
found = 0
}
is_cni_table($0) {
in_cni = 1
print
next
}
in_cni && is_table($0) {
in_cni = 0
}
in_cni && /^[[:space:]]*bin_dir[[:space:]]*=/ {
/^[[:space:]]*bin_dir[[:space:]]*=/ {
sub(/=.*/, "= \"/opt/cni/bin\"")
found = 1
}
in_cni && /^[[:space:]]*bin_dirs[[:space:]]*=/ {
/^[[:space:]]*bin_dirs[[:space:]]*=/ {
sub(/=.*/, "= [\"/opt/cni/bin\"]")
found = 1
}
@ -583,11 +543,9 @@ install_cni_plugins() {
local plugin
sudo mkdir -p /opt/cni/bin
sudo find /opt/cni/bin -maxdepth 1 -type f ! -perm -111 -delete
sudo find /opt/cni/bin -maxdepth 1 -type l ! -exec test -x {} \; -delete
if [ -d /usr/lib/cni ]; then
for plugin in /usr/lib/cni/*; do
[ -f "$plugin" ] && [ -x "$plugin" ] || continue
[ -f "$plugin" ] || continue
sudo ln -sf "$plugin" "/opt/cni/bin/$(basename "$plugin")"
done
fi

View File

@ -16,7 +16,6 @@ locals {
server_names = join(" ", local.server_names)
backend_host = var.backend_host
demos_backend_port = var.demos_backend_port
gitea_backend_host = var.gitea_backend_host
gitea_backend_port = var.gitea_backend_port
})
default_vcl = templatefile("${path.module}/templates/default.vcl.tftpl", {

View File

@ -79,7 +79,7 @@ server {
limit_req zone=one burst=20 nodelay;
client_max_body_size 512m;
proxy_pass http://${gitea_backend_host}:${gitea_backend_port}/;
proxy_pass http://${backend_host}:${gitea_backend_port}/;
proxy_http_version 1.1;
proxy_request_buffering off;
proxy_read_timeout 300s;

View File

@ -70,11 +70,6 @@ variable "gitea_backend_port" {
default = 3000
}
variable "gitea_backend_host" {
type = string
default = "192.168.100.89"
}
variable "haproxy_stats_user" {
type = string
default = "admin"

View File

@ -797,12 +797,15 @@ resource "helm_release" "traefik" {
}
ports = {
web = {
port = 8000
port = 80
exposedPort = 80
}
websecure = {
port = 8443
port = 443
exposedPort = 443
tls = {
enabled = true
}
}
}
service = {