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.

591 lines
23 KiB

6 years ago
  1. ---
  2. # Use proxycommand if bastion host is in group all
  3. # This change obseletes editing ansible.cfg file depending on bastion existence
  4. ansible_ssh_common_args: "{% if 'bastion' in groups['all'] %} -o ProxyCommand='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -W %h:%p -p {{ hostvars['bastion']['ansible_port'] | default(22) }} {{ hostvars['bastion']['ansible_user'] }}@{{ hostvars['bastion']['ansible_host'] }} {% if ansible_ssh_private_key_file is defined %}-i {{ ansible_ssh_private_key_file }}{% endif %} ' {% endif %}"
  5. # selinux state
  6. preinstall_selinux_state: permissive
  7. kube_api_anonymous_auth: true
  8. # Default value, but will be set to true automatically if detected
  9. is_fedora_coreos: false
  10. # optional disable the swap
  11. disable_swap: true
  12. ## Change this to use another Kubernetes version, e.g. a current beta release
  13. kube_version: v1.21.3
  14. ## The minimum version working
  15. kube_version_min_required: v1.19.0
  16. ## Kube Proxy mode One of ['iptables','ipvs']
  17. kube_proxy_mode: ipvs
  18. ## List of kubeadm init phases that should be skipped during control plane setup
  19. ## By default 'addon/coredns' is skipped
  20. ## 'addon/kube-proxy' gets skipped for some network plugins
  21. kubeadm_init_phases_skip_default: [ "addon/coredns" ]
  22. kubeadm_init_phases_skip: >-
  23. {%- if kube_network_plugin == 'kube-router' and (kube_router_run_service_proxy is defined and kube_router_run_service_proxy) -%}
  24. {{ kubeadm_init_phases_skip_default }} + [ "addon/kube-proxy" ]
  25. {%- elif kube_network_plugin == 'cilium' and (cilium_kube_proxy_replacement is defined and cilium_kube_proxy_replacement == 'strict') -%}
  26. {{ kubeadm_init_phases_skip_default }} + [ "addon/kube-proxy" ]
  27. {%- elif kube_proxy_remove is defined and kube_proxy_remove -%}
  28. {{ kubeadm_init_phases_skip_default }} + [ "addon/kube-proxy" ]
  29. {%- else -%}
  30. {{ kubeadm_init_phases_skip_default }}
  31. {%- endif -%}
  32. # A string slice of values which specify the addresses to use for NodePorts.
  33. # Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32).
  34. # The default empty string slice ([]) means to use all local addresses.
  35. # kube_proxy_nodeport_addresses_cidr is retained for legacy config
  36. kube_proxy_nodeport_addresses: >-
  37. {%- if kube_proxy_nodeport_addresses_cidr is defined -%}
  38. [{{ kube_proxy_nodeport_addresses_cidr }}]
  39. {%- else -%}
  40. []
  41. {%- endif -%}
  42. # Set to true to allow pre-checks to fail and continue deployment
  43. ignore_assert_errors: false
  44. # nginx-proxy configure
  45. nginx_config_dir: "/etc/nginx"
  46. # haproxy configure
  47. haproxy_config_dir: "/etc/haproxy"
  48. # Directory where the binaries will be installed
  49. bin_dir: /usr/local/bin
  50. docker_bin_dir: /usr/bin
  51. containerd_bin_dir: /usr/bin
  52. etcd_data_dir: /var/lib/etcd
  53. # Where the binaries will be downloaded.
  54. # Note: ensure that you've enough disk space (about 1G)
  55. local_release_dir: "/tmp/releases"
  56. # Random shifts for retrying failed ops like pushing/downloading
  57. retry_stagger: 5
  58. # Install epel repo on Centos/RHEL
  59. epel_enabled: false
  60. # DNS configuration.
  61. # Kubernetes cluster name, also will be used as DNS domain
  62. cluster_name: cluster.local
  63. # Subdomains of DNS domain to be resolved via /etc/resolv.conf for hostnet pods
  64. ndots: 2
  65. # Default resolv.conf options
  66. docker_dns_options:
  67. - ndots:{{ ndots }}
  68. - timeout:2
  69. - attempts:2
  70. # Can be coredns, coredns_dual, manual, or none
  71. dns_mode: coredns
  72. # Enable nodelocal dns cache
  73. enable_nodelocaldns: true
  74. nodelocaldns_ip: 169.254.25.10
  75. nodelocaldns_health_port: 9254
  76. nodelocaldns_bind_metrics_host_ip: false
  77. # Should be set to a cluster IP if using a custom cluster DNS
  78. manual_dns_server: ""
  79. # Can be docker_dns, host_resolvconf or none
  80. resolvconf_mode: docker_dns
  81. # Deploy netchecker app to verify DNS resolve as an HTTP service
  82. deploy_netchecker: false
  83. # Ip address of the kubernetes DNS service (called skydns for historical reasons)
  84. skydns_server: "{{ kube_service_addresses|ipaddr('net')|ipaddr(3)|ipaddr('address') }}"
  85. skydns_server_secondary: "{{ kube_service_addresses|ipaddr('net')|ipaddr(4)|ipaddr('address') }}"
  86. dns_domain: "{{ cluster_name }}"
  87. docker_dns_search_domains:
  88. - 'default.svc.{{ dns_domain }}'
  89. - 'svc.{{ dns_domain }}'
  90. kube_dns_servers:
  91. coredns: ["{{skydns_server}}"]
  92. coredns_dual: "{{[skydns_server] + [ skydns_server_secondary ]}}"
  93. manual: ["{{manual_dns_server}}"]
  94. dns_servers: "{{kube_dns_servers[dns_mode]}}"
  95. enable_coredns_k8s_external: false
  96. coredns_k8s_external_zone: k8s_external.local
  97. enable_coredns_k8s_endpoint_pod_names: false
  98. # Kubernetes configuration dirs and system namespace.
  99. # Those are where all the additional config stuff goes
  100. # the kubernetes normally puts in /srv/kubernetes.
  101. # This puts them in a same location and namespace.
  102. # Editing those values will almost surely break something.
  103. kube_config_dir: /etc/kubernetes
  104. kube_script_dir: "{{ bin_dir }}/kubernetes-scripts"
  105. kube_manifest_dir: "{{ kube_config_dir }}/manifests"
  106. # This is where all the cert scripts and certs will be located
  107. kube_cert_dir: "{{ kube_config_dir }}/ssl"
  108. # compatibility directory for kubeadm
  109. kube_cert_compat_dir: "/etc/kubernetes/pki"
  110. # This is where all of the bearer tokens will be stored
  111. kube_token_dir: "{{ kube_config_dir }}/tokens"
  112. # This is the group that the cert creation scripts chgrp the
  113. # cert files to. Not really changeable...
  114. kube_cert_group: kube-cert
  115. # Cluster Loglevel configuration
  116. kube_log_level: 2
  117. # Choose network plugin (cilium, calico, weave or flannel)
  118. # Can also be set to 'cloud', which lets the cloud provider setup appropriate routing
  119. kube_network_plugin: calico
  120. kube_network_plugin_multus: false
  121. # Determines if calico_rr group exists
  122. peer_with_calico_rr: "{{ 'calico_rr' in groups and groups['calico_rr']|length > 0 }}"
  123. # Choose data store type for calico: "etcd" or "kdd" (kubernetes datastore)
  124. calico_datastore: "kdd"
  125. # Kubernetes internal network for services, unused block of space.
  126. kube_service_addresses: 10.233.0.0/18
  127. # internal network. When used, it will assign IP
  128. # addresses from this range to individual pods.
  129. # This network must be unused in your network infrastructure!
  130. kube_pods_subnet: 10.233.64.0/18
  131. # internal network node size allocation (optional). This is the size allocated
  132. # to each node for pod IP address allocation. Note that the number of pods per node is
  133. # also limited by the kubelet_max_pods variable which defaults to 110.
  134. #
  135. # Example:
  136. # Up to 64 nodes and up to 254 or kubelet_max_pods (the lowest of the two) pods per node:
  137. # - kube_pods_subnet: 10.233.64.0/18
  138. # - kube_network_node_prefix: 24
  139. # - kubelet_max_pods: 110
  140. #
  141. # Example:
  142. # Up to 128 nodes and up to 126 or kubelet_max_pods (the lowest of the two) pods per node:
  143. # - kube_pods_subnet: 10.233.64.0/18
  144. # - kube_network_node_prefix: 25
  145. # - kubelet_max_pods: 110
  146. kube_network_node_prefix: 24
  147. # Configure Dual Stack networking (i.e. both IPv4 and IPv6)
  148. enable_dual_stack_networks: false
  149. # Kubernetes internal network for IPv6 services, unused block of space.
  150. # This is only used if enable_dual_stack_networks is set to true
  151. # This provides 4096 IPv6 IPs
  152. kube_service_addresses_ipv6: fd85:ee78:d8a6:8607::1000/116
  153. # Internal network. When used, it will assign IPv6 addresses from this range to individual pods.
  154. # This network must not already be in your network infrastructure!
  155. # This is only used if enable_dual_stack_networks is set to true.
  156. # This provides room for 256 nodes with 254 pods per node.
  157. kube_pods_subnet_ipv6: fd85:ee78:d8a6:8607::1:0000/112
  158. # IPv6 subnet size allocated to each for pods.
  159. # This is only used if enable_dual_stack_networks is set to true
  160. # This provides room for 254 pods per node.
  161. kube_network_node_prefix_ipv6: 120
  162. # The virtual cluster IP, real host IPs and ports the API Server will be
  163. # listening on.
  164. # NOTE: loadbalancer_apiserver_localhost somewhat alters the final API enpdoint
  165. # access IP value (automatically evaluated below)
  166. kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
  167. kube_apiserver_bind_address: 0.0.0.0
  168. # https
  169. kube_apiserver_port: 6443
  170. # http
  171. kube_apiserver_insecure_bind_address: 127.0.0.1
  172. kube_apiserver_insecure_port: 0
  173. # If non-empty, will use this string as identification instead of the actual hostname
  174. kube_override_hostname: >-
  175. {%- if cloud_provider is defined and cloud_provider in [ 'aws' ] -%}
  176. {%- else -%}
  177. {{ inventory_hostname }}
  178. {%- endif -%}
  179. # dynamic kubelet configuration
  180. dynamic_kubelet_configuration: false
  181. # define kubelet config dir for dynamic kubelet
  182. # kubelet_config_dir:
  183. default_kubelet_config_dir: "{{ kube_config_dir }}/dynamic_kubelet_dir"
  184. dynamic_kubelet_configuration_dir: "{{ kubelet_config_dir | default(default_kubelet_config_dir) }}"
  185. # Aggregator
  186. kube_api_aggregator_routing: false
  187. # Profiling
  188. kube_profiling: false
  189. # Graceful Node Shutdown
  190. # This requires kubernetes >= 1.21.0
  191. kubelet_shutdown_grace_period: 60s
  192. # kubelet_shutdown_grace_period_critical_pods should be less than kubelet_shutdown_grace_period
  193. # to give normal pods time to be gracefully evacuated
  194. kubelet_shutdown_grace_period_critical_pods: 20s
  195. # Container for runtime
  196. container_manager: docker
  197. # Enable Kata Containers as additional container runtime
  198. # When enabled, it requires `container_manager` different than Docker
  199. kata_containers_enabled: false
  200. # Enable gVisor as an additional container runtime
  201. # gVisor is only supported with container_manager Docker or containerd
  202. gvisor_enabled: false
  203. # Enable crun as additional container runtime
  204. # When enabled, it requires container_manager=crio
  205. crun_enabled: false
  206. # Container on localhost (download images when download_localhost is true)
  207. container_manager_on_localhost: "{{ container_manager }}"
  208. # CRI socket path
  209. cri_socket: >-
  210. {%- if container_manager == 'crio' -%}
  211. /var/run/crio/crio.sock
  212. {%- elif container_manager == 'containerd' -%}
  213. /var/run/containerd/containerd.sock
  214. {%- else -%}
  215. /var/run/dockershim.sock
  216. {%- endif -%}
  217. ## Uncomment this if you want to force overlay/overlay2 as docker storage driver
  218. ## Please note that overlay2 is only supported on newer kernels
  219. # docker_storage_options: -s overlay2
  220. ## Enable docker_container_storage_setup, it will configure devicemapper driver on Centos7 or RedHat7.
  221. docker_container_storage_setup: false
  222. ## It must be define a disk path for docker_container_storage_setup_devs.
  223. ## Otherwise docker-storage-setup will be executed incorrectly.
  224. # docker_container_storage_setup_devs: /dev/vdb
  225. ## Only set this if you have more than 3 nameservers:
  226. ## If true Kubespray will only use the first 3, otherwise it will fail
  227. docker_dns_servers_strict: false
  228. # Path used to store Docker data
  229. docker_daemon_graph: "/var/lib/docker"
  230. ## Used to set docker daemon iptables options to true
  231. docker_iptables_enabled: "false"
  232. # Docker log options
  233. # Rotate container stderr/stdout logs at 50m and keep last 5
  234. docker_log_opts: "--log-opt max-size=50m --log-opt max-file=5"
  235. ## A list of insecure docker registries (IP address or domain name), for example
  236. ## to allow insecure-registry access to self-hosted registries. Empty by default.
  237. # docker_insecure_registries:
  238. # - mirror.registry.io
  239. # - 172.19.16.11
  240. docker_insecure_registries: []
  241. ## A list of additional registry mirrors, for example China registry mirror. Empty by default.
  242. # docker_registry_mirrors:
  243. # - https://registry.docker-cn.com
  244. # - https://mirror.aliyuncs.com
  245. docker_registry_mirrors: []
  246. ## If non-empty will override default system MounFlags value.
  247. ## This option takes a mount propagation flag: shared, slave
  248. ## or private, which control whether mounts in the file system
  249. ## namespace set up for docker will receive or propagate mounts
  250. ## and unmounts. Leave empty for system default
  251. # docker_mount_flags:
  252. ## A string of extra options to pass to the docker daemon.
  253. # docker_options: ""
  254. ## A list of plugins to install using 'docker plugin install --grant-all-permissions'
  255. ## Empty by default so no plugins will be installed.
  256. docker_plugins: []
  257. # Experimental kubeadm etcd deployment mode. Available only for new deployment
  258. etcd_kubeadm_enabled: false
  259. # Containerd options
  260. containerd_version: 1.4.6
  261. containerd_use_systemd_cgroup: true
  262. # Settings for containerized control plane (etcd/kubelet/secrets)
  263. # deployment type for legacy etcd mode
  264. etcd_deployment_type: docker
  265. cert_management: script
  266. # Make a copy of kubeconfig on the host that runs Ansible in {{ inventory_dir }}/artifacts
  267. kubeconfig_localhost: false
  268. # Download kubectl onto the host that runs Ansible in {{ bin_dir }}
  269. kubectl_localhost: false
  270. # Define credentials_dir here so it can be overridden
  271. credentials_dir: "{{ inventory_dir }}/credentials"
  272. # K8s image pull policy (imagePullPolicy)
  273. k8s_image_pull_policy: IfNotPresent
  274. # Kubernetes dashboard
  275. # RBAC required. see docs/getting-started.md for access details.
  276. dashboard_enabled: false
  277. # Addons which can be enabled
  278. helm_enabled: false
  279. krew_enabled: false
  280. registry_enabled: false
  281. metrics_server_enabled: false
  282. enable_network_policy: true
  283. local_path_provisioner_enabled: false
  284. local_volume_provisioner_enabled: false
  285. local_volume_provisioner_directory_mode: 0700
  286. cinder_csi_enabled: false
  287. aws_ebs_csi_enabled: false
  288. azure_csi_enabled: false
  289. gcp_pd_csi_enabled: false
  290. vsphere_csi_enabled: false
  291. persistent_volumes_enabled: false
  292. cephfs_provisioner_enabled: false
  293. rbd_provisioner_enabled: false
  294. ingress_nginx_enabled: false
  295. ingress_ambassador_enabled: false
  296. ingress_alb_enabled: false
  297. cert_manager_enabled: false
  298. expand_persistent_volumes: false
  299. metallb_enabled: false
  300. # containerd official CLI tool
  301. nerdctl_enabled: false
  302. ## When OpenStack is used, Cinder version can be explicitly specified if autodetection fails (Fixed in 1.9: https://github.com/kubernetes/kubernetes/issues/50461)
  303. # openstack_blockstorage_version: "v1/v2/auto (default)"
  304. openstack_blockstorage_ignore_volume_az: "{{ volume_cross_zone_attachment | default('false') }}"
  305. # set max volumes per node (cinder-csi), default not set
  306. # node_volume_attach_limit: 25
  307. # Cinder CSI topology, when false volumes can be cross-mounted between availability zones
  308. # cinder_topology: false
  309. # Set Cinder topology zones (can be multiple zones, default not set)
  310. # cinder_topology_zones:
  311. # - nova
  312. cinder_csi_ignore_volume_az: "{{ volume_cross_zone_attachment | default('false') }}"
  313. ## When OpenStack is used, if LBaaSv2 is available you can enable it with the following 2 variables.
  314. openstack_lbaas_enabled: false
  315. # openstack_lbaas_subnet_id: "Neutron subnet ID (not network ID) to create LBaaS VIP"
  316. ## To enable automatic floating ip provisioning, specify a subnet.
  317. # openstack_lbaas_floating_network_id: "Neutron network ID (not subnet ID) to get floating IP from, disabled by default"
  318. ## Override default LBaaS behavior
  319. # openstack_lbaas_use_octavia: False
  320. # openstack_lbaas_method: "ROUND_ROBIN"
  321. # openstack_lbaas_provider: "haproxy"
  322. openstack_lbaas_create_monitor: "yes"
  323. openstack_lbaas_monitor_delay: "1m"
  324. openstack_lbaas_monitor_timeout: "30s"
  325. openstack_lbaas_monitor_max_retries: "3"
  326. openstack_cacert: "{{ lookup('env','OS_CACERT') }}"
  327. # Default values for the external OpenStack Cloud Controller
  328. external_openstack_enable_ingress_hostname: false
  329. external_openstack_lbaas_create_monitor: false
  330. external_openstack_lbaas_monitor_delay: "1m"
  331. external_openstack_lbaas_monitor_timeout: "30s"
  332. external_openstack_lbaas_monitor_max_retries: "3"
  333. external_openstack_network_ipv6_disabled: false
  334. external_openstack_lbaas_use_octavia: false
  335. external_openstack_network_internal_networks: []
  336. external_openstack_network_public_networks: []
  337. ## List of authorization modes that must be configured for
  338. ## the k8s cluster. Only 'AlwaysAllow', 'AlwaysDeny', 'Node' and
  339. ## 'RBAC' modes are tested. Order is important.
  340. authorization_modes: ['Node', 'RBAC']
  341. rbac_enabled: "{{ 'RBAC' in authorization_modes }}"
  342. # When enabled, API bearer tokens (including service account tokens) can be used to authenticate to the kubelet's HTTPS endpoint
  343. kubelet_authentication_token_webhook: true
  344. # When enabled, access to the kubelet API requires authorization by delegation to the API server
  345. kubelet_authorization_mode_webhook: true
  346. # kubelet uses certificates for authenticating to the Kubernetes API
  347. # Automatically generate a new key and request a new certificate from the Kubernetes API as the current certificate approaches expiration
  348. kubelet_rotate_certificates: true
  349. # kubelet can also request a new server certificate from the Kubernetes API
  350. kubelet_rotate_server_certificates: false
  351. # If set to true, kubelet errors if any of kernel tunables is different than kubelet defaults
  352. kubelet_protect_kernel_defaults: true
  353. ## List of key=value pairs that describe feature gates for
  354. ## the k8s cluster.
  355. kube_feature_gates: []
  356. kubeadm_feature_gates: []
  357. # Local volume provisioner storage classes
  358. # Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
  359. # see https://github.com/ansible/ansible/issues/17324
  360. local_volume_provisioner_storage_classes: |
  361. {
  362. "{{ local_volume_provisioner_storage_class | default('local-storage') }}": {
  363. "host_dir": "{{ local_volume_provisioner_base_dir | default ('/mnt/disks') }}",
  364. "mount_dir": "{{ local_volume_provisioner_mount_dir | default('/mnt/disks') }}",
  365. "volume_mode": "Filesystem",
  366. "fs_type": "ext4"
  367. }
  368. }
  369. # weave's network password for encryption
  370. # if null then no network encryption
  371. # you can use --extra-vars to pass the password in command line
  372. weave_password: EnterPasswordHere
  373. ssl_ca_dirs: |-
  374. [
  375. {% if ansible_os_family in ['Flatcar Container Linux by Kinvolk'] -%}
  376. '/usr/share/ca-certificates',
  377. {% elif ansible_os_family == 'RedHat' -%}
  378. '/etc/pki/tls',
  379. '/etc/pki/ca-trust',
  380. {% elif ansible_os_family == 'Debian' -%}
  381. '/usr/share/ca-certificates',
  382. {% endif -%}
  383. ]
  384. # Vars for pointing to kubernetes api endpoints
  385. is_kube_master: "{{ inventory_hostname in groups['kube_control_plane'] }}"
  386. kube_apiserver_count: "{{ groups['kube_control_plane'] | length }}"
  387. kube_apiserver_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}"
  388. kube_apiserver_access_address: "{{ access_ip | default(kube_apiserver_address) }}"
  389. first_kube_master: "{{ hostvars[groups['kube_control_plane'][0]]['access_ip'] | default(hostvars[groups['kube_control_plane'][0]]['ip'] | default(fallback_ips[groups['kube_control_plane'][0]])) }}"
  390. loadbalancer_apiserver_localhost: "{{ loadbalancer_apiserver is not defined }}"
  391. loadbalancer_apiserver_type: "nginx"
  392. # applied if only external loadbalancer_apiserver is defined, otherwise ignored
  393. apiserver_loadbalancer_domain_name: "lb-apiserver.kubernetes.local"
  394. kube_apiserver_global_endpoint: |-
  395. {% if loadbalancer_apiserver is defined -%}
  396. https://{{ apiserver_loadbalancer_domain_name }}:{{ loadbalancer_apiserver.port|default(kube_apiserver_port) }}
  397. {%- elif use_localhost_as_kubeapi_loadbalancer|default(False)|bool -%}
  398. https://127.0.0.1:{{ kube_apiserver_port }}
  399. {%- else -%}
  400. https://{{ first_kube_master }}:{{ kube_apiserver_port }}
  401. {%- endif %}
  402. kube_apiserver_endpoint: |-
  403. {% if loadbalancer_apiserver is defined -%}
  404. https://{{ apiserver_loadbalancer_domain_name }}:{{ loadbalancer_apiserver.port|default(kube_apiserver_port) }}
  405. {%- elif not is_kube_master and loadbalancer_apiserver_localhost -%}
  406. https://localhost:{{ loadbalancer_apiserver_port|default(kube_apiserver_port) }}
  407. {%- elif is_kube_master -%}
  408. https://{{ kube_apiserver_bind_address | regex_replace('0\.0\.0\.0','127.0.0.1') }}:{{ kube_apiserver_port }}
  409. {%- else -%}
  410. https://{{ first_kube_master }}:{{ kube_apiserver_port }}
  411. {%- endif %}
  412. kube_apiserver_insecure_endpoint: >-
  413. http://{{ kube_apiserver_insecure_bind_address | regex_replace('0\.0\.0\.0','127.0.0.1') }}:{{ kube_apiserver_insecure_port }}
  414. kube_apiserver_client_cert: "{{ kube_cert_dir }}/ca.crt"
  415. kube_apiserver_client_key: "{{ kube_cert_dir }}/ca.key"
  416. # Set to true to deploy etcd-events cluster
  417. etcd_events_cluster_enabled: false
  418. # etcd group can be empty when kubeadm manages etcd
  419. etcd_hosts: "{{ groups['etcd'] | default(groups['kube_control_plane']) }}"
  420. # Vars for pointing to etcd endpoints
  421. is_etcd_master: "{{ inventory_hostname in groups['etcd'] }}"
  422. etcd_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}"
  423. etcd_access_address: "{{ access_ip | default(etcd_address) }}"
  424. etcd_events_access_address: "{{ access_ip | default(etcd_address) }}"
  425. etcd_peer_url: "https://{{ etcd_access_address }}:2380"
  426. etcd_client_url: "https://{{ etcd_access_address }}:2379"
  427. etcd_events_peer_url: "https://{{ etcd_events_access_address }}:2382"
  428. etcd_events_client_url: "https://{{ etcd_events_access_address }}:2381"
  429. etcd_access_addresses: |-
  430. {% for item in etcd_hosts -%}
  431. https://{{ hostvars[item]['etcd_access_address'] | default(hostvars[item]['ip'] | default(fallback_ips[item])) }}:2379{% if not loop.last %},{% endif %}
  432. {%- endfor %}
  433. etcd_events_access_addresses_list: |-
  434. [
  435. {% for item in etcd_hosts -%}
  436. 'https://{{ hostvars[item]['etcd_events_access_address'] | default(hostvars[item]['ip'] | default(fallback_ips[item])) }}:2381'{% if not loop.last %},{% endif %}
  437. {%- endfor %}
  438. ]
  439. etcd_events_access_addresses: "{{etcd_events_access_addresses_list | join(',')}}"
  440. etcd_events_access_addresses_semicolon: "{{etcd_events_access_addresses_list | join(';')}}"
  441. # user should set etcd_member_name in inventory/mycluster/hosts.ini
  442. etcd_member_name: |-
  443. {% for host in groups['etcd'] %}
  444. {% if inventory_hostname == host %}{{ hostvars[host].etcd_member_name | default("etcd" + loop.index|string) }}{% endif %}
  445. {% endfor %}
  446. etcd_peer_addresses: |-
  447. {% for item in groups['etcd'] -%}
  448. {{ hostvars[item].etcd_member_name | default("etcd" + loop.index|string) }}=https://{{ hostvars[item].etcd_access_address | default(hostvars[item].ip | default(fallback_ips[item])) }}:2380{% if not loop.last %},{% endif %}
  449. {%- endfor %}
  450. etcd_events_peer_addresses: |-
  451. {% for item in groups['etcd'] -%}
  452. {{ hostvars[item].etcd_member_name | default("etcd" + loop.index|string) }}-events=https://{{ hostvars[item].etcd_events_access_address | default(hostvars[item].ip | default(fallback_ips[item])) }}:2382{% if not loop.last %},{% endif %}
  453. {%- endfor %}
  454. podsecuritypolicy_enabled: false
  455. etcd_heartbeat_interval: "250"
  456. etcd_election_timeout: "5000"
  457. etcd_snapshot_count: "10000"
  458. certificates_key_size: 2048
  459. certificates_duration: 36500
  460. etcd_config_dir: /etc/ssl/etcd
  461. etcd_events_data_dir: "/var/lib/etcd-events"
  462. etcd_cert_dir: "{{ etcd_config_dir }}/ssl"
  463. typha_enabled: false
  464. _host_architecture_groups:
  465. x86_64: amd64
  466. aarch64: arm64
  467. armv7l: arm
  468. host_architecture: >-
  469. {%- if ansible_architecture in _host_architecture_groups -%}
  470. {{ _host_architecture_groups[ansible_architecture] }}
  471. {%- else -%}
  472. {{ ansible_architecture }}
  473. {%- endif -%}
  474. # Sets the eventRecordQPS parameter in kubelet-config.yaml. The default value is 5 (see types.go)
  475. # Setting it to 0 allows unlimited requests per second.
  476. kubelet_event_record_qps: 5
  477. proxy_env:
  478. http_proxy: "{{ http_proxy | default ('') }}"
  479. HTTP_PROXY: "{{ http_proxy | default ('') }}"
  480. https_proxy: "{{ https_proxy | default ('') }}"
  481. HTTPS_PROXY: "{{ https_proxy | default ('') }}"
  482. no_proxy: "{{ no_proxy | default ('') }}"
  483. NO_PROXY: "{{ no_proxy | default ('') }}"
  484. proxy_disable_env:
  485. ALL_PROXY: ''
  486. FTP_PROXY: ''
  487. HTTPS_PROXY: ''
  488. HTTP_PROXY: ''
  489. NO_PROXY: ''
  490. all_proxy: ''
  491. ftp_proxy: ''
  492. http_proxy: ''
  493. https_proxy: ''
  494. no_proxy: ''