2019-05-09 04:38:36 +08:00
|
|
|
---
|
2022-06-07 03:25:57 +08:00
|
|
|
apiVersion: kubeadm.k8s.io/v1beta3
|
2018-12-07 04:11:48 +08:00
|
|
|
kind: JoinConfiguration
|
|
|
|
discovery:
|
|
|
|
bootstrapToken:
|
2018-12-25 16:03:32 +08:00
|
|
|
{% if kubeadm_config_api_fqdn is defined %}
|
2018-12-07 04:11:48 +08:00
|
|
|
apiServerEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
|
|
|
|
{% else %}
|
2019-06-28 15:37:37 +08:00
|
|
|
apiServerEndpoint: {{ kubeadm_discovery_address }}
|
2018-12-07 04:11:48 +08:00
|
|
|
{% endif %}
|
|
|
|
token: {{ kubeadm_token }}
|
2019-07-09 20:41:59 +08:00
|
|
|
{% if kubeadm_ca_hash.stdout is defined %}
|
2019-05-09 04:38:36 +08:00
|
|
|
caCertHashes:
|
|
|
|
- sha256:{{ kubeadm_ca_hash.stdout }}
|
2019-07-09 20:41:59 +08:00
|
|
|
{% else %}
|
|
|
|
unsafeSkipCAVerification: true
|
|
|
|
{% endif %}
|
2018-12-07 04:11:48 +08:00
|
|
|
timeout: {{ discovery_timeout }}
|
|
|
|
tlsBootstrapToken: {{ kubeadm_token }}
|
|
|
|
caCertPath: {{ kube_cert_dir }}/ca.crt
|
2023-01-20 16:26:16 +08:00
|
|
|
{% if kubeadm_cert_controlplane is defined and kubeadm_cert_controlplane %}
|
|
|
|
controlPlane:
|
|
|
|
localAPIEndpoint:
|
|
|
|
advertiseAddress: {{ kube_apiserver_address }}
|
|
|
|
bindPort: {{ kube_apiserver_port }}
|
|
|
|
certificateKey: {{ kubeadm_certificate_key }}
|
|
|
|
{% endif %}
|
2018-12-07 04:11:48 +08:00
|
|
|
nodeRegistration:
|
2022-09-13 15:09:05 +08:00
|
|
|
name: '{{ kube_override_hostname }}'
|
2019-06-30 05:09:20 +08:00
|
|
|
criSocket: {{ cri_socket }}
|
2021-04-29 20:20:50 +08:00
|
|
|
{% if 'calico_rr' in group_names and 'kube_node' not in group_names %}
|
2019-08-08 22:37:22 +08:00
|
|
|
taints:
|
|
|
|
- effect: NoSchedule
|
|
|
|
key: node-role.kubernetes.io/calico-rr
|
|
|
|
{% endif %}
|
2022-10-06 15:39:52 +08:00
|
|
|
{% if kubeadm_patches is defined and kubeadm_patches.enabled %}
|
|
|
|
patches:
|
|
|
|
directory: {{ kubeadm_patches.dest_dir }}
|
|
|
|
{% endif %}
|