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.

195 lines
6.8 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. # Experimental kubeadm etcd deployment mode. Available only for new deployment
  5. etcd_kubeadm_enabled: false
  6. # change to 0.0.0.0 to enable insecure access from anywhere (not recommended)
  7. kube_apiserver_insecure_bind_address: 127.0.0.1
  8. # By default the external API listens on all interfaces, this can be changed to
  9. # listen on a specific address/interface.
  10. kube_apiserver_bind_address: 0.0.0.0
  11. # A port range to reserve for services with NodePort visibility.
  12. # Inclusive at both ends of the range.
  13. kube_apiserver_node_port_range: "30000-32767"
  14. # ETCD backend for k8s data
  15. kube_apiserver_storage_backend: etcd3
  16. kube_etcd_cacert_file: ca.pem
  17. kube_etcd_cert_file: node-{{ inventory_hostname }}.pem
  18. kube_etcd_key_file: node-{{ inventory_hostname }}-key.pem
  19. # Associated interfaces must be reachable by the rest of the cluster, and by
  20. # CLI/web clients.
  21. kube_controller_manager_bind_address: 0.0.0.0
  22. # Leader election lease durations and timeouts for controller-manager
  23. kube_controller_manager_leader_elect_lease_duration: 15s
  24. kube_controller_manager_leader_elect_renew_deadline: 10s
  25. # discovery_timeout modifies the discovery timeout
  26. discovery_timeout: 5m0s
  27. # Instruct first master to refresh kubeadm token
  28. kubeadm_refresh_token: true
  29. # Scale down coredns replicas to 0 if not using coredns dns_mode
  30. kubeadm_scale_down_coredns_enabled: true
  31. # audit support
  32. kubernetes_audit: false
  33. # path to audit log file
  34. audit_log_path: /var/log/audit/kube-apiserver-audit.log
  35. # num days
  36. audit_log_maxage: 30
  37. # the num of audit logs to retain
  38. audit_log_maxbackups: 1
  39. # the max size in MB to retain
  40. audit_log_maxsize: 100
  41. # policy file
  42. audit_policy_file: "{{ kube_config_dir }}/audit-policy/apiserver-audit-policy.yaml"
  43. # custom audit policy rules (to replace the default ones)
  44. # audit_policy_custom_rules: |
  45. # - level: None
  46. # users: []
  47. # verbs: []
  48. # resources: []
  49. # audit log hostpath
  50. audit_log_name: audit-logs
  51. audit_log_hostpath: /var/log/kubernetes/audit
  52. audit_log_mountpath: "{{ audit_log_path | dirname }}"
  53. # audit policy hostpath
  54. audit_policy_name: audit-policy
  55. audit_policy_hostpath: "{{ audit_policy_file | dirname }}"
  56. audit_policy_mountpath: "{{ audit_policy_hostpath }}"
  57. # audit webhook support
  58. kubernetes_audit_webhook: false
  59. # path to audit webhook config file
  60. audit_webhook_config_file: "{{ kube_config_dir }}/audit-policy/apiserver-audit-webhook-config.yaml"
  61. audit_webhook_server_url: "https://audit.app"
  62. audit_webhook_server_extra_args: {}
  63. audit_webhook_mode: batch
  64. audit_webhook_batch_max_size: 100
  65. audit_webhook_batch_max_wait: 1s
  66. kube_controller_node_monitor_grace_period: 40s
  67. kube_controller_node_monitor_period: 5s
  68. kube_controller_terminated_pod_gc_threshold: 12500
  69. kube_apiserver_request_timeout: "1m0s"
  70. kube_apiserver_pod_eviction_not_ready_timeout_seconds: "300"
  71. kube_apiserver_pod_eviction_unreachable_timeout_seconds: "300"
  72. # 1.10+ admission plugins
  73. kube_apiserver_enable_admission_plugins: []
  74. # 1.10+ list of disabled admission plugins
  75. kube_apiserver_disable_admission_plugins: []
  76. # extra runtime config
  77. kube_api_runtime_config: []
  78. ## Enable/Disable Kube API Server Authentication Methods
  79. kube_token_auth: false
  80. kube_oidc_auth: false
  81. kube_webhook_token_auth: false
  82. kube_webhook_token_auth_url_skip_tls_verify: false
  83. ## Variables for webhook token auth https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication
  84. # kube_webhook_token_auth_url: https://...
  85. kube_webhook_authorization: false
  86. ## Variables for webhook token authz https://kubernetes.io/docs/reference/access-authn-authz/webhook/
  87. # kube_webhook_authorization_url: https://...
  88. kube_webhook_authorization_url_skip_tls_verify: false
  89. ## Variables for OpenID Connect Configuration https://kubernetes.io/docs/admin/authentication/
  90. ## To use OpenID you have to deploy additional an OpenID Provider (e.g Dex, Keycloak, ...)
  91. # kube_oidc_url: https:// ...
  92. # kube_oidc_client_id: kubernetes
  93. ## Optional settings for OIDC
  94. # kube_oidc_username_claim: sub
  95. # kube_oidc_username_prefix: 'oidc:'
  96. # kube_oidc_groups_claim: groups
  97. # kube_oidc_groups_prefix: 'oidc:'
  98. # Copy oidc CA file to the following path if needed
  99. # kube_oidc_ca_file: {{ kube_cert_dir }}/ca.pem
  100. # Optionally include a base64-encoded oidc CA cert
  101. # kube_oidc_ca_cert: c3RhY2thYnVzZS5jb20...
  102. # List of the preferred NodeAddressTypes to use for kubelet connections.
  103. kubelet_preferred_address_types: 'InternalDNS,InternalIP,Hostname,ExternalDNS,ExternalIP'
  104. ## Extra args for k8s components passing by kubeadm
  105. kube_kubeadm_apiserver_extra_args: {}
  106. kube_kubeadm_controller_extra_args: {}
  107. ## Extra control plane host volume mounts
  108. ## Example:
  109. # apiserver_extra_volumes:
  110. # - name: name
  111. # hostPath: /host/path
  112. # mountPath: /mount/path
  113. # readOnly: true
  114. apiserver_extra_volumes: {}
  115. controller_manager_extra_volumes: {}
  116. ## Encrypting Secret Data at Rest
  117. kube_encrypt_secret_data: false
  118. kube_encrypt_token: "{{ lookup('password', credentials_dir + '/kube_encrypt_token.creds length=32 chars=ascii_letters,digits') }}"
  119. # Must be either: aescbc, secretbox or aesgcm
  120. kube_encryption_algorithm: "aescbc"
  121. # Which kubernetes resources to encrypt
  122. kube_encryption_resources: [secrets]
  123. # If non-empty, will use this string as identification instead of the actual hostname
  124. kube_override_hostname: >-
  125. {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
  126. {%- else -%}
  127. {{ inventory_hostname }}
  128. {%- endif -%}
  129. secrets_encryption_query: "resources[*].providers[0].{{kube_encryption_algorithm}}.keys[0].secret"
  130. ## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  131. # tls_min_version: ""
  132. ## Support tls cipher suites.
  133. # tls_cipher_suites:
  134. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  135. # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  136. # - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  137. # - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  138. # - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  139. # - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
  140. # - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  141. # - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  142. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  143. # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  144. # - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  145. # - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  146. # - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  147. # - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
  148. # - TLS_ECDHE_RSA_WITH_RC4_128_SHA
  149. # - TLS_RSA_WITH_3DES_EDE_CBC_SHA
  150. # - TLS_RSA_WITH_AES_128_CBC_SHA
  151. # - TLS_RSA_WITH_AES_128_CBC_SHA256
  152. # - TLS_RSA_WITH_AES_128_GCM_SHA256
  153. # - TLS_RSA_WITH_AES_256_CBC_SHA
  154. # - TLS_RSA_WITH_AES_256_GCM_SHA384
  155. # - TLS_RSA_WITH_RC4_128_SHA
  156. ## Amount of time to retain events. (default 1h0m0s)
  157. event_ttl_duration: "1h0m0s"
  158. ## Automatically renew K8S control plane certificates on first Monday of each month
  159. auto_renew_certificates: false
  160. # First Monday of each month
  161. auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:{{ groups['kube_control_plane'].index(inventory_hostname) }}0:00"