Use proxy_env with kubeadm phase commands (#4325)

This commit is contained in:
Etienne 2019-03-26 11:03:19 +01:00 committed by Kubernetes Prow Robot
parent f6d280452f
commit d0ae316934
3 changed files with 5 additions and 0 deletions

View file

@ -52,6 +52,7 @@
--cert-dir {{ kube_config_dir }}/ssl
--apiserver-advertise-address {{ external_apiserver_address }}
--apiserver-bind-port {{ external_apiserver_port }}
environment: "{{ proxy_env }}"
run_once: yes
register: admin_kubeconfig

View file

@ -27,6 +27,7 @@
- name: Generate new certs and keys
command: "{{ bin_dir }}/kubeadm init phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
environment: "{{ proxy_env }}"
with_items:
- apiserver
- apiserver-kubelet-client
@ -35,6 +36,7 @@
- name: Generate new certs and keys
command: "{{ bin_dir }}/kubeadm alpha phase certs {{ item }} --config={{ kube_config_dir }}/kubeadm-config.yaml"
environment: "{{ proxy_env }}"
with_items:
- apiserver
- apiserver-kubelet-client

View file

@ -23,10 +23,12 @@
- name: Generate new configuration files
command: "{{ bin_dir }}/kubeadm init phase kubeconfig all --config={{ kube_config_dir }}/kubeadm-config.yaml"
environment: "{{ proxy_env }}"
when: kubeadm_version is version('v1.13.0', '>=')
ignore_errors: yes
- name: Generate new configuration files
command: "{{ bin_dir }}/kubeadm alpha phase kubeconfig all --config={{ kube_config_dir }}/kubeadm-config.yaml"
environment: "{{ proxy_env }}"
when: kubeadm_version is version('v1.13.0', '<')
ignore_errors: yes