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.

310 lines
12 KiB

6 years ago
6 years ago
  1. ---
  2. # Kubernetes configuration dirs and system namespace.
  3. # Those are where all the additional config stuff goes
  4. # the kubernetes normally puts in /srv/kubernetes.
  5. # This puts them in a sane location and namespace.
  6. # Editing those values will almost surely break something.
  7. kube_config_dir: /etc/kubernetes
  8. kube_script_dir: "{{ bin_dir }}/kubernetes-scripts"
  9. kube_manifest_dir: "{{ kube_config_dir }}/manifests"
  10. # This is where all the cert scripts and certs will be located
  11. kube_cert_dir: "{{ kube_config_dir }}/ssl"
  12. # This is where all of the bearer tokens will be stored
  13. kube_token_dir: "{{ kube_config_dir }}/tokens"
  14. kube_api_anonymous_auth: true
  15. ## Change this to use another Kubernetes version, e.g. a current beta release
  16. kube_version: v1.20.6
  17. # Where the binaries will be downloaded.
  18. # Note: ensure that you've enough disk space (about 1G)
  19. local_release_dir: "/tmp/releases"
  20. # Random shifts for retrying failed ops like pushing/downloading
  21. retry_stagger: 5
  22. # This is the group that the cert creation scripts chgrp the
  23. # cert files to. Not really changeable...
  24. kube_cert_group: kube-cert
  25. # Cluster Loglevel configuration
  26. kube_log_level: 2
  27. # Directory where credentials will be stored
  28. credentials_dir: "{{ inventory_dir }}/credentials"
  29. ## It is possible to activate / deactivate selected authentication methods (oidc, static token auth)
  30. # kube_oidc_auth: false
  31. # kube_token_auth: false
  32. ## Variables for OpenID Connect Configuration https://kubernetes.io/docs/admin/authentication/
  33. ## To use OpenID you have to deploy additional an OpenID Provider (e.g Dex, Keycloak, ...)
  34. # kube_oidc_url: https:// ...
  35. # kube_oidc_client_id: kubernetes
  36. ## Optional settings for OIDC
  37. # kube_oidc_ca_file: "{{ kube_cert_dir }}/ca.pem"
  38. # kube_oidc_username_claim: sub
  39. # kube_oidc_username_prefix: 'oidc:'
  40. # kube_oidc_groups_claim: groups
  41. # kube_oidc_groups_prefix: 'oidc:'
  42. ## Variables to control webhook authn/authz
  43. # kube_webhook_token_auth: false
  44. # kube_webhook_token_auth_url: https://...
  45. # kube_webhook_token_auth_url_skip_tls_verify: false
  46. ## For webhook authorization, authorization_modes must include Webhook
  47. # kube_webhook_authorization: false
  48. # kube_webhook_authorization_url: https://...
  49. # kube_webhook_authorization_url_skip_tls_verify: false
  50. # Choose network plugin (cilium, calico, weave or flannel. Use cni for generic cni plugin)
  51. # Can also be set to 'cloud', which lets the cloud provider setup appropriate routing
  52. kube_network_plugin: calico
  53. # Setting multi_networking to true will install Multus: https://github.com/intel/multus-cni
  54. kube_network_plugin_multus: false
  55. # Kubernetes internal network for services, unused block of space.
  56. kube_service_addresses: 10.233.0.0/18
  57. # internal network. When used, it will assign IP
  58. # addresses from this range to individual pods.
  59. # This network must be unused in your network infrastructure!
  60. kube_pods_subnet: 10.233.64.0/18
  61. # internal network node size allocation (optional). This is the size allocated
  62. # to each node for pod IP address allocation. Note that the number of pods per node is
  63. # also limited by the kubelet_max_pods variable which defaults to 110.
  64. #
  65. # Example:
  66. # Up to 64 nodes and up to 254 or kubelet_max_pods (the lowest of the two) pods per node:
  67. # - kube_pods_subnet: 10.233.64.0/18
  68. # - kube_network_node_prefix: 24
  69. # - kubelet_max_pods: 110
  70. #
  71. # Example:
  72. # Up to 128 nodes and up to 126 or kubelet_max_pods (the lowest of the two) pods per node:
  73. # - kube_pods_subnet: 10.233.64.0/18
  74. # - kube_network_node_prefix: 25
  75. # - kubelet_max_pods: 110
  76. kube_network_node_prefix: 24
  77. # Configure Dual Stack networking (i.e. both IPv4 and IPv6)
  78. enable_dual_stack_networks: false
  79. # Kubernetes internal network for IPv6 services, unused block of space.
  80. # This is only used if enable_dual_stack_networks is set to true
  81. # This provides 4096 IPv6 IPs
  82. kube_service_addresses_ipv6: fd85:ee78:d8a6:8607::1000/116
  83. # Internal network. When used, it will assign IPv6 addresses from this range to individual pods.
  84. # This network must not already be in your network infrastructure!
  85. # This is only used if enable_dual_stack_networks is set to true.
  86. # This provides room for 256 nodes with 254 pods per node.
  87. kube_pods_subnet_ipv6: fd85:ee78:d8a6:8607::1:0000/112
  88. # IPv6 subnet size allocated to each for pods.
  89. # This is only used if enable_dual_stack_networks is set to true
  90. # This provides room for 254 pods per node.
  91. kube_network_node_prefix_ipv6: 120
  92. # The port the API Server will be listening on.
  93. kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
  94. kube_apiserver_port: 6443 # (https)
  95. # kube_apiserver_insecure_port: 8080 # (http)
  96. # Set to 0 to disable insecure port - Requires RBAC in authorization_modes and kube_api_anonymous_auth: true
  97. kube_apiserver_insecure_port: 0 # (disabled)
  98. # Kube-proxy proxyMode configuration.
  99. # Can be ipvs, iptables
  100. kube_proxy_mode: ipvs
  101. # configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface
  102. # must be set to true for MetalLB to work
  103. kube_proxy_strict_arp: false
  104. # A string slice of values which specify the addresses to use for NodePorts.
  105. # Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32).
  106. # The default empty string slice ([]) means to use all local addresses.
  107. # kube_proxy_nodeport_addresses_cidr is retained for legacy config
  108. kube_proxy_nodeport_addresses: >-
  109. {%- if kube_proxy_nodeport_addresses_cidr is defined -%}
  110. [{{ kube_proxy_nodeport_addresses_cidr }}]
  111. {%- else -%}
  112. []
  113. {%- endif -%}
  114. # If non-empty, will use this string as identification instead of the actual hostname
  115. # kube_override_hostname: >-
  116. # {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
  117. # {%- else -%}
  118. # {{ inventory_hostname }}
  119. # {%- endif -%}
  120. ## Encrypting Secret Data at Rest (experimental)
  121. kube_encrypt_secret_data: false
  122. # DNS configuration.
  123. # Kubernetes cluster name, also will be used as DNS domain
  124. cluster_name: cluster.local
  125. # Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
  126. ndots: 2
  127. # Can be coredns, coredns_dual, manual or none
  128. dns_mode: coredns
  129. # Set manual server if using a custom cluster DNS server
  130. # manual_dns_server: 10.x.x.x
  131. # Enable nodelocal dns cache
  132. enable_nodelocaldns: true
  133. nodelocaldns_ip: 169.254.25.10
  134. nodelocaldns_health_port: 9254
  135. # nodelocaldns_external_zones:
  136. # - zones:
  137. # - example.com
  138. # - example.io:1053
  139. # nameservers:
  140. # - 1.1.1.1
  141. # - 2.2.2.2
  142. # cache: 5
  143. # - zones:
  144. # - https://mycompany.local:4453
  145. # nameservers:
  146. # - 192.168.0.53
  147. # cache: 0
  148. # Enable k8s_external plugin for CoreDNS
  149. enable_coredns_k8s_external: false
  150. coredns_k8s_external_zone: k8s_external.local
  151. # Enable endpoint_pod_names option for kubernetes plugin
  152. enable_coredns_k8s_endpoint_pod_names: false
  153. # Can be docker_dns, host_resolvconf or none
  154. resolvconf_mode: docker_dns
  155. # Deploy netchecker app to verify DNS resolve as an HTTP service
  156. deploy_netchecker: false
  157. # Ip address of the kubernetes skydns service
  158. skydns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(3)|ipaddr('address') }}"
  159. skydns_server_secondary: "{{ kube_service_addresses|ipaddr('net')|ipaddr(4)|ipaddr('address') }}"
  160. dns_domain: "{{ cluster_name }}"
  161. ## Container runtime
  162. ## docker for docker, crio for cri-o and containerd for containerd.
  163. container_manager: docker
  164. # Additional container runtimes
  165. kata_containers_enabled: false
  166. kubeadm_certificate_key: "{{ lookup('password', credentials_dir + '/kubeadm_certificate_key.creds length=64 chars=hexdigits') | lower }}"
  167. # K8s image pull policy (imagePullPolicy)
  168. k8s_image_pull_policy: IfNotPresent
  169. # audit log for kubernetes
  170. kubernetes_audit: false
  171. # dynamic kubelet configuration
  172. dynamic_kubelet_configuration: false
  173. # define kubelet config dir for dynamic kubelet
  174. # kubelet_config_dir:
  175. default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
  176. dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
  177. # pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
  178. podsecuritypolicy_enabled: false
  179. # Custom PodSecurityPolicySpec for restricted policy
  180. # podsecuritypolicy_restricted_spec: {}
  181. # Custom PodSecurityPolicySpec for privileged policy
  182. # podsecuritypolicy_privileged_spec: {}
  183. # Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
  184. # kubeconfig_localhost: false
  185. # Download kubectl onto the host that runs Ansible in {{ bin_dir }}
  186. # kubectl_localhost: false
  187. # A comma separated list of levels of node allocatable enforcement to be enforced by kubelet.
  188. # Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
  189. # kubelet_enforce_node_allocatable: pods
  190. ## Optionally reserve resources for OS system daemons.
  191. # system_reserved: true
  192. ## Uncomment to override default values
  193. # system_memory_reserved: 512Mi
  194. # system_cpu_reserved: 500m
  195. ## Reservation for master hosts
  196. # system_master_memory_reserved: 256Mi
  197. # system_master_cpu_reserved: 250m
  198. # An alternative flexvolume plugin directory
  199. # kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
  200. ## Supplementary addresses that can be added in kubernetes ssl keys.
  201. ## That can be useful for example to setup a keepalived virtual IP
  202. # supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
  203. ## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler.
  204. ## See https://github.com/kubernetes-sigs/kubespray/issues/2141
  205. ## Set this variable to true to get rid of this issue
  206. volume_cross_zone_attachment: false
  207. ## Add Persistent Volumes Storage Class for corresponding cloud provider (supported: in-tree OpenStack, Cinder CSI,
  208. ## AWS EBS CSI, Azure Disk CSI, GCP Persistent Disk CSI)
  209. persistent_volumes_enabled: false
  210. ## Container Engine Acceleration
  211. ## Enable container acceleration feature, for example use gpu acceleration in containers
  212. # nvidia_accelerator_enabled: true
  213. ## Nvidia GPU driver install. Install will by done by a (init) pod running as a daemonset.
  214. ## Important: if you use Ubuntu then you should set in all.yml 'docker_storage_options: -s overlay2'
  215. ## Array with nvida_gpu_nodes, leave empty or comment if you don't want to install drivers.
  216. ## Labels and taints won't be set to nodes if they are not in the array.
  217. # nvidia_gpu_nodes:
  218. # - kube-gpu-001
  219. # nvidia_driver_version: "384.111"
  220. ## flavor can be tesla or gtx
  221. # nvidia_gpu_flavor: gtx
  222. ## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
  223. # nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
  224. # nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
  225. ## NVIDIA GPU device plugin image.
  226. # nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
  227. ## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  228. # tls_min_version: ""
  229. ## Support tls cipher suites.
  230. # tls_cipher_suites: {}
  231. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  232. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  233. # - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  234. # - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  235. # - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  236. # - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
  237. # - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  238. # - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  239. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  240. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  241. # - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  242. # - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  243. # - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  244. # - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
  245. # - TLS_ECDHE_RSA_WITH_RC4_128_SHA
  246. # - TLS_RSA_WITH_3DES_EDE_CBC_SHA
  247. # - TLS_RSA_WITH_AES_128_CBC_SHA
  248. # - TLS_RSA_WITH_AES_128_CBC_SHA256
  249. # - TLS_RSA_WITH_AES_128_GCM_SHA256
  250. # - TLS_RSA_WITH_AES_256_CBC_SHA
  251. # - TLS_RSA_WITH_AES_256_GCM_SHA384
  252. # - TLS_RSA_WITH_RC4_128_SHA
  253. ## Amount of time to retain events. (default 1h0m0s)
  254. event_ttl_duration: "1h0m0s"
  255. ## Automatically renew K8S control plane certificates on first Monday of each month
  256. auto_renew_certificates: false
  257. # First Monday of each month
  258. # auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:{{ groups['kube_control_plane'].index(inventory_hostname) }}0:00"