2021-06-07 11:58:39 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
namespace: kube-system
|
|
|
|
name: kubernetes-services-endpoint
|
|
|
|
data:
|
|
|
|
{% if calico_bpf_enabled %}
|
|
|
|
{% if loadbalancer_apiserver is defined %}
|
|
|
|
KUBERNETES_SERVICE_HOST: "{{ apiserver_loadbalancer_domain_name }}"
|
|
|
|
KUBERNETES_SERVICE_PORT: "{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}"
|
|
|
|
{%- elif use_localhost_as_kubeapi_loadbalancer|default(False)|bool %}
|
|
|
|
KUBERNETES_SERVICE_HOST: "127.0.0.1"
|
|
|
|
KUBERNETES_SERVICE_PORT: "{{ kube_apiserver_port }}"
|
|
|
|
{%- else %}
|
2022-01-10 09:35:19 +00:00
|
|
|
KUBERNETES_SERVICE_HOST: "{{ first_kube_control_plane_address }}"
|
2021-06-07 11:58:39 +00:00
|
|
|
KUBERNETES_SERVICE_PORT: "{{ kube_apiserver_port }}"
|
|
|
|
{%- endif %}
|
|
|
|
{% endif %}
|