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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Subprojects
A project can contain different active schemas for various configuration files. For instance, you may have a .NET application using
appsettings.jsonand a Helm chart for configuring Kubernetes. For such cases, you can specify additional projects using thesubprojectsproperty.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
nameproperty being a mandatory requirement.Moreover, subprojects can be configured in the
.confixrcor.confix.repositoryfiles, allowing global definition of subprojects that are then inherited into the.confix.projectfile.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:
{ "subprojects": [ { "name": "helm", "components": { "@charts/SharedConfig": "latest", }, "configurationFiles": [ "./helm/**/values*.yaml" ] } ] }All your services now can use the same configuration for the Kubernetes deployment chart, with the
SharedConfigcomponent being included in thevalues.yamlfile and be automatically updated whenever you runconfix project build.Beta Was this translation helpful? Give feedback.
All reactions