-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add machine names as etcd name #778
Add machine names as etcd name #778
Conversation
95c6840
to
d2bdb80
Compare
return ctrl.Result{}, fmt.Errorf("error retrieving storage.etcd: %w", err) | ||
|
||
} | ||
if found && storage != nil { |
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.
We probably need to set it even if it's not found in the original config
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.
yes, I added a check to set it always if kind storage is not set
95d6293
to
b631780
Compare
b631780
to
a47ee0c
Compare
|
a47ee0c
to
195753f
Compare
internal/controller/bootstrap/controlplane_bootstrap_controller.go
Outdated
Show resolved
Hide resolved
internal/controller/bootstrap/controlplane_bootstrap_controller.go
Outdated
Show resolved
Hide resolved
@@ -155,6 +156,25 @@ func (c *ControlPlaneController) Reconcile(ctx context.Context, req ctrl.Request | |||
) | |||
|
|||
if config.Spec.K0s != nil { |
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.
A few thoughts:
- Should we set the field even if user didn't provide us any custom k0s config?
- At the end of this if statement, we call
kutil.ReconcileDynamicConfig
, but we probably need to remove the etcd node name from the DynamicConfig. - Should the most of the code of this statement be in the control plane controller instead of bootstrap controller?
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.
- Should we set the field even if user didn't provide us any custom k0s config?
Agree. It is already used etcd node name as default value if kine is not set so I think is safe assume that. Added
- At the end of this if statement, we call
kutil.ReconcileDynamicConfig
, but we probably need to remove the etcd node name from the DynamicConfig.
Im not sure if I follow your point. It is not removed spec.storage
in kutil.ReconcileDynamicConfig
from the DynamicConfig?
- Should the most of the code of this statement be in the control plane controller instead of bootstrap controller?
If you mean to move most of the logic to the place where we create bootstrapv1.K0sControllerConfig
Im ok with that. But I think that change should be done carefully, Im not sure exactly what it might imply rn. Maybe addressing that refactoring in another PR makes more sense, wdyt?
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.
Im not sure if I follow your point. It is not removed spec.storage in kutil.ReconcileDynamicConfig from the DynamicConfig?
Sorry, missed it. Yeah, that's good then.
Maybe addressing that refactoring in another PR makes more sense, wdyt?
Sorry, I was not clear enough: of course, it's better to do it in a separate PR.
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.
Ive created an issue for that refactor #798
195753f
to
110c116
Compare
110c116
to
e7e447e
Compare
Signed-off-by: Adrian Pedriza <adripedriza@gmail.com>
e7e447e
to
10f2faa
Compare
Partially fix #768