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.

314 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.19.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. # The port the API Server will be listening on.
  78. kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
  79. kube_apiserver_port: 6443 # (https)
  80. # kube_apiserver_insecure_port: 8080 # (http)
  81. # Set to 0 to disable insecure port - Requires RBAC in authorization_modes and kube_api_anonymous_auth: true
  82. kube_apiserver_insecure_port: 0 # (disabled)
  83. # Kube-proxy proxyMode configuration.
  84. # Can be ipvs, iptables
  85. kube_proxy_mode: ipvs
  86. # configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface
  87. # must be set to true for MetalLB to work
  88. kube_proxy_strict_arp: false
  89. # A string slice of values which specify the addresses to use for NodePorts.
  90. # Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32).
  91. # The default empty string slice ([]) means to use all local addresses.
  92. # kube_proxy_nodeport_addresses_cidr is retained for legacy config
  93. kube_proxy_nodeport_addresses: >-
  94. {%- if kube_proxy_nodeport_addresses_cidr is defined -%}
  95. [{{ kube_proxy_nodeport_addresses_cidr }}]
  96. {%- else -%}
  97. []
  98. {%- endif -%}
  99. # If non-empty, will use this string as identification instead of the actual hostname
  100. # kube_override_hostname: >-
  101. # {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
  102. # {%- else -%}
  103. # {{ inventory_hostname }}
  104. # {%- endif -%}
  105. ## Encrypting Secret Data at Rest (experimental)
  106. kube_encrypt_secret_data: false
  107. # DNS configuration.
  108. # Kubernetes cluster name, also will be used as DNS domain
  109. cluster_name: cluster.local
  110. # Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
  111. ndots: 2
  112. # Can be coredns, coredns_dual, manual or none
  113. dns_mode: coredns
  114. # Set manual server if using a custom cluster DNS server
  115. # manual_dns_server: 10.x.x.x
  116. # Enable nodelocal dns cache
  117. enable_nodelocaldns: true
  118. nodelocaldns_ip: 169.254.25.10
  119. nodelocaldns_health_port: 9254
  120. # nodelocaldns_external_zones:
  121. # - zones:
  122. # - example.com
  123. # - example.io:1053
  124. # nameservers:
  125. # - 1.1.1.1
  126. # - 2.2.2.2
  127. # cache: 5
  128. # - zones:
  129. # - https://mycompany.local:4453
  130. # nameservers:
  131. # - 192.168.0.53
  132. # cache: 0
  133. # Enable k8s_external plugin for CoreDNS
  134. enable_coredns_k8s_external: false
  135. coredns_k8s_external_zone: k8s_external.local
  136. # Enable endpoint_pod_names option for kubernetes plugin
  137. enable_coredns_k8s_endpoint_pod_names: false
  138. # Can be docker_dns, host_resolvconf or none
  139. resolvconf_mode: docker_dns
  140. # Deploy netchecker app to verify DNS resolve as an HTTP service
  141. deploy_netchecker: false
  142. # Ip address of the kubernetes skydns service
  143. skydns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(3)|ipaddr('address') }}"
  144. skydns_server_secondary: "{{ kube_service_addresses|ipaddr('net')|ipaddr(4)|ipaddr('address') }}"
  145. dns_domain: "{{ cluster_name }}"
  146. ## Container runtime
  147. ## docker for docker, crio for cri-o and containerd for containerd.
  148. container_manager: docker
  149. # Additional container runtimes
  150. kata_containers_enabled: false
  151. ## Settings for containerd runtimes (only used when container_manager is set to containerd)
  152. #
  153. # Settings for default containerd runtime
  154. # containerd_default_runtime:
  155. # type: io.containerd.runtime.v1.linux
  156. # engine: ''
  157. # root: ''
  158. #
  159. # Settings for additional runtimes for containerd configuration
  160. # containerd_runtimes:
  161. # - name: ""
  162. # type: ""
  163. # engine: ""
  164. # root: ""
  165. # Example for Kata Containers as additional runtime:
  166. # containerd_runtimes:
  167. # - name: kata
  168. # type: io.containerd.kata.v2
  169. # engine: ""
  170. # root: ""
  171. #
  172. # Settings for untrusted containerd runtime
  173. # containerd_untrusted_runtime_type: ''
  174. # containerd_untrusted_runtime_engine: ''
  175. # containerd_untrusted_runtime_root: ''
  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. dynamic_kubelet_configuration: false
  183. # define kubelet config dir for dynamic kubelet
  184. # kubelet_config_dir:
  185. default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
  186. dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
  187. # pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
  188. podsecuritypolicy_enabled: false
  189. # Custom PodSecurityPolicySpec for restricted policy
  190. # podsecuritypolicy_restricted_spec: {}
  191. # Custom PodSecurityPolicySpec for privileged policy
  192. # podsecuritypolicy_privileged_spec: {}
  193. # Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
  194. # kubeconfig_localhost: false
  195. # Download kubectl onto the host that runs Ansible in {{ bin_dir }}
  196. # kubectl_localhost: false
  197. # A comma separated list of levels of node allocatable enforcement to be enforced by kubelet.
  198. # Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
  199. # kubelet_enforce_node_allocatable: pods
  200. ## Optionally reserve resources for OS system daemons.
  201. # system_reserved: true
  202. ## Uncomment to override default values
  203. # system_memory_reserved: 512Mi
  204. # system_cpu_reserved: 500m
  205. ## Reservation for master hosts
  206. # system_master_memory_reserved: 256Mi
  207. # system_master_cpu_reserved: 250m
  208. # An alternative flexvolume plugin directory
  209. # kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
  210. ## Supplementary addresses that can be added in kubernetes ssl keys.
  211. ## That can be useful for example to setup a keepalived virtual IP
  212. # supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
  213. ## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler.
  214. ## See https://github.com/kubernetes-sigs/kubespray/issues/2141
  215. ## Set this variable to true to get rid of this issue
  216. volume_cross_zone_attachment: false
  217. ## Add Persistent Volumes Storage Class for corresponding cloud provider (supported: in-tree OpenStack, Cinder CSI,
  218. ## AWS EBS CSI, Azure Disk CSI, GCP Persistent Disk CSI)
  219. persistent_volumes_enabled: false
  220. ## Container Engine Acceleration
  221. ## Enable container acceleration feature, for example use gpu acceleration in containers
  222. # nvidia_accelerator_enabled: true
  223. ## Nvidia GPU driver install. Install will by done by a (init) pod running as a daemonset.
  224. ## Important: if you use Ubuntu then you should set in all.yml 'docker_storage_options: -s overlay2'
  225. ## Array with nvida_gpu_nodes, leave empty or comment if you don't want to install drivers.
  226. ## Labels and taints won't be set to nodes if they are not in the array.
  227. # nvidia_gpu_nodes:
  228. # - kube-gpu-001
  229. # nvidia_driver_version: "384.111"
  230. ## flavor can be tesla or gtx
  231. # nvidia_gpu_flavor: gtx
  232. ## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
  233. # nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
  234. # nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
  235. ## NVIDIA GPU device plugin image.
  236. # nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
  237. ## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  238. # tls_min_version: ""
  239. ## Support tls cipher suites.
  240. # tls_cipher_suites: {}
  241. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  242. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  243. # - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  244. # - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  245. # - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  246. # - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
  247. # - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  248. # - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  249. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  250. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  251. # - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  252. # - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  253. # - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  254. # - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
  255. # - TLS_ECDHE_RSA_WITH_RC4_128_SHA
  256. # - TLS_RSA_WITH_3DES_EDE_CBC_SHA
  257. # - TLS_RSA_WITH_AES_128_CBC_SHA
  258. # - TLS_RSA_WITH_AES_128_CBC_SHA256
  259. # - TLS_RSA_WITH_AES_128_GCM_SHA256
  260. # - TLS_RSA_WITH_AES_256_CBC_SHA
  261. # - TLS_RSA_WITH_AES_256_GCM_SHA384
  262. # - TLS_RSA_WITH_RC4_128_SHA
  263. ## Amount of time to retain events. (default 1h0m0s)
  264. event_ttl_duration: "1h0m0s"
  265. ## Force regeneration of kubernetes control plane certificates without the need of bumping the cluster version
  266. force_certificate_regeneration: false