[calico] clean up workarounds for older versions

This commit is contained in:
Calin Cristian Andrei
2022-06-11 18:57:09 +03:00
committed by Kubernetes Prow Robot
parent 9efe145688
commit 2de5c4821c
7 changed files with 5 additions and 11 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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 "$@"

View File

@@ -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 "$@"