Browse Source

Adding else in the inline if-expression (#7292)

Fix "AnsibleUndefinedVariable: the inline if-expression on line xx evaluated to false and no else section was defined."
pull/7308/head
FedericoHeichou 3 years ago
committed by GitHub
parent
commit
5616b08229
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions
  1. 12
      roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2

12
roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2

@ -88,8 +88,8 @@ dns:
imageTag: {{ coredns_image_tag }} imageTag: {{ coredns_image_tag }}
networking: networking:
dnsDomain: {{ dns_domain }} dnsDomain: {{ dns_domain }}
serviceSubnet: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks }}"
podSubnet: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks }}"
serviceSubnet: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}"
podSubnet: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}"
{% if kube_feature_gates %} {% if kube_feature_gates %}
featureGates: featureGates:
{% for feature in kube_feature_gates %} {% for feature in kube_feature_gates %}
@ -133,7 +133,7 @@ apiServer:
etcd-servers-overrides: "/events#{{ etcd_events_access_addresses_semicolon }}" etcd-servers-overrides: "/events#{{ etcd_events_access_addresses_semicolon }}"
{% endif %} {% endif %}
service-node-port-range: {{ kube_apiserver_node_port_range }} service-node-port-range: {{ kube_apiserver_node_port_range }}
service-cluster-ip-range: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks }}"
service-cluster-ip-range: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}"
kubelet-preferred-address-types: "{{ kubelet_preferred_address_types }}" kubelet-preferred-address-types: "{{ kubelet_preferred_address_types }}"
profiling: "{{ kube_profiling }}" profiling: "{{ kube_profiling }}"
request-timeout: "{{ kube_apiserver_request_timeout }}" request-timeout: "{{ kube_apiserver_request_timeout }}"
@ -269,8 +269,8 @@ controllerManager:
extraArgs: extraArgs:
node-monitor-grace-period: {{ kube_controller_node_monitor_grace_period }} node-monitor-grace-period: {{ kube_controller_node_monitor_grace_period }}
node-monitor-period: {{ kube_controller_node_monitor_period }} node-monitor-period: {{ kube_controller_node_monitor_period }}
cluster-cidr: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks }}"
service-cluster-ip-range: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks }}"
cluster-cidr: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}"
service-cluster-ip-range: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}"
{% if enable_dual_stack_networks %} {% if enable_dual_stack_networks %}
node-cidr-mask-size-ipv4: "{{ kube_network_node_prefix }}" node-cidr-mask-size-ipv4: "{{ kube_network_node_prefix }}"
node-cidr-mask-size-ipv6: "{{ kube_network_node_prefix_ipv6 }}" node-cidr-mask-size-ipv6: "{{ kube_network_node_prefix_ipv6 }}"
@ -363,7 +363,7 @@ clientConnection:
contentType: {{ kube_proxy_client_content_type }} contentType: {{ kube_proxy_client_content_type }}
kubeconfig: {{ kube_proxy_client_kubeconfig }} kubeconfig: {{ kube_proxy_client_kubeconfig }}
qps: {{ kube_proxy_client_qps }} qps: {{ kube_proxy_client_qps }}
clusterCIDR: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks }}"
clusterCIDR: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}"
configSyncPeriod: {{ kube_proxy_config_sync_period }} configSyncPeriod: {{ kube_proxy_config_sync_period }}
conntrack: conntrack:
maxPerCore: {{ kube_proxy_conntrack_max_per_core }} maxPerCore: {{ kube_proxy_conntrack_max_per_core }}

Loading…
Cancel
Save