You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

  1. ---
  2. apiVersion: kubeadm.k8s.io/v1beta3
  3. kind: JoinConfiguration
  4. discovery:
  5. {% if kubeadm_use_file_discovery %}
  6. file:
  7. kubeConfigPath: {{ kube_config_dir }}/cluster-info-discovery-kubeconfig.yaml
  8. {% else %}
  9. bootstrapToken:
  10. {% if kubeadm_config_api_fqdn is defined %}
  11. apiServerEndpoint: {{ kubeadm_config_api_fqdn }}:{{ loadbalancer_apiserver.port | default(kube_apiserver_port) }}
  12. {% else %}
  13. apiServerEndpoint: {{ kubeadm_discovery_address }}
  14. {% endif %}
  15. token: {{ kubeadm_token }}
  16. {% if kubeadm_ca_hash.stdout is defined %}
  17. caCertHashes:
  18. - sha256:{{ kubeadm_ca_hash.stdout }}
  19. {% else %}
  20. unsafeSkipCAVerification: true
  21. {% endif %}
  22. {% endif %}
  23. timeout: {{ discovery_timeout }}
  24. tlsBootstrapToken: {{ kubeadm_token }}
  25. caCertPath: {{ kube_cert_dir }}/ca.crt
  26. {% if kubeadm_cert_controlplane is defined and kubeadm_cert_controlplane %}
  27. controlPlane:
  28. localAPIEndpoint:
  29. advertiseAddress: {{ kube_apiserver_address }}
  30. bindPort: {{ kube_apiserver_port }}
  31. certificateKey: {{ kubeadm_certificate_key }}
  32. {% endif %}
  33. nodeRegistration:
  34. name: '{{ kube_override_hostname }}'
  35. criSocket: {{ cri_socket }}
  36. {% if 'calico_rr' in group_names and 'kube_node' not in group_names %}
  37. taints:
  38. - effect: NoSchedule
  39. key: node-role.kubernetes.io/calico-rr
  40. {% endif %}
  41. {% if kubeadm_patches | length > 0 %}
  42. patches:
  43. directory: {{ kubeadm_patches_dir }}
  44. {% endif %}