diff --git a/haproxy.cfg b/haproxy.cfg new file mode 100644 index 0000000..d73edfe --- /dev/null +++ b/haproxy.cfg @@ -0,0 +1,30 @@ +global + log /dev/log local0 + log /dev/log local1 notice + +defaults + option httplog + option dontlognull + timeout connect 5000 + timeout client 50000 + timeout server 50000 + +frontend k8s-nginx + mode tcp + bind *:80 + bind *:443 + option tcplog + redirect scheme https code 301 + #http-request redirect scheme https unless { ssl_fc } + # use_backend http_nginx_pool if !{ ssl_fc } + default_backend k8s-nginx + +backend k8s-nginx + mode tcp + option tcp-check + balance roundrobin + default-server inter 10s downinter 5s rise 2 fall 2 slowstart 60s maxconn 250 maxqueue 256 weight 100 + server server-1 192.168.1.2:443 check + server server-2 192.168.1.204:443 check + server ssd-1 192.168.1.111:443 check + server ssd-2 192.168.1.46:443 check diff --git a/nginx-values.yaml b/nginx-values.yaml index 11b7ef2..3c6a163 100644 --- a/nginx-values.yaml +++ b/nginx-values.yaml @@ -1,3 +1,4 @@ +kind: DaemonSet hostNetwork: true metrics: enabled: true @@ -11,8 +12,8 @@ stats: podAnnotations: fluentbit.io/parser: k8s-nginx-ingress -nodeSelector: - gateway: "true" +# nodeSelector: +# gateway: "true" tolerations: - key: node operator: Equal @@ -22,13 +23,13 @@ tolerations: operator: Equal value: "" effect: NoSchedule -replicaCount: 1 +#replicaCount: 1 -service: - type: NodePort - ports: - http: 80 - https: 443 +# service: +# type: NodePort +# ports: +# http: 80 +# https: 443 # nodePorts: # http: 80 # https: 443