mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Permit custom names for API server lb/proxy containers. (#10166)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
This commit is contained in:
@@ -26,7 +26,8 @@ You may also define the port the local internal loadbalancer uses by changing,
|
|||||||
`loadbalancer_apiserver_port`. This defaults to the value of
|
`loadbalancer_apiserver_port`. This defaults to the value of
|
||||||
`kube_apiserver_port`. It is also important to note that Kubespray will only
|
`kube_apiserver_port`. It is also important to note that Kubespray will only
|
||||||
configure kubelet and kube-proxy on non-master nodes to use the local internal
|
configure kubelet and kube-proxy on non-master nodes to use the local internal
|
||||||
loadbalancer.
|
loadbalancer. If you wish to control the name of the loadbalancer container,
|
||||||
|
you can set the variable `loadbalancer_apiserver_pod_name`.
|
||||||
|
|
||||||
If you choose to NOT use the local internal loadbalancer, you will need to
|
If you choose to NOT use the local internal loadbalancer, you will need to
|
||||||
use the [kube-vip](kube-vip.md) ansible role or configure your own loadbalancer to achieve HA. By default, it only configures a non-HA endpoint, which points to the
|
use the [kube-vip](kube-vip.md) ansible role or configure your own loadbalancer to achieve HA. By default, it only configures a non-HA endpoint, which points to the
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ loadbalancer_apiserver_memory_requests: 32M
|
|||||||
loadbalancer_apiserver_cpu_requests: 25m
|
loadbalancer_apiserver_cpu_requests: 25m
|
||||||
|
|
||||||
loadbalancer_apiserver_keepalive_timeout: 5m
|
loadbalancer_apiserver_keepalive_timeout: 5m
|
||||||
|
loadbalancer_apiserver_pod_name: "{% if loadbalancer_apiserver_type == 'nginx' %}nginx-proxy{% else %}haproxy{% endif %}"
|
||||||
|
|
||||||
# Uncomment if you need to enable deprecated runtimes
|
# Uncomment if you need to enable deprecated runtimes
|
||||||
# kube_api_runtime_config:
|
# kube_api_runtime_config:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: haproxy
|
name: {{ loadbalancer_apiserver_pod_name }}
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx-proxy
|
name: {{ loadbalancer_apiserver_pod_name }}
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
|||||||
Reference in New Issue
Block a user