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.

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