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

Application configuration files should be moved out of the /etc directory. #721

Open
i5okie opened this issue Feb 13, 2025 · 2 comments · May be fixed by #729
Open

Application configuration files should be moved out of the /etc directory. #721

i5okie opened this issue Feb 13, 2025 · 2 comments · May be fixed by #729
Assignees

Comments

@i5okie
Copy link
Contributor

i5okie commented Feb 13, 2025

Application files should be moved out of the /etc directory.

- name: CONTROLLER_SESSION_TIMEOUT_CONFIG_FILE
value: /etc/controller-config/sessiontimeout.json
- name: CONTROLLER_VARIABLE_SUBSTITUTION_OVERRIDE
value: /etc/controller-config/user_variable_substitution.py

/etc directory is a system directory and contains configuration files for the operating system.
Placing web application files in the /etc directory introduces a security risk.

Relocating these files to /app/config would be more appropriate.

@loneil
Copy link
Contributor

loneil commented Feb 20, 2025

Note the /app directory root is the source. Not sure if confusing or anything to have source and configmap'd config in the same root?

Image

Would this be a better setup? I don't know what do people think (maybe not a big deal having deployed source code to same root folder as these config files)

/app
|-- /controller-config
|   |-- user_variable_substitution.py 
|   |-- sessiontimeout.json 
|   |-- /templates
|-- /src
|   |-- main.py
|   |-- app.py blah blah

Also not sure what the current deal with the existing config folder is with the symlinks and ..data and dated folder? Normal for volume mount or configmap setup??

Image

@esune
Copy link
Member

esune commented Feb 20, 2025

Unsure about the symlinks, but think you're right and they are a byproduct of the mounted configmap.

Regarding the configuration folder: I do like the structure you propose: it doesn't make too big of a difference technically, but it provides some good logical separation of code from configurable assets.

@Gavinok Gavinok moved this from Assigned to In Progress in CDT Enterprise Apps Feb 20, 2025
@Gavinok Gavinok linked a pull request Feb 21, 2025 that will close this issue
@Gavinok Gavinok moved this from In Progress to In Review in CDT Enterprise Apps Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants