Enable dynamic changes in the router for non-kube environments #2356
Enable dynamic changes in the router for non-kube environments #2356nluaces merged 37 commits intoskupperproject:mainfrom
Conversation
fgiorgetti
left a comment
There was a problem hiding this comment.
My impression so far is that it is on the right track.
Really nice work @nluaces!
A few other comments I have so far:
- The site name in the router config is changing (we need to check if this will cause issues to the console or vanflow metrics)
- As I already added, the system controller update and the update of the router container for the controlled namespaces is something we need to figure out still
0eb07fd to
d4bc626
Compare
I checked that the name of the site was not changing when the controller just refresh (for example, when a listener has been created); do you have any examples for me to understand this better? |
9c2e556 to
d63b383
Compare
… given that it is going to be set up by the CLI with the install command. remove system adaptor callback in case the reload type is manual
…unning on a container or not
fgiorgetti
left a comment
There was a problem hiding this comment.
The system stop command should use a similar validation done to the system reload command, which performs the following check:
if nsPlatform != currentPlatform {
return nil, fmt.Errorf("existing namespace uses %q platform and it cannot change to %q", nsPlatform, currentPlatform)
}At present if someone runs system stop --platform podman but the actual platform is docker, the container is being left behind.
fgiorgetti
left a comment
There was a problem hiding this comment.
Looks great now! Thank you very much, @nluaces !
Tested against a matrix of:
- Platforms: podman, docker
- Users: root, regular-user
- Reload type: auto, manual
- Method: CLI, Ansible (skupper.v2 collection)
Implements #2337
Branch based on #2334, the proper commits that implement this issue are bb8ab35 and the following.
flowchart TD id1([new listener resource is created])-->|triggers|InputResourceHandler-->Q{site exists?} Q -->|Yes| A[Refresh Router Config] Q -->|No| B[Bootstrap]The InputResourceHandler was modified to not bootstrap in case a site is already created in the namespace.
EDIT: A new flag called
--reload-typeis available in theskupper system installcommand. It has priority over the env. variable.