feat(kube-vip): update template according to new version (#183)

This commit is contained in:
Thomas Perronin authored and GitHub committed 2022-01-06 15:12:53 -05:00
1 parent e57ef3e15b
commit e2422a4fa4
3 files changed
+18 -39

No files matched your search

@@ -29,10 +29,11 @@ k3s_registration_address: "{{ kubevip_address }}"
k3s_server_manifests_urls:
- url: https://docs.projectcalico.org/archive/v3.21/manifests/tigera-operator.yaml
filename: tigera-operator.yaml
- url: https://kube-vip.io/manifests/rbac.yaml
filename: kube-vip-rbac.yaml
# (list) A flat list of templates to deploy on the primary control plane
# /var/lib/rancher/k3s/server/manifests
k3s_server_manifests_templates:
- "calico-installation.yaml.j2"
- "kube-vip-rbac.yaml.j2"
- "kube-vip-daemonset.yaml.j2"
@@ -18,6 +18,16 @@ spec:
app.kubernetes.io/instance: kube-vip
app.kubernetes.io/name: kube-vip
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: Exists
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
containers:
- name: kube-vip
image: ghcr.io/kube-vip/kube-vip:v0.4.1
@@ -39,7 +49,9 @@ spec:
value: kube-system
- name: svc_enable
value: "false"
- name: vip_address
- name: vip_ddns
value: "false"
- name: address
value: "{{ k3s_registration_address }}"
securityContext:
capabilities:
@@ -51,10 +63,9 @@ spec:
- kubernetes
ip: 127.0.0.1
hostNetwork: true
nodeSelector:
node-role.kubernetes.io/master: "true"
serviceAccountName: kube-vip
tolerations:
- key: node-role.kubernetes.io/master
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
effect: NoSchedule
@@ -1,33 +0,0 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-vip
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
name: system:kube-vip-role
rules:
- apiGroups: [""]
resources: ["services", "services/status", "nodes"]
verbs: ["list", "get", "watch", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["list", "get", "watch", "update", "create"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:kube-vip-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:kube-vip-role
subjects:
- kind: ServiceAccount
name: kube-vip
namespace: kube-system