prod and staging for tls in loadbalancer
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -2,8 +2,8 @@ include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {}
|
||||
|
||||
# TCP Load Balancing for the K3s API
|
||||
stream {
|
||||
# TCP Load Balancing for the K3s API
|
||||
upstream k3s_servers {
|
||||
{% for ip in k3s_server_ips %}
|
||||
server {{ ip }}:{{k3s.loadbalancer.default_port}};
|
||||
@@ -14,6 +14,17 @@ stream {
|
||||
listen {{k3s.loadbalancer.default_port}};
|
||||
proxy_pass k3s_servers;
|
||||
}
|
||||
|
||||
upstream dns_servers {
|
||||
{% for ip in k3s_server_ips %}
|
||||
server {{ ip }}:53;
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 53 udp;
|
||||
proxy_pass dns_servers;
|
||||
}
|
||||
}
|
||||
|
||||
http {
|
||||
@@ -43,9 +54,9 @@ http {
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
listen 443 ssl;
|
||||
|
||||
server_name staging.k3s.seyshiro.de *.staging.k3s.seyshiro.de
|
||||
server_name staging.k3s.seyshiro.de *.staging.k3s.seyshiro.de;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/staging_tls.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/staging_tls.key;
|
||||
@@ -59,9 +70,9 @@ http {
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
listen 443 ssl;
|
||||
|
||||
server_name production.k3s.seyshiro.de *.production.k3s.seyshiro.de
|
||||
server_name k3s.seyshiro.de *.k3s.seyshiro.de;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/production_tls.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/production_tls.key;
|
||||
@@ -74,3 +85,5 @@ http {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user