mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 19:58:07 +03:00
Fix ansible syntax to avoid ansible deprecation warnings (#3512)
* failed * version_compare * succeeded * skipped * success * version_compare becomes version since ansible 2.5 * ansible minimal version updated in doc and spec * last version_compare
This commit is contained in:
committed by
k8s-ci-robot
parent
bfd4ccbeaa
commit
7bec169d58
@@ -11,10 +11,10 @@ metadata:
|
||||
kubespray.apiserver-cert/serial: "{{ apiserver_cert_serial }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
{% if kube_version | version_compare('v1.6', '>=') %}
|
||||
{% if kube_version is version('v1.6', '>=') %}
|
||||
dnsPolicy: ClusterFirst
|
||||
{% endif %}
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-node-critical
|
||||
{% endif %}
|
||||
containers:
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
{% if etcd_events_cluster_enabled %}
|
||||
- --etcd-servers-overrides=/events#{{ etcd_events_access_addresses_semicolon }}
|
||||
{% endif %}
|
||||
{% if kube_version | version_compare('v1.9', '<') %}
|
||||
{% if kube_version is version('v1.9', '<') %}
|
||||
- --etcd-quorum-read=true
|
||||
{% endif %}
|
||||
- --etcd-cafile={{ etcd_cert_dir }}/ca.pem
|
||||
@@ -54,10 +54,10 @@ spec:
|
||||
{% endif %}
|
||||
- --bind-address={{ kube_apiserver_bind_address }}
|
||||
- --apiserver-count={{ kube_apiserver_count }}
|
||||
{% if kube_version | version_compare('v1.9', '>=') %}
|
||||
{% if kube_version is version('v1.9', '>=') %}
|
||||
- --endpoint-reconciler-type=lease
|
||||
{% endif %}
|
||||
{% if kube_version | version_compare('v1.10', '<') %}
|
||||
{% if kube_version is version('v1.10', '<') %}
|
||||
- --admission-control={{ kube_apiserver_admission_control | join(',') }}
|
||||
{% else %}
|
||||
{% if kube_apiserver_enable_admission_plugins|length > 0 %}
|
||||
@@ -114,7 +114,7 @@ spec:
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if enable_network_policy %}
|
||||
{% if kube_version | version_compare('v1.8', '<') %}
|
||||
{% if kube_version is version('v1.8', '<') %}
|
||||
- --runtime-config=extensions/v1beta1/networkpolicies=true
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -124,7 +124,7 @@ spec:
|
||||
- --cloud-provider={{ cloud_provider }}
|
||||
- --cloud-config={{ kube_config_dir }}/cloud_config
|
||||
{% endif %}
|
||||
{% if kube_api_anonymous_auth is defined and kube_version | version_compare('v1.5', '>=') %}
|
||||
{% if kube_api_anonymous_auth is defined and kube_version is version('v1.5', '>=') %}
|
||||
- --anonymous-auth={{ kube_api_anonymous_auth }}
|
||||
{% endif %}
|
||||
{% if authorization_modes %}
|
||||
@@ -136,7 +136,7 @@ spec:
|
||||
{% if kube_feature_gates %}
|
||||
- --feature-gates={{ kube_feature_gates|join(',') }}
|
||||
{% endif %}
|
||||
{% if kube_version | version_compare('v1.9', '>=') %}
|
||||
{% if kube_version is version('v1.9', '>=') %}
|
||||
- --requestheader-client-ca-file={{ kube_cert_dir }}/{{ kube_front_proxy_ca }}
|
||||
{# FIXME(mattymo): Vault certs do not work with front-proxy-client #}
|
||||
{% if cert_management == "vault" %}
|
||||
|
||||
@@ -10,10 +10,10 @@ metadata:
|
||||
kubespray.controller-manager-cert/serial: "{{ controller_manager_cert_serial }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
{% if kube_version | version_compare('v1.6', '>=') %}
|
||||
{% if kube_version is version('v1.6', '>=') %}
|
||||
dnsPolicy: ClusterFirst
|
||||
{% endif %}
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-node-critical
|
||||
{% endif %}
|
||||
containers:
|
||||
|
||||
@@ -9,10 +9,10 @@ metadata:
|
||||
kubespray.scheduler-cert/serial: "{{ scheduler_cert_serial }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
{% if kube_version | version_compare('v1.6', '>=') %}
|
||||
{% if kube_version is version('v1.6', '>=') %}
|
||||
dnsPolicy: ClusterFirst
|
||||
{% endif %}
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-node-critical
|
||||
{% endif %}
|
||||
containers:
|
||||
|
||||
Reference in New Issue
Block a user