-
Notifications
You must be signed in to change notification settings - Fork 67
refactor config structure for more flexibility during installation modes
#1188
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
base: main
Are you sure you want to change the base?
Conversation
89f5368 to
e4cc56a
Compare
| install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. | ||
| $(KUSTOMIZE) build config/crd | kubectl create -f - | ||
|
|
||
| .PHONY: uninstall | ||
| uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. | ||
| $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think this is really used since we need to tweak the dev environment to not deploy the webhook locally. I will take a general look to improve devx soon.
e4cc56a to
050f7df
Compare
| os.Exit(1) | ||
| } | ||
| } | ||
| } else if isControllerEnabled(standaloneController) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new flag value --enable-controller=standalone allows us to run only controllers for standalone mode. If not, combining cluster-api core controller + standalone k0smotron is not possible (weird combination but someone might run CAPI without k0smotron provider and k0smotron in standalone mode)
fac787b to
eb5134d
Compare
0363d1c to
053ed25
Compare
053ed25 to
f3edb47
Compare
f248de0 to
9a4d0b5
Compare
|
@makhov this is ready for another round 😁 |
9b7096f to
adf2403
Compare
| args: | ||
| - "--health-probe-bind-address=:8081" | ||
| - "--metrics-bind-address=127.0.0.1:8080" | ||
| - "--leader-elect" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current state of the patch file is:
- "--health-probe-bind-address=:8081"
- "--diagnostics-address=127.0.0.1:8080"
- "--leader-elect"
- "--enable-controller=bootstrap"
- --feature-gates=${K0SMOTRON_FEATURE_GATES:=""}
And why we switching from patches to full files for controllers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the same what we currently use for the make *-component.yaml targets where we use the manager declaration (by the way I removed manager config duplication and use the same for all in the last changes) and then when we call kustomize build where we use the patch file in every component with the proper enable-controller value
| args: | ||
| - "--health-probe-bind-address=:8081" | ||
| - "--metrics-bind-address=127.0.0.1:8080" | ||
| - "--leader-elect" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this again will start full set of controllers, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every component has the proper patch file for the manager setting the expected enable-controller flag
adf2403 to
5d176c6
Compare
526ba85 to
28384b5
Compare
Signed-off-by: apedriza <[email protected]>
28384b5 to
6a686f6
Compare
fix #1179
Changes
Three ways to install k0smotron:
*-components.yamlonly includes resources related to it. Some RBAC roles have been added for each provider because the "bug" was masked when including all providers' RBACs per*-components.yamlNow that standalone mode can be installed only using required manifests, if CAPI core or other CAPI providers were installed before installing standalone, the k0smotron manager failed because it detects there are CAPI resources + k0smotron CAPI CRDs were not installed with the new standalone manifest. Added a new flag to enable only the standalone controller to have more control over which controller needs to be set up.