271466744d08cb04349d246e56561968c9865f7b
[it/test.git] / XTesting / kubespray / inventory / local / group_vars / k8s_cluster / k8s-cluster.yml
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
11 # This is where all the cert scripts and certs will be located
12 kube_cert_dir: "{{ kube_config_dir }}/ssl"
13
14 # This is where all of the bearer tokens will be stored
15 kube_token_dir: "{{ kube_config_dir }}/tokens"
16
17 kube_api_anonymous_auth: true
18
19 ## Change this to use another Kubernetes version, e.g. a current beta release
20 kube_version: v1.24.4
21
22 # Where the binaries will be downloaded.
23 # Note: ensure that you've enough disk space (about 1G)
24 local_release_dir: "/tmp/releases"
25 # Random shifts for retrying failed ops like pushing/downloading
26 retry_stagger: 5
27
28 # This is the user that owns tha cluster installation.
29 kube_owner: kube
30
31 # This is the group that the cert creation scripts chgrp the
32 # cert files to. Not really changeable...
33 kube_cert_group: kube-cert
34
35 # Cluster Loglevel configuration
36 kube_log_level: 2
37
38 # Directory where credentials will be stored
39 credentials_dir: "{{ inventory_dir }}/credentials"
40
41 ## It is possible to activate / deactivate selected authentication methods (oidc, static token auth)
42 # kube_oidc_auth: false
43 # kube_token_auth: false
44
45
46 ## Variables for OpenID Connect Configuration https://kubernetes.io/docs/admin/authentication/
47 ## To use OpenID you have to deploy additional an OpenID Provider (e.g Dex, Keycloak, ...)
48
49 # kube_oidc_url: https:// ...
50 # kube_oidc_client_id: kubernetes
51 ## Optional settings for OIDC
52 # kube_oidc_ca_file: "{{ kube_cert_dir }}/ca.pem"
53 # kube_oidc_username_claim: sub
54 # kube_oidc_username_prefix: 'oidc:'
55 # kube_oidc_groups_claim: groups
56 # kube_oidc_groups_prefix: 'oidc:'
57
58 ## Variables to control webhook authn/authz
59 # kube_webhook_token_auth: false
60 # kube_webhook_token_auth_url: https://...
61 # kube_webhook_token_auth_url_skip_tls_verify: false
62
63 ## For webhook authorization, authorization_modes must include Webhook
64 # kube_webhook_authorization: false
65 # kube_webhook_authorization_url: https://...
66 # kube_webhook_authorization_url_skip_tls_verify: false
67
68 # Choose network plugin (cilium, calico, kube-ovn, weave or flannel. Use cni for generic cni plugin)
69 # Can also be set to 'cloud', which lets the cloud provider setup appropriate routing
70 kube_network_plugin: calico
71
72 # Setting multi_networking to true will install Multus: https://github.com/intel/multus-cni
73 kube_network_plugin_multus: false
74
75 # Kubernetes internal network for services, unused block of space.
76 kube_service_addresses: 10.233.0.0/18
77
78 # internal network. When used, it will assign IP
79 # addresses from this range to individual pods.
80 # This network must be unused in your network infrastructure!
81 kube_pods_subnet: 10.233.64.0/18
82
83 # internal network node size allocation (optional). This is the size allocated
84 # to each node for pod IP address allocation. Note that the number of pods per node is
85 # also limited by the kubelet_max_pods variable which defaults to 110.
86 #
87 # Example:
88 # Up to 64 nodes and up to 254 or kubelet_max_pods (the lowest of the two) pods per node:
89 #  - kube_pods_subnet: 10.233.64.0/18
90 #  - kube_network_node_prefix: 24
91 #  - kubelet_max_pods: 110
92 #
93 # Example:
94 # Up to 128 nodes and up to 126 or kubelet_max_pods (the lowest of the two) pods per node:
95 #  - kube_pods_subnet: 10.233.64.0/18
96 #  - kube_network_node_prefix: 25
97 #  - kubelet_max_pods: 110
98 kube_network_node_prefix: 24
99
100 # Configure Dual Stack networking (i.e. both IPv4 and IPv6)
101 enable_dual_stack_networks: false
102
103 # Kubernetes internal network for IPv6 services, unused block of space.
104 # This is only used if enable_dual_stack_networks is set to true
105 # This provides 4096 IPv6 IPs
106 kube_service_addresses_ipv6: fd85:ee78:d8a6:8607::1000/116
107
108 # Internal network. When used, it will assign IPv6 addresses from this range to individual pods.
109 # This network must not already be in your network infrastructure!
110 # This is only used if enable_dual_stack_networks is set to true.
111 # This provides room for 256 nodes with 254 pods per node.
112 kube_pods_subnet_ipv6: fd85:ee78:d8a6:8607::1:0000/112
113
114 # IPv6 subnet size allocated to each for pods.
115 # This is only used if enable_dual_stack_networks is set to true
116 # This provides room for 254 pods per node.
117 kube_network_node_prefix_ipv6: 120
118
119 # The port the API Server will be listening on.
120 kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
121 kube_apiserver_port: 6443  # (https)
122
123 # Kube-proxy proxyMode configuration.
124 # Can be ipvs, iptables
125 kube_proxy_mode: ipvs
126
127 # configure arp_ignore and arp_announce to avoid answering ARP queries from kube-ipvs0 interface
128 # must be set to true for MetalLB to work
129 kube_proxy_strict_arp: false
130
131 # A string slice of values which specify the addresses to use for NodePorts.
132 # Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32).
133 # The default empty string slice ([]) means to use all local addresses.
134 # kube_proxy_nodeport_addresses_cidr is retained for legacy config
135 kube_proxy_nodeport_addresses: >-
136   {%- if kube_proxy_nodeport_addresses_cidr is defined -%}
137   [{{ kube_proxy_nodeport_addresses_cidr }}]
138   {%- else -%}
139   []
140   {%- endif -%}
141
142 # If non-empty, will use this string as identification instead of the actual hostname
143 # kube_override_hostname: >-
144 #   {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
145 #   {%- else -%}
146 #   {{ inventory_hostname }}
147 #   {%- endif -%}
148
149 ## Encrypting Secret Data at Rest
150 kube_encrypt_secret_data: false
151
152 # Graceful Node Shutdown (Kubernetes >= 1.21.0), see https://kubernetes.io/blog/2021/04/21/graceful-node-shutdown-beta/
153 # kubelet_shutdown_grace_period had to be greater than kubelet_shutdown_grace_period_critical_pods to allow
154 # non-critical podsa to also terminate gracefully
155 # kubelet_shutdown_grace_period: 60s
156 # kubelet_shutdown_grace_period_critical_pods: 20s
157
158 # DNS configuration.
159 # Kubernetes cluster name, also will be used as DNS domain
160 cluster_name: cluster.local
161 # Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
162 ndots: 2
163 # Can be coredns, coredns_dual, manual or none
164 dns_mode: coredns
165 # Set manual server if using a custom cluster DNS server
166 # manual_dns_server: 10.x.x.x
167 # Enable nodelocal dns cache
168 enable_nodelocaldns: true
169 enable_nodelocaldns_secondary: false
170 nodelocaldns_ip: 169.254.25.10
171 nodelocaldns_health_port: 9254
172 nodelocaldns_second_health_port: 9256
173 nodelocaldns_bind_metrics_host_ip: false
174 nodelocaldns_secondary_skew_seconds: 5
175 # nodelocaldns_external_zones:
176 # - zones:
177 #   - example.com
178 #   - example.io:1053
179 #   nameservers:
180 #   - 1.1.1.1
181 #   - 2.2.2.2
182 #   cache: 5
183 # - zones:
184 #   - https://mycompany.local:4453
185 #   nameservers:
186 #   - 192.168.0.53
187 #   cache: 0
188 # Enable k8s_external plugin for CoreDNS
189 enable_coredns_k8s_external: false
190 coredns_k8s_external_zone: k8s_external.local
191 # Enable endpoint_pod_names option for kubernetes plugin
192 enable_coredns_k8s_endpoint_pod_names: false
193
194 # Can be docker_dns, host_resolvconf or none
195 resolvconf_mode: host_resolvconf
196 # Deploy netchecker app to verify DNS resolve as an HTTP service
197 deploy_netchecker: false
198 # Ip address of the kubernetes skydns service
199 skydns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(3)|ipaddr('address') }}"
200 skydns_server_secondary: "{{ kube_service_addresses|ipaddr('net')|ipaddr(4)|ipaddr('address') }}"
201 dns_domain: "{{ cluster_name }}"
202
203 ## Container runtime
204 ## docker for docker, crio for cri-o and containerd for containerd.
205 ## Default: containerd
206 container_manager: containerd
207
208 # Additional container runtimes
209 kata_containers_enabled: false
210
211 kubeadm_certificate_key: "{{ lookup('password', credentials_dir + '/kubeadm_certificate_key.creds length=64 chars=hexdigits') | lower }}"
212
213 # K8s image pull policy (imagePullPolicy)
214 k8s_image_pull_policy: IfNotPresent
215
216 # audit log for kubernetes
217 kubernetes_audit: false
218
219 # define kubelet config dir for dynamic kubelet
220 # kubelet_config_dir:
221 default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
222
223 # pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
224 podsecuritypolicy_enabled: false
225
226 # Custom PodSecurityPolicySpec for restricted policy
227 # podsecuritypolicy_restricted_spec: {}
228
229 # Custom PodSecurityPolicySpec for privileged policy
230 # podsecuritypolicy_privileged_spec: {}
231
232 # Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
233 # kubeconfig_localhost: false
234 # Use ansible_host as external api ip when copying over kubeconfig.
235 # kubeconfig_localhost_ansible_host: false
236 # Download kubectl onto the host that runs Ansible in {{ bin_dir }}
237 # kubectl_localhost: false
238
239 # A comma separated list of levels of node allocatable enforcement to be enforced by kubelet.
240 # Acceptable options are 'pods', 'system-reserved', 'kube-reserved' and ''. Default is "".
241 # kubelet_enforce_node_allocatable: pods
242
243 ## Optionally reserve resources for OS system daemons.
244 # system_reserved: true
245 ## Uncomment to override default values
246 # system_memory_reserved: 512Mi
247 # system_cpu_reserved: 500m
248 # system_ephemeral_storage_reserved: 2Gi
249 ## Reservation for master hosts
250 # system_master_memory_reserved: 256Mi
251 # system_master_cpu_reserved: 250m
252 # system_master_ephemeral_storage_reserved: 2Gi
253
254 ## Eviction Thresholds to avoid system OOMs
255 # https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#eviction-thresholds
256 # eviction_hard: {}
257 # eviction_hard_control_plane: {}
258
259 # An alternative flexvolume plugin directory
260 # kubelet_flexvolumes_plugins_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
261
262 ## Supplementary addresses that can be added in kubernetes ssl keys.
263 ## That can be useful for example to setup a keepalived virtual IP
264 # supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
265
266 ## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler.
267 ## See https://github.com/kubernetes-sigs/kubespray/issues/2141
268 ## Set this variable to true to get rid of this issue
269 volume_cross_zone_attachment: false
270 ## Add Persistent Volumes Storage Class for corresponding cloud provider (supported: in-tree OpenStack, Cinder CSI,
271 ## AWS EBS CSI, Azure Disk CSI, GCP Persistent Disk CSI)
272 persistent_volumes_enabled: false
273
274 ## Container Engine Acceleration
275 ## Enable container acceleration feature, for example use gpu acceleration in containers
276 # nvidia_accelerator_enabled: true
277 ## Nvidia GPU driver install. Install will by done by a (init) pod running as a daemonset.
278 ## Important: if you use Ubuntu then you should set in all.yml 'docker_storage_options: -s overlay2'
279 ## Array with nvida_gpu_nodes, leave empty or comment if you don't want to install drivers.
280 ## Labels and taints won't be set to nodes if they are not in the array.
281 # nvidia_gpu_nodes:
282 #   - kube-gpu-001
283 # nvidia_driver_version: "384.111"
284 ## flavor can be tesla or gtx
285 # nvidia_gpu_flavor: gtx
286 ## NVIDIA driver installer images. Change them if you have trouble accessing gcr.io.
287 # nvidia_driver_install_centos_container: atzedevries/nvidia-centos-driver-installer:2
288 # nvidia_driver_install_ubuntu_container: gcr.io/google-containers/ubuntu-nvidia-driver-installer@sha256:7df76a0f0a17294e86f691c81de6bbb7c04a1b4b3d4ea4e7e2cccdc42e1f6d63
289 ## NVIDIA GPU device plugin image.
290 # nvidia_gpu_device_plugin_container: "registry.k8s.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
291
292 ## Support tls min version, Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
293 # tls_min_version: ""
294
295 ## Support tls cipher suites.
296 # tls_cipher_suites: {}
297 #   - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
298 #   - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
299 #   - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
300 #   - TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
301 #   - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
302 #   - TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
303 #   - TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
304 #   - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
305 #   - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
306 #   - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
307 #   - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
308 #   - TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
309 #   - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
310 #   - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
311 #   - TLS_ECDHE_RSA_WITH_RC4_128_SHA
312 #   - TLS_RSA_WITH_3DES_EDE_CBC_SHA
313 #   - TLS_RSA_WITH_AES_128_CBC_SHA
314 #   - TLS_RSA_WITH_AES_128_CBC_SHA256
315 #   - TLS_RSA_WITH_AES_128_GCM_SHA256
316 #   - TLS_RSA_WITH_AES_256_CBC_SHA
317 #   - TLS_RSA_WITH_AES_256_GCM_SHA384
318 #   - TLS_RSA_WITH_RC4_128_SHA
319
320 ## Amount of time to retain events. (default 1h0m0s)
321 event_ttl_duration: "1h0m0s"
322
323 ## Automatically renew K8S control plane certificates on first Monday of each month
324 auto_renew_certificates: false
325 # First Monday of each month
326 # auto_renew_certificates_systemd_calendar: "Mon *-*-1,2,3,4,5,6,7 03:{{ groups['kube_control_plane'].index(inventory_hostname) }}0:00"