Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More customisation / overrides for kube-vip #221

Open
daanh432 opened this issue Feb 1, 2023 · 4 comments
Open

More customisation / overrides for kube-vip #221

daanh432 opened this issue Feb 1, 2023 · 4 comments

Comments

@daanh432
Copy link

daanh432 commented Feb 1, 2023

Currently it's not possible to have the announced apiserver_endpoint and actual kube-vip endpoint to differ.

With special routing and site-to-site tunnels it would be nice to have the option to override this within the configuration of this ansible-playbook.

Suggested Changes

With a simple change to the vip.yaml.j2 template overriding this would be possible and it wouldn't be an required property or breaking change to existing workflows. I can open a pull request with this change but I'm not quite familiar with the automated test tooling used just yet.

See an example for the required changes to support complex routing configurations below or in this example PR.

@@ -31,9 +31,9 @@ spec:
         - name: port
           value: "6443"
         - name: vip_interface
-          value: {{ flannel_iface }}
+          value: {{ kube_vip_iface | default(flannel_iface) }}
         - name: vip_cidr
-          value: "{{ apiserver_endpoint | ansible.utils.ipsubnet | ansible.utils.ipaddr('prefix') }}"
+          value: "{{ kube_vip_endpoint | default(apiserver_endpoint) | ansible.utils.ipsubnet | ansible.utils.ipaddr('prefix') }}"
         - name: cp_enable
           value: "true"
         - name: cp_namespace
@@ -51,7 +51,7 @@ spec:
         - name: vip_retryperiod
           value: "2"
         - name: address
-          value: {{ apiserver_endpoint }}
+          value: {{ kube_vip_endpoint | default(apiserver_endpoint) }}
         image: ghcr.io/kube-vip/kube-vip:{{ kube_vip_tag_version }}
         imagePullPolicy: Always
         name: kube-vip
# interface which will be used for flannel
flannel_iface: "eth0"

# (optional) kube_vip_iface is an optional override for the network interface kube-vip will ARP announce
kube_vip_iface: "eth0"

# apiserver_endpoint is virtual ip-address which will be configured on each master
apiserver_endpoint: "10.66.10.1"

# (optional) kube_vip_endpoint is an optional override for the internal listening endpoint for the kube-vip interface
kube_vip_endpoint: "10.66.1.5"
@timothystewart6
Copy link
Contributor

This was closed by #238 wasn't it @sleiner ?

@sleiner
Copy link
Contributor

sleiner commented Mar 14, 2023

@timothystewart6 Part of it at least (the kube-vip interface can now be set independently of the flannel one)

@bornav
Copy link

bornav commented Mar 28, 2024

Following up on the merge of #238, Is there something holding up the implementation of the example?
Having known we could already specify kube_vip_iface in the vars file would have been quite useful

@timothystewart6
Copy link
Contributor

PRs are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants