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.

245 lines
8.9 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. ---
  2. # disable upgrade cluster
  3. upgrade_cluster_setup: false
  4. # By default the external API listens on all interfaces, this can be changed to
  5. # listen on a specific address/interface.
  6. # NOTE: If you specific address/interface and use loadbalancer_apiserver_localhost
  7. # loadbalancer_apiserver_localhost (nginx/haproxy) will deploy on control plane nodes on 127.0.0.1:{{ loadbalancer_apiserver_port | default(kube_apiserver_port) }} too.
  8. kube_apiserver_bind_address: 0.0.0.0
  9. # A port range to reserve for services with NodePort visibility.
  10. # Inclusive at both ends of the range.
  11. kube_apiserver_node_port_range: "30000-32767"
  12. # ETCD backend for k8s data
  13. kube_apiserver_storage_backend: etcd3
  14. # The interval of compaction requests. If 0, the compaction request from apiserver is disabled.
  15. kube_apiserver_etcd_compaction_interval: "5m0s"
  16. # CIS 1.2.26
  17. # Validate that the service account token
  18. # in the request is actually present in etcd.
  19. kube_apiserver_service_account_lookup: true
  20. kube_etcd_cacert_file: ca.pem
  21. kube_etcd_cert_file: node-{{ inventory_hostname }}.pem
  22. kube_etcd_key_file: node-{{ inventory_hostname }}-key.pem
  23. # Associated interfaces must be reachable by the rest of the cluster, and by
  24. # CLI/web clients.
  25. kube_controller_manager_bind_address: 0.0.0.0
  26. # Leader election lease durations and timeouts for controller-manager
  27. kube_controller_manager_leader_elect_lease_duration: 15s
  28. kube_controller_manager_leader_elect_renew_deadline: 10s
  29. # discovery_timeout modifies the discovery timeout
  30. discovery_timeout: 5m0s
  31. # Instruct first control plane node to refresh kubeadm token
  32. kubeadm_refresh_token: true
  33. # Scale down coredns replicas to 0 if not using coredns dns_mode
  34. kubeadm_scale_down_coredns_enabled: true
  35. # audit support
  36. kubernetes_audit: false
  37. # path to audit log file
  38. audit_log_path: /var/log/audit/kube-apiserver-audit.log
  39. # num days
  40. audit_log_maxage: 30
  41. # the num of audit logs to retain
  42. audit_log_maxbackups: 10
  43. # the max size in MB to retain
  44. audit_log_maxsize: 100
  45. # policy file
  46. audit_policy_file: "{{ kube_config_dir }}/audit-policy/apiserver-audit-policy.yaml"
  47. # custom audit policy rules (to replace the default ones)
  48. # audit_policy_custom_rules: |
  49. # - level: None
  50. # users: []
  51. # verbs: []
  52. # resources: []
  53. # audit log hostpath
  54. audit_log_name: audit-logs
  55. audit_log_hostpath: /var/log/kubernetes/audit
  56. audit_log_mountpath: "{{ audit_log_path | dirname }}"
  57. # audit policy hostpath
  58. audit_policy_name: audit-policy
  59. audit_policy_hostpath: "{{ audit_policy_file | dirname }}"
  60. audit_policy_mountpath: "{{ audit_policy_hostpath }}"
  61. # audit webhook support
  62. kubernetes_audit_webhook: false
  63. # path to audit webhook config file
  64. audit_webhook_config_file: "{{ kube_config_dir }}/audit-policy/apiserver-audit-webhook-config.yaml"
  65. audit_webhook_server_url: "https://audit.app"
  66. audit_webhook_server_extra_args: {}
  67. audit_webhook_mode: batch
  68. audit_webhook_batch_max_size: 100
  69. audit_webhook_batch_max_wait: 1s
  70. kube_controller_node_monitor_grace_period: 40s
  71. kube_controller_node_monitor_period: 5s
  72. kube_controller_terminated_pod_gc_threshold: 12500
  73. kube_apiserver_request_timeout: "1m0s"
  74. kube_apiserver_pod_eviction_not_ready_timeout_seconds: "300"
  75. kube_apiserver_pod_eviction_unreachable_timeout_seconds: "300"
  76. # 1.10+ admission plugins
  77. kube_apiserver_enable_admission_plugins: []
  78. # enable admission plugins configuration
  79. kube_apiserver_admission_control_config_file: false
  80. # data structure to configure EventRateLimit admission plugin
  81. # this should have the following structure:
  82. # kube_apiserver_admission_event_rate_limits:
  83. # <limit_name>:
  84. # type: <limit_type>
  85. # qps: <qps_value>
  86. # burst: <burst_value>
  87. # cache_size: <cache_size_value>
  88. kube_apiserver_admission_event_rate_limits: {}
  89. kube_pod_security_use_default: false
  90. kube_pod_security_default_enforce: baseline
  91. kube_pod_security_default_enforce_version: "{{ kube_major_version }}"
  92. kube_pod_security_default_audit: restricted
  93. kube_pod_security_default_audit_version: "{{ kube_major_version }}"
  94. kube_pod_security_default_warn: restricted
  95. kube_pod_security_default_warn_version: "{{ kube_major_version }}"
  96. kube_pod_security_exemptions_usernames: []
  97. kube_pod_security_exemptions_runtime_class_names: []
  98. kube_pod_security_exemptions_namespaces:
  99. - kube-system
  100. # 1.10+ list of disabled admission plugins
  101. kube_apiserver_disable_admission_plugins: []
  102. # extra runtime config
  103. kube_api_runtime_config: []
  104. ## Enable/Disable Kube API Server Authentication Methods
  105. kube_token_auth: false
  106. kube_oidc_auth: false
  107. ## Variables for webhook token auth https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication
  108. kube_webhook_token_auth: false
  109. kube_webhook_token_auth_url_skip_tls_verify: false
  110. # kube_webhook_token_auth_url: https://...
  111. ## base64-encoded string of the webhook's CA certificate
  112. # kube_webhook_token_auth_ca_data: "LS0t..."
  113. ## Variables for webhook token authz https://kubernetes.io/docs/reference/access-authn-authz/webhook/
  114. # kube_webhook_authorization_url: https://...
  115. kube_webhook_authorization: false
  116. kube_webhook_authorization_url_skip_tls_verify: false
  117. # Default podnodeselector
  118. kube_apiserver_admission_plugins_podnodeselector_default_node_selector: ""
  119. ## Variables for OpenID Connect Configuration https://kubernetes.io/docs/admin/authentication/
  120. ## To use OpenID you have to deploy additional an OpenID Provider (e.g Dex, Keycloak, ...)
  121. # kube_oidc_url: https:// ...
  122. # kube_oidc_client_id: kubernetes
  123. ## Optional settings for OIDC
  124. # kube_oidc_username_claim: sub
  125. # kube_oidc_username_prefix: 'oidc:'
  126. # kube_oidc_groups_claim: groups
  127. # kube_oidc_groups_prefix: 'oidc:'
  128. # Copy oidc CA file to the following path if needed
  129. # kube_oidc_ca_file: {{ kube_cert_dir }}/ca.pem
  130. # Optionally include a base64-encoded oidc CA cert
  131. # kube_oidc_ca_cert: c3RhY2thYnVzZS5jb20...
  132. # List of the preferred NodeAddressTypes to use for kubelet connections.
  133. kubelet_preferred_address_types: 'InternalDNS,InternalIP,Hostname,ExternalDNS,ExternalIP'
  134. ## Extra args for k8s components passing by kubeadm
  135. kube_kubeadm_apiserver_extra_args: {}
  136. kube_kubeadm_controller_extra_args: {}
  137. ## Extra control plane host volume mounts
  138. ## Example:
  139. # apiserver_extra_volumes:
  140. # - name: name
  141. # hostPath: /host/path
  142. # mountPath: /mount/path
  143. # readOnly: true
  144. apiserver_extra_volumes: {}
  145. controller_manager_extra_volumes: {}
  146. ## Encrypting Secret Data at Rest
  147. kube_encrypt_secret_data: false
  148. kube_encrypt_token: "{{ lookup('password', credentials_dir + '/kube_encrypt_token.creds length=32 chars=ascii_letters,digits') }}"
  149. # Must be either: aescbc, secretbox or aesgcm
  150. kube_encryption_algorithm: "secretbox"
  151. # Which kubernetes resources to encrypt
  152. kube_encryption_resources: [secrets]
  153. # If non-empty, will use this string as identification instead of the actual hostname
  154. kube_override_hostname: >-
  155. {%- if cloud_provider is defined and cloud_provider in ['aws'] -%}
  156. {%- else -%}
  157. {{ inventory_hostname }}
  158. {%- endif -%}
  159. secrets_encryption_query: "resources[*].providers[0].{{ kube_encryption_algorithm }}.keys[0].secret"
  160. ## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  161. # tls_min_version: ""
  162. ## Support tls cipher suites.
  163. # tls_cipher_suites:
  164. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  165. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  166. # - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  167. # - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  168. # - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  169. # - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
  170. # - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  171. # - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  172. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  173. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  174. # - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  175. # - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  176. # - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  177. # - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
  178. # - TLS_ECDHE_RSA_WITH_RC4_128_SHA
  179. # - TLS_RSA_WITH_3DES_EDE_CBC_SHA
  180. # - TLS_RSA_WITH_AES_128_CBC_SHA
  181. # - TLS_RSA_WITH_AES_128_CBC_SHA256
  182. # - TLS_RSA_WITH_AES_128_GCM_SHA256
  183. # - TLS_RSA_WITH_AES_256_CBC_SHA
  184. # - TLS_RSA_WITH_AES_256_GCM_SHA384
  185. # - TLS_RSA_WITH_RC4_128_SHA
  186. ## Amount of time to retain events. (default 1h0m0s)
  187. event_ttl_duration: "1h0m0s"
  188. ## Automatically renew K8S control plane certificates on first Monday of each month
  189. auto_renew_certificates: false
  190. # First Monday of each month
  191. auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:00:00"
  192. # kubeadm renews all the certificates during control plane upgrade.
  193. # If we have requirement like without renewing certs upgrade the cluster,
  194. # we can opt out from the default behavior by setting kubeadm_upgrade_auto_cert_renewal to false
  195. kubeadm_upgrade_auto_cert_renewal: true
  196. # Bash alias of kubectl to interact with Kubernetes cluster much easier
  197. # kubectl_alias: k
  198. ## Enable distributed tracing for kube-apiserver
  199. kube_apiserver_tracing: false
  200. kube_apiserver_tracing_endpoint: 0.0.0.0:4317
  201. kube_apiserver_tracing_sampling_rate_per_million: 100
  202. # Enable kubeadm file discovery if anonymous access has been removed
  203. kubeadm_use_file_discovery: "{{ remove_anonymous_access }}"