Feature Discussion: container configuration system
#1336
katiewasnothere
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem statement
We're looking to improve the user experience and overall functionality of setting defaults for
containerto better enable future use cases.Today
containeruses macOS's UserDefaults to configure settings needed at runtime. As mentioned in #608, UserDefaults may be idiomatic for macOS, but they apply globally to all sessions and do not handle representing complex, hierarchical data well. Additionally, we currently have two ways of setting these defaults, either directly with macOS'sdefaultscommand or throughcontainer system property.#608 proposes moving to use environment variables in place of UserDefaults. However, we do not believe this is sufficient. Environment variables are not in a consistent location, are not sourced from data, and also do not handle representing complex, hierarchical data well.
What should be configurable?
There are two different components of the
containerproject that need configurable defaults: core services and plugins.Core services
There are various core services that are run by
containerin the APIServer, which is started oncontainer system start. The APIServer itself and/or these core services it starts may have default configuration or setup that a user may wish to customize.For example, when
containeris started, a default network is automatically created here by the APIServer. Today, the configuration for that default network is hardcoded into the code above. However, a user may wish to use a different network plugin for this default network or may want multiple default networks created when the APIServer is started.Plugins
containeruses a plugin architecture for extending the CLI surface and functionality. Users may wish to define default configurations for the various plugins they use to better suit their use cases.For example, when a request is made to
containerto create a new network, theNetworksService, one of the core services on the APIServer, will start a new instance of the requested network plugin, such as the container-network-vmnet plugin. The container-network-vmnet plugin uses UserDefaults here to determine the default IP subnet to use if none is provided. While this is sufficient for the time being, if a user wanted to use multiple network plugins over the lifetime ofcontainer, they may wish to configure defaults specific to each plugin to set differing default IP subnets for each.Design
We want to get feedback from the community on how we can design this to best fit users' needs. Right now we are looking into using TOML via TOMLDecoder for our configuration system.
Goals
containercontainerrepoBeta Was this translation helpful? Give feedback.
All reactions