-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
k9s/config.yaml configuration file is overwritten on launch #2421
Comments
I have the same problem. I want to keep a common configuration for all clusters in |
@KevinGimbel Thank you for reporting this Kevin! |
You can still have a skin for all clusters by adding a key |
@fxbtr which config.yaml do you mean? @derailed I just realised I made a mistake: I added a config to I didn't see any issues in the logs tho, it could be helpful to log wrong configurations or unexpected values. |
as a workaround for now (on OSx) following adjustment helped me keeping my favorites: this file apparently is taken as the default for overriding the XDG config file. also put the readOnly: true and lockFavorites: true in the above mentioned file |
Hi all. I noticed the same behavior on Ubuntu. I edit the .config/k9s/config.yaml file and when I start up k9s these changes got ignored. When I close k9s and open again the config file all my changes are not there and the file reverted to defaults. |
Same behavior on mac OS, it started happening in |
@KevinGimbel @calmacroi @BrunoKrugel Thank you for reporting this! |
@derailed i only tried to keep my favorite namespaces, also by adding the reduced config file in the clusters subpath of the XDG_CONFIG as the new config way for cluster specfic config (./cluster/clustername/context-name/config.yaml) |
@derailed I did the following
|
@derailed could it be that k9s checks if the config file is a "new one" and if it doesn't match replaces it with the default? Because by setting the wrong key |
Very kind! Thank you all for adding details here!! Hoping the next drop will fix these issues... Crossing fingers AND toes!! |
Why are the keys different? I would expect both to be the same, so either |
I would like to add that the bug also strips any comments from the config file. |
Please give v0.31.0 a rinse and see if we're happier. Tx! |
With v0.31.1 i get a go error:
Full log
|
Already tracked in #2442
config.yaml
|
@derailed : so still the same behaviour for me. i sum up (valid for OSx): having in my XDG_CONFIG dir:
in the Application Support dir: after starting k9s the first time in v0.31.1 a folder in the Application Support directory gets created containing:
and the favorites (and likely all other settings) are taken from this file instead of the created config.yaml in XDG_HOME/cluster/SC@MTF/SC@MTF/ editing the one in Application Support (setting namespace/active: development) is resetted whenever i start k9s to namepsace/active: default. |
The same thing in Ubuntu 22. After installing of new version of k9s via webi, new config.yaml has been created. |
@calmacroi Thanks for the details! Can you share the output of |
I observe a similar behaviour as @calmacroi described with version 0.31.2 on Mac OS 14.2.1.
starting up it loads. the defaults and goes into pods in default namespace.
If I change in k9s to any other namespace, the active value in the cluster config gets updated to that value. But on starting k9s again, it goes back to default namespace and overrides the active config in the cluster/config.yaml to default. Changing the config manually results in the same behaviour. I first noticed this behaviour when switching from 0.30.8 to 0.31.0, I have tried it with 0.31.1 aswell and all 3 versions show the same behaviour. Here is the debug log of the two startups, first without a cluster config and changing the namespace then closing k9s, starting it again and being back in default. I changed the path to shorten the lines and keep my username private.
If relevant, here is my k9s info:
Let me know, if you have any further questions. |
@1nval1d Thank you for the great details! That said... What you've reported is indeed a bug ;( |
@derailed : so my log file in debug logging on startup contains:
using k9s info looks like:
apparently the cluster specific configuration is not taking into account according the log/info output although changing the the k9s/view/active it is taken into account while changing k9s/namespace/active always gets reverted to value default in the file XDG_CONFIG/clusters/SC@MTF/SC@MTF/config.yaml:
|
@calmacroi Thank you for the details! |
@calmacroi Please give v0.31.3 a rinse and see if we're happier... Tx! |
the new version works as expected - thank you very much for the fast fix. |
Describe the bug
k9s overwrites changes to the config file in
$XGD_HOME/k9s/config.yaml
.To Reproduce
Expected behavior
My customisations are not removed, or a different file is provided for customisations.
add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context
I wanted to use a light skin for all clusters, previously this was easily done now I need to create a config file for each individual cluster, which is not viable when managing a lot of clusters.
Mildly related to #2324
The text was updated successfully, but these errors were encountered: