2018-12-22 16:15:09 +00:00
|
|
|
{% if kube_version is version('v1.12.0', '>=') %}
|
2018-12-23 14:35:06 +00:00
|
|
|
{% if kube_version is version('v1.12.0', '>=') and kube_version is version('v1.13.0', '<') %}
|
|
|
|
apiVersion: kubeadm.k8s.io/v1alpha3
|
|
|
|
{% else %}
|
2018-12-22 16:15:09 +00:00
|
|
|
apiVersion: kubeadm.k8s.io/v1beta1
|
2018-12-23 14:35:06 +00:00
|
|
|
{% endif %}
|
2018-12-22 16:15:09 +00:00
|
|
|
kind: InitConfiguration
|
|
|
|
nodeRegistration:
|
|
|
|
{% if container_manager == 'crio' %}
|
|
|
|
criSocket: /var/run/crio/crio.sock
|
|
|
|
{% elif container_manager == 'rkt' %}
|
|
|
|
criSocket: /var/run/rkt.sock
|
|
|
|
{% else %}
|
|
|
|
criSocket: /var/run/dockershim.sock
|
|
|
|
{% endif %}
|
|
|
|
---
|
|
|
|
{% endif %}
|
2018-12-19 13:17:58 +00:00
|
|
|
{% if kube_version is version('v1.11.0', '<') %}
|
|
|
|
apiVersion: kubeadm.k8s.io/v1alpha1
|
|
|
|
{% elif kube_version is version('v1.11.0', '>=') and kube_version is version('v1.12.0', '<') %}
|
|
|
|
apiVersion: kubeadm.k8s.io/v1alpha2
|
|
|
|
{% elif kube_version is version('v1.12.0', '>=') and kube_version is version('v1.13.0', '<') %}
|
|
|
|
apiVersion: kubeadm.k8s.io/v1alpha3
|
|
|
|
{% else %}
|
|
|
|
apiVersion: kubeadm.k8s.io/v1beta1
|
|
|
|
{% endif %}
|
|
|
|
{% if kube_version is version('v1.12.0', '<') %}
|
|
|
|
kind: MasterConfiguration
|
|
|
|
{% else %}
|
|
|
|
kind: ClusterConfiguration
|
|
|
|
{% endif %}
|
|
|
|
imageRepository: {{ kube_image_repo }}
|
|
|
|
kubernetesVersion: {{ kube_version }}
|
2019-02-13 20:44:12 +00:00
|
|
|
etcd:
|
|
|
|
external:
|
|
|
|
endpoints:
|
|
|
|
{% for endpoint in etcd_access_addresses.split(',') %}
|
|
|
|
- {{ endpoint }}
|
|
|
|
{% endfor %}
|
2018-12-22 16:15:09 +00:00
|
|
|
{% if kube_version is version('v1.12.0', '<') %}
|
|
|
|
nodeRegistration:
|
|
|
|
{% if container_manager == 'crio' %}
|
|
|
|
criSocket: /var/run/crio/crio.sock
|
|
|
|
{% elif container_manager == 'rkt' %}
|
|
|
|
criSocket: /var/run/rkt.sock
|
|
|
|
{% else %}
|
|
|
|
criSocket: /var/run/dockershim.sock
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|