Subprojects #10
PascalSenn
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Subprojects
A project can contain different active schemas for various configuration files. For instance, you may have a .NET application using
appsettings.json
and a Helm chart for configuring Kubernetes. For such cases, you can specify additional projects using thesubprojects
property.Subprojects define unique project configurations, including their custom components, repositories, and component providers. By default, a subproject inherits the configuration from the parent project, hence any unwanted inherited features should be specifically disabled. It's essential to always specify the complete configuration, with the
name
property being a mandatory requirement.Moreover, subprojects can be configured in the
.confixrc
or.confix.repository
files, allowing global definition of subprojects that are then inherited into the.confix.project
file.One practical application of this feature could be in scenarios where a common configuration pattern for Helm charts exists. A subproject can be defined for this purpose, and then applied across all your projects.
For instance, if you have a .docker folder containing the folders dev, staging, and production, with each of these folders containing a config.yml file defining the Kubernetes deployment chart of a particular service, you can conveniently configure this to function across all your projects, as demonstrated below:
All your services now can use the same configuration for the Kubernetes deployment chart, with the
SharedConfig
component being included in thevalues.yaml
file and be automatically updated whenever you runconfix project build
.Beta Was this translation helpful? Give feedback.
All reactions