mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-19 20:20:10 -03:30
kube-vip: Fix template, drop all capabilities and use kube_vip_version (#12835)
* Drop capabilities in kube-vip and use kube_vip_version * Preserve trailing newline for kube_vip_cidr env var
This commit is contained in:
@@ -61,8 +61,6 @@ eviction_hard_control_plane: {}
|
||||
kubelet_status_update_frequency: 10s
|
||||
|
||||
# kube-vip
|
||||
kube_vip_version: 0.8.0
|
||||
|
||||
kube_vip_arp_enabled: false
|
||||
kube_vip_interface:
|
||||
kube_vip_services_interface:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Inspired by https://github.com/kube-vip/kube-vip/blob/v0.8.0/pkg/kubevip/config_generator.go#L103
|
||||
# Inspired by https://github.com/kube-vip/kube-vip/blob/v1.0.3/pkg/kubevip/config_generator.go#L103
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
value: {{ kube_vip_services_interface | string | to_json }}
|
||||
{% endif %}
|
||||
{% if kube_vip_cidr %}
|
||||
- name: vip_{% if kube_vip_image_tag is version('v0.9.0', '>=') %}subnet{% else %}cidr{% endif %}
|
||||
- name: vip_{{ "subnet" if kube_vip_version is version('0.9.0', '>=') else "cidr" }}
|
||||
value: {{ kube_vip_cidr | string | to_json }}
|
||||
{% endif %}
|
||||
{% if kube_vip_dns_mode %}
|
||||
@@ -113,6 +113,8 @@ spec:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
drop:
|
||||
- ALL
|
||||
{% endif %}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/admin.conf
|
||||
|
||||
Reference in New Issue
Block a user