mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-20 15:27:56 -02:30
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
@@ -36,7 +36,7 @@
|
||||
when:
|
||||
- dns_mode in ['kubedns', 'dnsmasq_kubedns']
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
- rbac_enabled and kubedns_version|version_compare("1.11.0", "<", strict=True)
|
||||
- rbac_enabled and kubedns_version is version("1.11.0", "<", strict=True)
|
||||
tags:
|
||||
- dnsmasq
|
||||
- kubedns
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
when:
|
||||
- dns_mode != 'none'
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
- not item|skipped
|
||||
- not item is skipped
|
||||
register: resource_result
|
||||
until: resource_result|succeeded
|
||||
until: resource_result is succeeded
|
||||
retries: 4
|
||||
delay: 5
|
||||
tags:
|
||||
|
||||
@@ -68,4 +68,4 @@
|
||||
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||
state: "latest"
|
||||
with_items: "{{ manifests.results }}"
|
||||
when: inventory_hostname == groups['kube-master'][0] and not item|skipped
|
||||
when: inventory_hostname == groups['kube-master'][0] and not item is skipped
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
spec:
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-cluster-critical
|
||||
{% endif %}
|
||||
serviceAccountName: coredns
|
||||
|
||||
@@ -140,7 +140,7 @@ spec:
|
||||
labels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
spec:
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-cluster-critical
|
||||
{% endif %}
|
||||
containers:
|
||||
|
||||
@@ -28,7 +28,7 @@ spec:
|
||||
labels:
|
||||
k8s-app: kubedns-autoscaler
|
||||
spec:
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-cluster-critical
|
||||
{% endif %}
|
||||
# When having win nodes in cluster without this patch, this pod cloud try to be created in windows
|
||||
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
spec:
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: system-cluster-critical
|
||||
{% endif %}
|
||||
# When having win nodes in cluster without this patch, this pod cloud try to be created in windows
|
||||
|
||||
@@ -12,7 +12,7 @@ spec:
|
||||
labels:
|
||||
app: netchecker-agent
|
||||
spec:
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
||||
{% endif %}
|
||||
tolerations:
|
||||
|
||||
@@ -16,10 +16,10 @@ spec:
|
||||
# When having win nodes in cluster without this patch, this pod cloud try to be created in windows
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: linux
|
||||
{% if kube_version | version_compare('v1.6', '>=') %}
|
||||
{% if kube_version is version('v1.6', '>=') %}
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
{% endif %}
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
||||
{% endif %}
|
||||
tolerations:
|
||||
|
||||
@@ -11,7 +11,7 @@ spec:
|
||||
app: netchecker-server
|
||||
namespace: {{ netcheck_namespace }}
|
||||
spec:
|
||||
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
||||
{% if kube_version is version('v1.11.1', '>=') %}
|
||||
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-cluster-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
||||
{% endif %}
|
||||
containers:
|
||||
|
||||
Reference in New Issue
Block a user