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.

217 lines
8.6 KiB

6 years ago
6 years ago
  1. # Kubernetes configuration dirs and system namespace.
  2. # Those are where all the additional config stuff goes
  3. # the kubernetes normally puts in /srv/kubernetes.
  4. # This puts them in a sane location and namespace.
  5. # Editing those values will almost surely break something.
  6. kube_config_dir: /etc/kubernetes
  7. kube_script_dir: "{{ bin_dir }}/kubernetes-scripts"
  8. kube_manifest_dir: "{{ kube_config_dir }}/manifests"
  9. # This is where all the cert scripts and certs will be located
  10. kube_cert_dir: "{{ kube_config_dir }}/ssl"
  11. # This is where all of the bearer tokens will be stored
  12. kube_token_dir: "{{ kube_config_dir }}/tokens"
  13. # This is where to save basic auth file
  14. kube_users_dir: "{{ kube_config_dir }}/users"
  15. kube_api_anonymous_auth: true
  16. ## Change this to use another Kubernetes version, e.g. a current beta release
  17. kube_version: v1.13.4
  18. # kubernetes image repo define
  19. kube_image_repo: "gcr.io/google-containers"
  20. # Where the binaries will be downloaded.
  21. # Note: ensure that you've enough disk space (about 1G)
  22. local_release_dir: "/tmp/releases"
  23. # Random shifts for retrying failed ops like pushing/downloading
  24. retry_stagger: 5
  25. # This is the group that the cert creation scripts chgrp the
  26. # cert files to. Not really changeable...
  27. kube_cert_group: kube-cert
  28. # Cluster Loglevel configuration
  29. kube_log_level: 2
  30. # Directory where credentials will be stored
  31. credentials_dir: "{{ inventory_dir }}/credentials"
  32. # Users to create for basic auth in Kubernetes API via HTTP
  33. # Optionally add groups for user
  34. kube_api_pwd: "{{ lookup('password', credentials_dir + '/kube_user.creds length=15 chars=ascii_letters,digits') }}"
  35. kube_users:
  36. kube:
  37. pass: "{{kube_api_pwd}}"
  38. role: admin
  39. groups:
  40. - system:masters
  41. ## It is possible to activate / deactivate selected authentication methods (basic auth, static token auth)
  42. #kube_oidc_auth: false
  43. #kube_basic_auth: false
  44. #kube_token_auth: false
  45. ## Variables for OpenID Connect Configuration https://kubernetes.io/docs/admin/authentication/
  46. ## To use OpenID you have to deploy additional an OpenID Provider (e.g Dex, Keycloak, ...)
  47. # kube_oidc_url: https:// ...
  48. # kube_oidc_client_id: kubernetes
  49. ## Optional settings for OIDC
  50. # kube_oidc_ca_file: "{{ kube_cert_dir }}/ca.pem"
  51. # kube_oidc_username_claim: sub
  52. # kube_oidc_username_prefix: oidc:
  53. # kube_oidc_groups_claim: groups
  54. # kube_oidc_groups_prefix: oidc:
  55. # Choose network plugin (cilium, calico, contiv, weave or flannel)
  56. # Can also be set to 'cloud', which lets the cloud provider setup appropriate routing
  57. kube_network_plugin: calico
  58. # Setting multi_networking to true will install Multus: https://github.com/intel/multus-cni
  59. kube_network_plugin_multus: false
  60. # Kubernetes internal network for services, unused block of space.
  61. kube_service_addresses: 10.233.0.0/18
  62. # internal network. When used, it will assign IP
  63. # addresses from this range to individual pods.
  64. # This network must be unused in your network infrastructure!
  65. kube_pods_subnet: 10.233.64.0/18
  66. # internal network node size allocation (optional). This is the size allocated
  67. # to each node on your network. With these defaults you should have
  68. # room for 4096 nodes with 254 pods per node.
  69. kube_network_node_prefix: 24
  70. # The port the API Server will be listening on.
  71. kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
  72. kube_apiserver_port: 6443 # (https)
  73. #kube_apiserver_insecure_port: 8080 # (http)
  74. # Set to 0 to disable insecure port - Requires RBAC in authorization_modes and kube_api_anonymous_auth: true
  75. kube_apiserver_insecure_port: 0 # (disabled)
  76. # Kube-proxy proxyMode configuration.
  77. # Can be ipvs, iptables
  78. kube_proxy_mode: ipvs
  79. # A string slice of values which specify the addresses to use for NodePorts.
  80. # Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32).
  81. # The default empty string slice ([]) means to use all local addresses.
  82. # kube_proxy_nodeport_addresses_cidr is retained for legacy config
  83. kube_proxy_nodeport_addresses: >-
  84. {%- if kube_proxy_nodeport_addresses_cidr is defined -%}
  85. [{{ kube_proxy_nodeport_addresses_cidr }}]
  86. {%- else -%}
  87. []
  88. {%- endif -%}
  89. # If non-empty, will use this string as identification instead of the actual hostname
  90. #kube_override_hostname: >-
  91. # {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
  92. # {%- else -%}
  93. # {{ inventory_hostname }}
  94. # {%- endif -%}
  95. ## Encrypting Secret Data at Rest (experimental)
  96. kube_encrypt_secret_data: false
  97. # DNS configuration.
  98. # Kubernetes cluster name, also will be used as DNS domain
  99. cluster_name: cluster.local
  100. # Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
  101. ndots: 2
  102. # Can be dnsmasq_kubedns, kubedns, coredns, coredns_dual, manual or none
  103. dns_mode: coredns
  104. # Set manual server if using a custom cluster DNS server
  105. #manual_dns_server: 10.x.x.x
  106. # Enable nodelocal dns cache
  107. enable_nodelocaldns: False
  108. nodelocaldns_ip: 169.254.25.10
  109. # Can be docker_dns, host_resolvconf or none
  110. resolvconf_mode: docker_dns
  111. # Deploy netchecker app to verify DNS resolve as an HTTP service
  112. deploy_netchecker: false
  113. # Ip address of the kubernetes skydns service
  114. skydns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(3)|ipaddr('address') }}"
  115. skydns_server_secondary: "{{ kube_service_addresses|ipaddr('net')|ipaddr(4)|ipaddr('address') }}"
  116. dnsmasq_dns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(2)|ipaddr('address') }}"
  117. dns_domain: "{{ cluster_name }}"
  118. ## Container runtime
  119. ## docker for docker and crio for cri-o.
  120. container_manager: docker
  121. ## Settings for containerized control plane (etcd/kubelet/secrets)
  122. etcd_deployment_type: docker
  123. kubelet_deployment_type: host
  124. helm_deployment_type: host
  125. # K8s image pull policy (imagePullPolicy)
  126. k8s_image_pull_policy: IfNotPresent
  127. # audit log for kubernetes
  128. kubernetes_audit: false
  129. # dynamic kubelet configuration
  130. dynamic_kubelet_configuration: false
  131. # define kubelet config dir for dynamic kubelet
  132. #kubelet_config_dir:
  133. default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
  134. dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
  135. # pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
  136. podsecuritypolicy_enabled: false
  137. # Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
  138. # kubeconfig_localhost: false
  139. # Download kubectl onto the host that runs Ansible in {{ bin_dir }}
  140. # kubectl_localhost: false
  141. # dnsmasq
  142. # dnsmasq_upstream_dns_servers:
  143. # - /resolvethiszone.with/10.0.4.250
  144. # - 8.8.8.8
  145. # Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created. (default true)
  146. # kubelet_cgroups_per_qos: true
  147. # A comma separated list of levels of node allocatable enforcement to be enforced by kubelet.
  148. # Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
  149. # kubelet_enforce_node_allocatable: pods
  150. ## Supplementary addresses that can be added in kubernetes ssl keys.
  151. ## That can be useful for example to setup a keepalived virtual IP
  152. # supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
  153. ## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler.
  154. ## See https://github.com/kubernetes-sigs/kubespray/issues/2141
  155. ## Set this variable to true to get rid of this issue
  156. volume_cross_zone_attachment: false
  157. # Add Persistent Volumes Storage Class for corresponding cloud provider ( OpenStack is only supported now )
  158. persistent_volumes_enabled: false
  159. ## Container Engine Acceleration
  160. ## Enable container acceleration feature, for example use gpu acceleration in containers
  161. # nvidia_accelerator_enabled: true
  162. ## Nvidia GPU driver install. Install will by done by a (init) pod running as a daemonset.
  163. ## Important: if you use Ubuntu then you should set in all.yml 'docker_storage_options: -s overlay2'
  164. ## Array with nvida_gpu_nodes, leave empty or comment if you dont't want to install drivers.
  165. ## Labels and taints won't be set to nodes if they are not in the array.
  166. # nvidia_gpu_nodes:
  167. # - kube-gpu-001
  168. # nvidia_driver_version: "384.111"
  169. ## flavor can be tesla or gtx
  170. # nvidia_gpu_flavor: gtx
  171. ## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
  172. # nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
  173. # nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
  174. ## NVIDIA GPU device plugin image.
  175. # nvidia_gpu_device_plugin_container: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"