Skip to content
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

feature: Store config in XDG conform location #235

Closed
3 of 4 tasks
patrickpichler opened this issue Apr 10, 2023 · 0 comments · Fixed by #236
Closed
3 of 4 tasks

feature: Store config in XDG conform location #235

patrickpichler opened this issue Apr 10, 2023 · 0 comments · Fixed by #236
Assignees

Comments

@patrickpichler
Copy link
Contributor

Checklist:

  • I've searched for similar issues and couldn't find anything matching
  • I've discussed this feature in the #k8sgpt slack channel

Is this feature request related to a problem?

  • Yes
  • No

Describe the solution you'd like

The config file should be stored in an XDG conform location. I would suggest the XDG_CONFIG_HOME folder,
which would be ~/.config on linux.

There is even a neat golang library which offers standardized locations for mac, windows and linux:
github.com/adrg/xdg

Benefits for the project and its users

This would help keeping the users home directory clean and be more inline with other applications installed.

Potential drawbacks

The config file location changes, so this would be a breaking change. We could still support
the old location for some time though or offer an automatic migration.

Additional context

Here is some more information about XDG: https://wiki.archlinux.org/title/XDG_Base_Directory

patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 10, 2023
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).

Since this is a breaking change, there is a check in place, which
informs the end user to please migrate to the new config location, if
the a file at the old config path has been located.

This fixes k8sgpt-ai#235.

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 10, 2023
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).

Since this is a breaking change, there is a check in place, which
informs the end user to please migrate to the new config location, if
the a file at the old config path has been located.

This fixes k8sgpt-ai#235.

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 10, 2023
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).

Since this is a breaking change, there is a check in place, which
informs the end user to please migrate to the new config location, if
the a file at the old config path has been located.

This fixes k8sgpt-ai#235.

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 10, 2023
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).

Since this is a breaking change, there is a check in place, which
informs the end user to please migrate to the new config location, if
the a file at the old config path has been located.

This fixes k8sgpt-ai#235.

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 10, 2023
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).

Since this is a breaking change, there is a check in place, which
informs the end user to please migrate to the new config location, if
the a file at the old config path has been located.

This fixes k8sgpt-ai#235.

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
patrickpichler pushed a commit to patrickpichler/k8sgpt that referenced this issue Apr 15, 2023
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).

Migration is performed automatically.

This fixes k8sgpt-ai#235.

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant