43 lines
1.4 KiB
INI
43 lines
1.4 KiB
INI
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
global
|
|
maxconn 10240
|
|
|
|
defaults
|
|
mode tcp
|
|
timeout connect 5000ms
|
|
timeout client 24h
|
|
timeout server 24h
|
|
|
|
frontend default-kubernetes-fe
|
|
bind *:{{ config['KubernetesNetwork:kubernetes.haproxy_port'] }}
|
|
default_backend default-kubernetes-be
|
|
|
|
{% set ip = config.get_first('KubernetesNode:join_ip', 'Genesis:ip') -%}
|
|
|
|
backend default-kubernetes-be
|
|
option tcp-check
|
|
{%- set port = config['KubernetesNetwork:kubernetes.apiserver_port'] %}
|
|
server s{{ ip }} {{ ip }}:{{ port }} check port {{ port }}
|
|
|
|
frontend kube-system-kubernetes-etcd-fe
|
|
bind *:{{ config['KubernetesNetwork:etcd.haproxy_port'] }}
|
|
default_backend kube-system-kubernetes-etcd-be
|
|
|
|
backend kube-system-kubernetes-etcd-be
|
|
option tcp-check
|
|
{%- set port = config['KubernetesNetwork:etcd.container_port'] %}
|
|
server s{{ ip }} {{ ip }}:{{ port }} check port {{ port }}
|