[calico] clean up workarounds for older versions
This commit is contained in:
parent
9efe145688
commit
2de5c4821c
7 changed files with 5 additions and 11 deletions
|
@ -40,7 +40,6 @@ spec:
|
|||
requests:
|
||||
cpu: {{ calico_policy_controller_cpu_requests }}
|
||||
memory: {{ calico_policy_controller_memory_requests }}
|
||||
{% if calico_version is version('v3.19.0', '>=') %}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
@ -49,7 +48,6 @@ spec:
|
|||
periodSeconds: 10
|
||||
initialDelaySeconds: 10
|
||||
failureThreshold: 6
|
||||
{% endif %}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -4,13 +4,13 @@ dependencies:
|
|||
when:
|
||||
- kube_network_plugin == 'calico'
|
||||
- enable_network_policy
|
||||
- calico_datastore != "kdd" or calico_policy_version is version('v3.6.0', '>=')
|
||||
- calico_datastore != "kdd"
|
||||
tags:
|
||||
- policy-controller
|
||||
|
||||
- role: policy_controller/calico
|
||||
when:
|
||||
- kube_network_plugin == 'canal'
|
||||
- calico_datastore != "kdd" or calico_policy_version is version('v3.6.0', '>=')
|
||||
- calico_datastore != "kdd"
|
||||
tags:
|
||||
- policy-controller
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
kube_proxy_deployed: "{{ 'addon/kube-proxy' not in kubeadm_init_phases_skip }}"
|
||||
|
||||
# The lowest version allowed to upgrade from (same as calico_version in the previous branch)
|
||||
calico_min_version_required: "v3.17.5"
|
||||
calico_min_version_required: "v3.19.4"
|
||||
|
||||
containerd_min_version_required: "1.3.7"
|
||||
|
|
|
@ -13,7 +13,6 @@ rules:
|
|||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
{% if calico_version is version("v3.20.0", ">=") %}
|
||||
# EndpointSlices are used for Service-based network policy rule
|
||||
# enforcement.
|
||||
- apiGroups: ["discovery.k8s.io"]
|
||||
|
@ -22,7 +21,6 @@ rules:
|
|||
verbs:
|
||||
- watch
|
||||
- list
|
||||
{% endif %}
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- endpoints
|
||||
|
|
|
@ -310,14 +310,12 @@ spec:
|
|||
requests:
|
||||
cpu: {{ calico_node_cpu_requests }}
|
||||
memory: {{ calico_node_memory_requests }}
|
||||
{% if calico_version is version('v3.21.0', '>=') %}
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- /bin/calico-node
|
||||
- -shutdown
|
||||
{% endif %}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -3,4 +3,4 @@ ETCD_ENDPOINTS={{ etcd_access_addresses }} \
|
|||
ETCD_CA_CERT_FILE={{ calico_cert_dir }}/ca_cert.crt \
|
||||
ETCD_CERT_FILE={{ calico_cert_dir }}/cert.crt \
|
||||
ETCD_KEY_FILE={{ calico_cert_dir }}/key.pem \
|
||||
{{ bin_dir }}/calicoctl {% if calico_version is version('v3.20.0', '>=') %}--allow-version-mismatch{% endif %} "$@"
|
||||
{{ bin_dir }}/calicoctl --allow-version-mismatch "$@"
|
||||
|
|
|
@ -5,4 +5,4 @@ KUBECONFIG=/etc/kubernetes/admin.conf \
|
|||
{% else %}
|
||||
KUBECONFIG=/etc/cni/net.d/calico-kubeconfig \
|
||||
{% endif %}
|
||||
{{ bin_dir }}/calicoctl {% if calico_version is version('v3.20.0', '>=') %}--allow-version-mismatch{% endif %} "$@"
|
||||
{{ bin_dir }}/calicoctl --allow-version-mismatch "$@"
|
||||
|
|
Loading…
Reference in a new issue