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.

320 lines
13 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 same 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.21.5
  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. # Graceful Node Shutdown (Kubernetes >= 1.21.0), see https://kubernetes.io/blog/2021/04/21/graceful-node-shutdown-beta/
  123. # kubelet_shutdown_grace_period had to be greater than kubelet_shutdown_grace_period_critical_pods to allow
  124. # non-critical podsa to also terminate gracefully
  125. # kubelet_shutdown_grace_period: 60s
  126. # kubelet_shutdown_grace_period_critical_pods: 20s
  127. # DNS configuration.
  128. # Kubernetes cluster name, also will be used as DNS domain
  129. cluster_name: cluster.local
  130. # Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
  131. ndots: 2
  132. # Can be coredns, coredns_dual, manual or none
  133. dns_mode: coredns
  134. # Set manual server if using a custom cluster DNS server
  135. # manual_dns_server: 10.x.x.x
  136. # Enable nodelocal dns cache
  137. enable_nodelocaldns: true
  138. nodelocaldns_ip: 169.254.25.10
  139. nodelocaldns_health_port: 9254
  140. nodelocaldns_bind_metrics_host_ip: false
  141. # nodelocaldns_external_zones:
  142. # - zones:
  143. # - example.com
  144. # - example.io:1053
  145. # nameservers:
  146. # - 1.1.1.1
  147. # - 2.2.2.2
  148. # cache: 5
  149. # - zones:
  150. # - https://mycompany.local:4453
  151. # nameservers:
  152. # - 192.168.0.53
  153. # cache: 0
  154. # Enable k8s_external plugin for CoreDNS
  155. enable_coredns_k8s_external: false
  156. coredns_k8s_external_zone: k8s_external.local
  157. # Enable endpoint_pod_names option for kubernetes plugin
  158. enable_coredns_k8s_endpoint_pod_names: false
  159. # Can be docker_dns, host_resolvconf or none
  160. resolvconf_mode: docker_dns
  161. # Deploy netchecker app to verify DNS resolve as an HTTP service
  162. deploy_netchecker: false
  163. # Ip address of the kubernetes skydns service
  164. skydns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(3)|ipaddr('address') }}"
  165. skydns_server_secondary: "{{ kube_service_addresses|ipaddr('net')|ipaddr(4)|ipaddr('address') }}"
  166. dns_domain: "{{ cluster_name }}"
  167. ## Container runtime
  168. ## docker for docker, crio for cri-o and containerd for containerd.
  169. container_manager: docker
  170. # Additional container runtimes
  171. kata_containers_enabled: false
  172. kubeadm_certificate_key: "{{ lookup('password', credentials_dir + '/kubeadm_certificate_key.creds length=64 chars=hexdigits') | lower }}"
  173. # K8s image pull policy (imagePullPolicy)
  174. k8s_image_pull_policy: IfNotPresent
  175. # audit log for kubernetes
  176. kubernetes_audit: false
  177. # dynamic kubelet configuration
  178. # Note: Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA.
  179. # It is planned to be removed from Kubernetes in the version 1.23.
  180. # Please use alternative ways to update kubelet configuration.
  181. dynamic_kubelet_configuration: false
  182. # define kubelet config dir for dynamic kubelet
  183. # kubelet_config_dir:
  184. default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
  185. dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
  186. # pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
  187. podsecuritypolicy_enabled: false
  188. # Custom PodSecurityPolicySpec for restricted policy
  189. # podsecuritypolicy_restricted_spec: {}
  190. # Custom PodSecurityPolicySpec for privileged policy
  191. # podsecuritypolicy_privileged_spec: {}
  192. # Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
  193. # kubeconfig_localhost: false
  194. # Download kubectl onto the host that runs Ansible in {{ bin_dir }}
  195. # kubectl_localhost: false
  196. # A comma separated list of levels of node allocatable enforcement to be enforced by kubelet.
  197. # Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
  198. # kubelet_enforce_node_allocatable: pods
  199. ## Optionally reserve resources for OS system daemons.
  200. # system_reserved: true
  201. ## Uncomment to override default values
  202. # system_memory_reserved: 512Mi
  203. # system_cpu_reserved: 500m
  204. ## Reservation for master hosts
  205. # system_master_memory_reserved: 256Mi
  206. # system_master_cpu_reserved: 250m
  207. # An alternative flexvolume plugin directory
  208. # kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
  209. ## Supplementary addresses that can be added in kubernetes ssl keys.
  210. ## That can be useful for example to setup a keepalived virtual IP
  211. # supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
  212. ## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler.
  213. ## See https://github.com/kubernetes-sigs/kubespray/issues/2141
  214. ## Set this variable to true to get rid of this issue
  215. volume_cross_zone_attachment: false
  216. ## Add Persistent Volumes Storage Class for corresponding cloud provider (supported: in-tree OpenStack, Cinder CSI,
  217. ## AWS EBS CSI, Azure Disk CSI, GCP Persistent Disk CSI)
  218. persistent_volumes_enabled: false
  219. ## Container Engine Acceleration
  220. ## Enable container acceleration feature, for example use gpu acceleration in containers
  221. # nvidia_accelerator_enabled: true
  222. ## Nvidia GPU driver install. Install will by done by a (init) pod running as a daemonset.
  223. ## Important: if you use Ubuntu then you should set in all.yml 'docker_storage_options: -s overlay2'
  224. ## Array with nvida_gpu_nodes, leave empty or comment if you don't want to install drivers.
  225. ## Labels and taints won't be set to nodes if they are not in the array.
  226. # nvidia_gpu_nodes:
  227. # - kube-gpu-001
  228. # nvidia_driver_version: "384.111"
  229. ## flavor can be tesla or gtx
  230. # nvidia_gpu_flavor: gtx
  231. ## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
  232. # nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
  233. # nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
  234. ## NVIDIA GPU device plugin image.
  235. # nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
  236. ## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  237. # tls_min_version: ""
  238. ## Support tls cipher suites.
  239. # tls_cipher_suites: {}
  240. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  241. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  242. # - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  243. # - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  244. # - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  245. # - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
  246. # - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  247. # - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  248. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  249. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  250. # - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  251. # - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  252. # - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  253. # - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
  254. # - TLS_ECDHE_RSA_WITH_RC4_128_SHA
  255. # - TLS_RSA_WITH_3DES_EDE_CBC_SHA
  256. # - TLS_RSA_WITH_AES_128_CBC_SHA
  257. # - TLS_RSA_WITH_AES_128_CBC_SHA256
  258. # - TLS_RSA_WITH_AES_128_GCM_SHA256
  259. # - TLS_RSA_WITH_AES_256_CBC_SHA
  260. # - TLS_RSA_WITH_AES_256_GCM_SHA384
  261. # - TLS_RSA_WITH_RC4_128_SHA
  262. ## Amount of time to retain events. (default 1h0m0s)
  263. event_ttl_duration: "1h0m0s"
  264. ## Automatically renew K8S control plane certificates on first Monday of each month
  265. auto_renew_certificates: false
  266. # First Monday of each month
  267. # auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:{{ groups['kube_control_plane'].index(inventory_hostname) }}0:00"