-
Notifications
You must be signed in to change notification settings - Fork 370
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
config refactoring: use runtime config #1409
Conversation
58c7d0c
to
9f7cb64
Compare
f6ca845
to
86ea756
Compare
86ea756
to
8c38b7e
Compare
8c38b7e
to
59ccf01
Compare
1eac183
to
b2b0b51
Compare
a706a30
to
211db00
Compare
4930e80
to
12bd629
Compare
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.
Left some questions and general comments. The direction is good in general.
I'm slightly worried that dropping the -config
option in many commands will break backwards compatibility e.g. with k0sctl. Maybe rebase with the #1450 to verify this.
12bd629
to
d0d440c
Compare
You could leave a nonfunctional hidden |
This commit removes the config flag to comply with the changes in k0sproject/k0s#1409 Signed-off-by: Karen Almog <[email protected]>
This commit removes the config flag to comply with the changes in k0sproject/k0s#1409 Signed-off-by: Karen Almog <[email protected]>
k0sctl requires a very minor change for token creation. after that, |
40e809f
to
9929989
Compare
This commit removes the config flag to comply with the changes in k0sproject/k0s#1409 Signed-off-by: Karen Almog <[email protected]>
Waiting for next k0sctl that includes k0sproject/k0sctl#303 to run the |
* Remove --config flag from token command This commit removes the config flag to comply with the changes in k0sproject/k0s#1409 Signed-off-by: Karen Almog <[email protected]> * Light touch-up * Typo Co-authored-by: Kimmo Lehto <[email protected]>
aaa5028
to
9be3ace
Compare
Signed-off-by: Karen Almog <[email protected]>
Signed-off-by: Karen Almog <[email protected]>
Signed-off-by: Karen Almog <[email protected]>
This commit: - Removes the default value in cobra config flag - Adds a logic to set the default file under the config package Signed-off-by: Karen Almog <[email protected]>
9be3ace
to
4b1735e
Compare
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.
It looks ok to me but it's fairly big and touches everything so I think the best would be to get it in as soon as possible before a release that includes it so that there is time to find any problems.
Signed-off-by: Karen Almog [email protected]
Issue
Fixes #1202 #1261
What this PR Includes
This PR refactors the entire handling of k0s config. Among other changes it:
--config
as a global flag to all commands--config
flag only on thek0s controller
andk0s reset
commands (note on the reset command below)./etc/k0s/k0s.yaml
/run/k0s/k0s.yaml
. This runtime config file is removed when the controller is stopped.Note on k0s reset:
Since the runtime config only exists while the controller is up, k0s reset (that can only be performed while the controller is down) needs to still retail the
--config
flag. A workaround to that would be to use the global location/etc/k0s/k0s.yaml
as a source of configuration.To Do: