Compare commits
No commits in common. "2838fe13dbc56a5eb30a8968d1a8a72d2c171cdc" and "ad81d37119f8031eaae272e1c568657a48f4cedd" have entirely different histories.
2838fe13db
...
ad81d37119
|
|
@ -20,8 +20,7 @@ resource "null_resource" "kubeadm_control_plane" {
|
||||||
kubeconfig_path = var.kubeconfig_path
|
kubeconfig_path = var.kubeconfig_path
|
||||||
kubeconfig_owner = var.kubeconfig_owner
|
kubeconfig_owner = var.kubeconfig_owner
|
||||||
registry_endpoint = var.registry_endpoint
|
registry_endpoint = var.registry_endpoint
|
||||||
registry_config_version = "8"
|
registry_config_version = "7"
|
||||||
cni_plugins_version = "2"
|
|
||||||
node_dns_servers = join(" ", var.node_dns_servers)
|
node_dns_servers = join(" ", var.node_dns_servers)
|
||||||
persistent_volume_dirs = join(",", var.persistent_volume_dirs)
|
persistent_volume_dirs = join(",", var.persistent_volume_dirs)
|
||||||
}
|
}
|
||||||
|
|
@ -175,29 +174,11 @@ ensure_containerd_cni_bin_dir() {
|
||||||
config_version="$(containerd_config_version)"
|
config_version="$(containerd_config_version)"
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp)"
|
||||||
sudo awk -v config_version="$config_version" '
|
sudo awk -v config_version="$config_version" '
|
||||||
function is_table(line) {
|
/^[[:space:]]*bin_dir[[:space:]]*=/ {
|
||||||
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:]]*=/ {
|
|
||||||
sub(/=.*/, "= \"/opt/cni/bin\"")
|
sub(/=.*/, "= \"/opt/cni/bin\"")
|
||||||
found = 1
|
found = 1
|
||||||
}
|
}
|
||||||
in_cni && /^[[:space:]]*bin_dirs[[:space:]]*=/ {
|
/^[[:space:]]*bin_dirs[[:space:]]*=/ {
|
||||||
sub(/=.*/, "= [\"/opt/cni/bin\"]")
|
sub(/=.*/, "= [\"/opt/cni/bin\"]")
|
||||||
found = 1
|
found = 1
|
||||||
}
|
}
|
||||||
|
|
@ -223,11 +204,9 @@ install_cni_plugins() {
|
||||||
local plugin
|
local plugin
|
||||||
|
|
||||||
sudo mkdir -p /opt/cni/bin
|
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
|
if [ -d /usr/lib/cni ]; then
|
||||||
for plugin in /usr/lib/cni/*; do
|
for plugin in /usr/lib/cni/*; do
|
||||||
[ -f "$plugin" ] && [ -x "$plugin" ] || continue
|
[ -f "$plugin" ] || continue
|
||||||
sudo ln -sf "$plugin" "/opt/cni/bin/$(basename "$plugin")"
|
sudo ln -sf "$plugin" "/opt/cni/bin/$(basename "$plugin")"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
@ -363,8 +342,7 @@ resource "null_resource" "kubeadm_worker" {
|
||||||
user = each.value.user
|
user = each.value.user
|
||||||
ssh_key_path = each.value.ssh_key_path
|
ssh_key_path = each.value.ssh_key_path
|
||||||
registry_endpoint = var.registry_endpoint
|
registry_endpoint = var.registry_endpoint
|
||||||
registry_config_version = "8"
|
registry_config_version = "7"
|
||||||
cni_plugins_version = "2"
|
|
||||||
node_dns_servers = join(" ", var.node_dns_servers)
|
node_dns_servers = join(" ", var.node_dns_servers)
|
||||||
persistent_volume_dirs = join(",", var.persistent_volume_dirs)
|
persistent_volume_dirs = join(",", var.persistent_volume_dirs)
|
||||||
tailscale_nodeport_version = "3"
|
tailscale_nodeport_version = "3"
|
||||||
|
|
@ -535,29 +513,11 @@ ensure_containerd_cni_bin_dir() {
|
||||||
config_version="$(containerd_config_version)"
|
config_version="$(containerd_config_version)"
|
||||||
tmp="$(mktemp)"
|
tmp="$(mktemp)"
|
||||||
sudo awk -v config_version="$config_version" '
|
sudo awk -v config_version="$config_version" '
|
||||||
function is_table(line) {
|
/^[[:space:]]*bin_dir[[:space:]]*=/ {
|
||||||
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:]]*=/ {
|
|
||||||
sub(/=.*/, "= \"/opt/cni/bin\"")
|
sub(/=.*/, "= \"/opt/cni/bin\"")
|
||||||
found = 1
|
found = 1
|
||||||
}
|
}
|
||||||
in_cni && /^[[:space:]]*bin_dirs[[:space:]]*=/ {
|
/^[[:space:]]*bin_dirs[[:space:]]*=/ {
|
||||||
sub(/=.*/, "= [\"/opt/cni/bin\"]")
|
sub(/=.*/, "= [\"/opt/cni/bin\"]")
|
||||||
found = 1
|
found = 1
|
||||||
}
|
}
|
||||||
|
|
@ -583,11 +543,9 @@ install_cni_plugins() {
|
||||||
local plugin
|
local plugin
|
||||||
|
|
||||||
sudo mkdir -p /opt/cni/bin
|
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
|
if [ -d /usr/lib/cni ]; then
|
||||||
for plugin in /usr/lib/cni/*; do
|
for plugin in /usr/lib/cni/*; do
|
||||||
[ -f "$plugin" ] && [ -x "$plugin" ] || continue
|
[ -f "$plugin" ] || continue
|
||||||
sudo ln -sf "$plugin" "/opt/cni/bin/$(basename "$plugin")"
|
sudo ln -sf "$plugin" "/opt/cni/bin/$(basename "$plugin")"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ locals {
|
||||||
server_names = join(" ", local.server_names)
|
server_names = join(" ", local.server_names)
|
||||||
backend_host = var.backend_host
|
backend_host = var.backend_host
|
||||||
demos_backend_port = var.demos_backend_port
|
demos_backend_port = var.demos_backend_port
|
||||||
gitea_backend_host = var.gitea_backend_host
|
|
||||||
gitea_backend_port = var.gitea_backend_port
|
gitea_backend_port = var.gitea_backend_port
|
||||||
})
|
})
|
||||||
default_vcl = templatefile("${path.module}/templates/default.vcl.tftpl", {
|
default_vcl = templatefile("${path.module}/templates/default.vcl.tftpl", {
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ server {
|
||||||
limit_req zone=one burst=20 nodelay;
|
limit_req zone=one burst=20 nodelay;
|
||||||
client_max_body_size 512m;
|
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_http_version 1.1;
|
||||||
proxy_request_buffering off;
|
proxy_request_buffering off;
|
||||||
proxy_read_timeout 300s;
|
proxy_read_timeout 300s;
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,6 @@ variable "gitea_backend_port" {
|
||||||
default = 3000
|
default = 3000
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "gitea_backend_host" {
|
|
||||||
type = string
|
|
||||||
default = "192.168.100.89"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "haproxy_stats_user" {
|
variable "haproxy_stats_user" {
|
||||||
type = string
|
type = string
|
||||||
default = "admin"
|
default = "admin"
|
||||||
|
|
|
||||||
|
|
@ -797,12 +797,15 @@ resource "helm_release" "traefik" {
|
||||||
}
|
}
|
||||||
ports = {
|
ports = {
|
||||||
web = {
|
web = {
|
||||||
port = 8000
|
port = 80
|
||||||
exposedPort = 80
|
exposedPort = 80
|
||||||
}
|
}
|
||||||
websecure = {
|
websecure = {
|
||||||
port = 8443
|
port = 443
|
||||||
exposedPort = 443
|
exposedPort = 443
|
||||||
|
tls = {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
service = {
|
service = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue