SovereignCloudStack / cluster-stacks

Definition of Cluster Stacks based on the ClusterAPI ClusterClass feature
https://scs.community/
Apache License 2.0
7 stars 6 forks source link

Consolidate Clusterstacks `wooctavia` and `alpha` to `scs` | Discussion about LoadBalancer flags #80

Closed mxmxchere closed 3 months ago

mxmxchere commented 3 months ago

Currently we have two working cluster-stacks with a total of four class-addon-image-triplets (or however we want to call the folder beneath the kubernetes version)(will refer to as cia in the following sentences). I will try to summarize the current specifics of each cia below and make a proposal to consolidate them:

wooctavia/1-27:

yawol_flavor_id
yawol_image_id
network_id
virtual_ip
public_ip

alpha/1-27+28:

dns_nameservers
node_cidr
openstack_loadbalancer_apiserver
openstack_loadbalancer_apiserver_provider

alpha/1-29:

dns_nameservers
node_cidr
openstack_loadbalancer_apiserver
openstack_loadbalancer_apiserver_provider

image version

the image version thing is easy to merge, favouring the alpha-1-29-approach.

LoadBalancer

Regarding the LoadBalancer there are some things that need to be smoothed a bit. Currently we have the following flags:

openstack_loadbalancer_apiserver
openstack_loadbalancer_apiserver_provider
yawol_flavor_id
yawol_image_id
network_id
apiserver_virtual_ip
apiserver_public_ip

We have to communicate to the user that we have two different areas for LoadBalancer settings:

I propose to create two variables, with the following possible values

apiserver_loadbalancer: none, octavia-amphora, octavia-ovn, kube-vip workload_loadbalancer: none, octavia-amphora, octavia-ovn, yawol

Next, i propose to I propose to remove the variables openstack_loadbalancer_apiserver and openstack_loadbalancer_apiserver_provider

that would result in the following descriptions:

apiserver_loadbalancer: Possible values: none, octavia, ovn, kube-vip. If selecting "kube-vip you also have to provide kube_vip_network_id kube_vip_apiserver_virtual_ip ube_vip_apiserver_public_ip (insert openstack instructions to create networks and IPs here)"
workload_loadbalancer: Possible values: none, octavia, yawol (doesn't support appcreds, only user/password)
kube_vip_network_id: the network_id to be used for the kube-vip loadbalancer for the kube-apiserver. Has no effect when apiserver_loadbalancer is not set to kube-vip.
kube_vip_apiserver_virtual_ip the virtual IP to be used for the kube-vip loadbalancer for the kube-apiserver. Has no effect when apiserver_loadbalancer is not set to kube-vip.
kube_vip_apiserver_public_ip: the Public IP to be used for the kube-vip loadbalancer for the kube-apiserver. Has no effect when apiserver_loadbalancer is not set to kube-vip.
yawol_flavor_id: yawol flavor to use for yawol loadbalancer. Has no effect when workload_loadbalancer is not set to yawol
yawol_image_id: yawol image to use for yawol loadbalancer. Has no effect when workload_loadbalancer is not set to yawol
dns_nameservers: no effect when kubevip is used for apiserver_loadbalancer
node_cidr: no effect when kubevip is used for apiserver_loadbalancer

@chess-knight i need some help here, how do we deal with dns-nameservers and node_cidr? Ignore when apiserver_loadbalancer ist set to kube-vip?

Notes:

Todo List

mxmxchere commented 3 months ago

oops that suddenly was a lot of text😅, but i hope this will shrink code-amount and improve maintainability and will make it easier to understand once we are through🤞

chess-knight commented 3 months ago

AFAIK there is currently no use_yawol variable, it is just a detail.

I am not sure about apiserver_loadbalancer: none, octavia, ovn, kube-vip because ovn is octavia provider, as well as amphora. And in case of none we will probably need to tell that only one CP is supported.

dns_nameservers and node_cidr are not used in wooctavia, so yeah it can be ignored

paulphys commented 3 months ago

How about we do apiserver_loadbalancer: none, octavia-amphora, octavia-ovn, kube-vip ?

mxmxchere commented 3 months ago

yes i made up use_yawol and thought it was upstream, but it was not :)

chess-knight commented 3 months ago

How about we do apiserver_loadbalancer: none, octavia-amphora, octavia-ovn, kube-vip ?

It looks better, and what about workload_loadbalancer? In KaaSv1 AFAIK we support ovn.