kubeadm_discovery_address should not contain proto (#4930)

This commit is contained in:
Erwan Miran 2019-06-28 09:37:37 +02:00 committed by Kubernetes Prow Robot
parent f599c2a691
commit c7f3123e28
6 changed files with 10 additions and 10 deletions

View file

@ -5,7 +5,7 @@
{%- if "127.0.0.1" in kube_apiserver_endpoint or "localhost" in kube_apiserver_endpoint -%} {%- if "127.0.0.1" in kube_apiserver_endpoint or "localhost" in kube_apiserver_endpoint -%}
{{ first_kube_master }}:{{ kube_apiserver_port }} {{ first_kube_master }}:{{ kube_apiserver_port }}
{%- else -%} {%- else -%}
{{ kube_apiserver_endpoint }} {{ kube_apiserver_endpoint | replace("https://", "") }}
{%- endif %} {%- endif %}
tags: tags:
- facts - facts
@ -119,7 +119,7 @@
when: when:
- kubeadm_config_api_fqdn is not defined - kubeadm_config_api_fqdn is not defined
- not is_kube_master - not is_kube_master
- kubeadm_discovery_address != kube_apiserver_endpoint - kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
notify: restart kubelet notify: restart kubelet
- name: Update server field in kube-proxy kubeconfig - name: Update server field in kube-proxy kubeconfig
@ -131,7 +131,7 @@
when: when:
- inventory_hostname == groups['kube-master']|first - inventory_hostname == groups['kube-master']|first
- kubeadm_config_api_fqdn is not defined - kubeadm_config_api_fqdn is not defined
- kubeadm_discovery_address != kube_apiserver_endpoint - kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
- not kube_proxy_remove - not kube_proxy_remove
tags: tags:
- kube-proxy - kube-proxy
@ -142,7 +142,7 @@
when: when:
- inventory_hostname == groups['kube-master']|first - inventory_hostname == groups['kube-master']|first
- kubeadm_config_api_fqdn is not defined - kubeadm_config_api_fqdn is not defined
- kubeadm_discovery_address != kube_apiserver_endpoint - kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
- not kube_proxy_remove - not kube_proxy_remove
tags: tags:
- kube-proxy - kube-proxy
@ -166,7 +166,7 @@
when: when:
- inventory_hostname == groups['kube-master']|first - inventory_hostname == groups['kube-master']|first
- kube_proxy_remove - kube_proxy_remove
- kubeadm_discovery_address != kube_apiserver_endpoint - kubeadm_discovery_address != kube_apiserver_endpoint | replace("https://", "")
tags: tags:
- kube-proxy - kube-proxy

View file

@ -6,7 +6,7 @@ discoveryTokenAPIServers:
{% if kubeadm_config_api_fqdn is defined %} {% if kubeadm_config_api_fqdn is defined %}
- {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }} - {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
{% else %} {% else %}
- {{ kubeadm_discovery_address | replace("https://", "")}} - {{ kubeadm_discovery_address }}
{% endif %} {% endif %}
discoveryTokenCACertHashes: discoveryTokenCACertHashes:
- sha256:{{ kubeadm_ca_hash.stdout }} - sha256:{{ kubeadm_ca_hash.stdout }}

View file

@ -11,7 +11,7 @@ discoveryTokenAPIServers:
{% if kubeadm_config_api_fqdn is defined %} {% if kubeadm_config_api_fqdn is defined %}
- {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }} - {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
{% else %} {% else %}
- {{ kubeadm_discovery_address | replace("https://", "")}} - {{ kubeadm_discovery_address }}
{% endif %} {% endif %}
discoveryTokenUnsafeSkipCAVerification: true discoveryTokenUnsafeSkipCAVerification: true
nodeRegistration: nodeRegistration:

View file

@ -11,7 +11,7 @@ discoveryTokenAPIServers:
{% if kubeadm_config_api_fqdn is defined %} {% if kubeadm_config_api_fqdn is defined %}
- {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }} - {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
{% else %} {% else %}
- {{ kubeadm_discovery_address | replace("https://", "")}} - {{ kubeadm_discovery_address }}
{% endif %} {% endif %}
discoveryTokenUnsafeSkipCAVerification: true discoveryTokenUnsafeSkipCAVerification: true
nodeRegistration: nodeRegistration:

View file

@ -6,7 +6,7 @@ discovery:
{% if kubeadm_config_api_fqdn is defined %} {% if kubeadm_config_api_fqdn is defined %}
apiServerEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }} apiServerEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
{% else %} {% else %}
apiServerEndpoint: {{ kubeadm_discovery_address | replace("https://", "")}} apiServerEndpoint: {{ kubeadm_discovery_address }}
{% endif %} {% endif %}
token: {{ kubeadm_token }} token: {{ kubeadm_token }}
caCertHashes: caCertHashes:

View file

@ -5,7 +5,7 @@ discovery:
{% if kubeadm_config_api_fqdn is defined %} {% if kubeadm_config_api_fqdn is defined %}
apiServerEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }} apiServerEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
{% else %} {% else %}
apiServerEndpoint: {{ kubeadm_discovery_address | replace("https://", "")}} apiServerEndpoint: {{ kubeadm_discovery_address }}
{% endif %} {% endif %}
token: {{ kubeadm_token }} token: {{ kubeadm_token }}
unsafeSkipCAVerification: true unsafeSkipCAVerification: true