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

env level configuration support #429

Merged
merged 1 commit into from
May 28, 2024
Merged

env level configuration support #429

merged 1 commit into from
May 28, 2024

Conversation

anibalportero
Copy link
Contributor

@anibalportero anibalportero commented May 27, 2024

This change adds Linux environment variables as an additional level of configuration between cmdline (deprecated from now on) and trail config. It also adds a fully new set of config key to make its syntax compatible with env, while keeping backwards compatibility of the old config keys.

These are the main points of action:

  • New env friendly config key format, making it case insensitive and eliminating "." characters. For example, "debug.ssh" would be now "debug_ssh" or "DEBUG_SSH".
  • Add new aliases to keep backwards compatibility. For example, "debug.ssh" would be still supported but deprecated.
  • Keep the old format for pvcontrol config ls. A new command will be issued in the future with the new one while keeping support for the old one.
  • Change all index names to be equivalent to the upper case version of the new keys.
  • Set configuration from Linux environment variables, following the new key syntax format.

@anibalportero anibalportero marked this pull request as draft May 27, 2024 17:56
@asac
Copy link
Contributor

asac commented May 27, 2024

Looks promising.

@asac
Copy link
Contributor

asac commented May 27, 2024

For sysctl we might need to stick to old way for now. And later introduce a sysctl.XXXX.XXXX.XXX parsing option (without pv_ prefix) which we would offer for kernels < 5.8 (since 5.8 kernel will parse such cmdline options directly). We wont need them in envs then anymore. By offering sysctl... option will help folks transition to the pure kernel approach without pantavisor ....

In pantavisor.config files we would keep offering the . notation for sysctl... hope this does not make things too bad on code side...

@anibalportero anibalportero force-pushed the feature/env_config branch 2 times, most recently from d267ea9 to 1f914df Compare May 28, 2024 09:54
@anibalportero anibalportero marked this pull request as ready for review May 28, 2024 10:07
@anibalportero anibalportero merged commit 22c1503 into master May 28, 2024
2 checks passed
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 this pull request may close these issues.

2 participants