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.

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