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

RFC: Add-on configs #1842

Closed
pvizeli opened this issue Jul 18, 2020 · 6 comments
Closed

RFC: Add-on configs #1842

pvizeli opened this issue Jul 18, 2020 · 6 comments
Labels
rfc RFC

Comments

@pvizeli
Copy link
Member

pvizeli commented Jul 18, 2020

Context

Every Add-on have a differen aproach to solve the issue if people need to be able to edit files. All the approach have the same issue, that the data are not part of the snapshot/restore/cleanup. It make also that is part feel as foreign body.

Decision

We add a new config helper they can be requested by Add-on. /config will be show internal inside Add-on and for the user they will have a new /config/**add-on** folder structure for edit files. /data stay internal while /config can be access from outside. The old /config will be expose as /core and need mapped with core flag if you want have all add-on config, the flag is data.

For the first 2 month, we make an fallback to avoid breaking or missing folders for a soft migration.

@pvizeli pvizeli pinned this issue Jul 18, 2020
@balloob
Copy link
Member

balloob commented Jul 20, 2020

Is /config shared between Home Assistant and add-ons?

@frenck
Copy link
Member

frenck commented Jul 20, 2020

I think we should avoid renaming the current /config to /core. While it makes more sense, it does impact all documentation and can be breaking for automations or things people do with hardcoded paths (e.g. running shell command, using ssh keypair and whatever else they think of).

As a counter-proposal, the /addons folder has been misunderstood in general quite a bit. I often have had question about that folder (e.g, "What is it for?", "I've installed this add-on and nothing shows up there"). So, maybe use /addons/**add-on** as the public data configuration folder instead and move the local (custom) add-ons folder to /custom_addons (which matches the expectations with the custom integrations method).

@balloob
Copy link
Member

balloob commented Jul 21, 2020

Let's avoid making breaking changes. We can add an /addons_config ?

@frenck
Copy link
Member

frenck commented Jul 21, 2020

The repurposing of /addon should not be a breaking one.

@mcarbonneaux
Copy link

mcarbonneaux commented Mar 13, 2023

while be very important to be abel to edit/manipulate the addons config file, like core file.

for debuging/troubleshooting, fixing problem, configuring some custom part that are not for the moment managed by the addon ui config part...

For exemple nginx proxy manager does not provide for the moment a way to reset lost password... if the database are sqlite (the default) you need to access with sqlite3 cli to modify the database to reset the password...

on haos for the moment there no simple solution available to do that...

on haos the solution for the moment is to use ssh & terminal addons to dive into the nginx proxy manager container with docker exec... add sqlite package, and modify the file with sqlite cmd...

map config attribut permit to map "addons" (that map to /mnt/data/supervisor/addons/local), but is not an access to the addons configuration directory (/mnt/data/supervisor/addons/data) where this type of file are (like the database.sqlite of nginx proxy manager addons).

Propositions :

  • i thinks a news value like addons_config (need to be different than addons to avoid bracking thing) to map /addons_config to '/mnt/data/supervisor/addons/data' in addons container that set to true.

  • or new subdirectory in /config like addons can be more simple. and can be hardlink (from /mnt/data/supervisor/addons/data to /mnt/data/supervisor/homeassitant/addons) for the moment. in that way while be abel to access to addons config file with the existing addons (file editor/samba/vstudio/ssh&webterm...).

@mdegat01
Copy link
Contributor

mdegat01 commented Nov 2, 2023

This has been implemented by #4650 🎉

@mdegat01 mdegat01 closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc RFC
Projects
None yet
Development

No branches or pull requests

5 participants