Add Feature Flags e.g. for instance configurations #3
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We want to be able to group certain configs, even if they don't belong to a specific recipe or depend on the existence of a specific recipe.
Usacase:
Our current default instance config looks like this:
There are no apps "bbb" or "calendar" - but it would be nice if we could enable these features just as easy as all the other ones, with a certain default config and without the need to override this in all instances.
Those features could work in a similar way as the combine.yml in the alakazam repo.
e.g.:
copied over from https://git.local-it.org/KolliCloud-intern/development/issues/295
Yes, this would prevent a bunch of duplication. So a feature is a set of configs (env, *-hooks, secrets) that, when activated, is applied to one or more recipes. Would there also be a use case to share these features (a bit analogous to recipe-specific features that could be implemented as an abra.sh function), or would most features be a specific choice for the set of deployments you're offering?
We could start with a
features.ymlfile somewhere in the root path and decide later whether it makes sense to share features in this repo or in an alakazam-features repo?Taking bbb as an example: you would create a
features.ymlin your root path:And then the instance config becomes:
(I don't think this example actually works, the calendar feature would probably overwrite the APPLICATIONS env that was set by the bbb feature. So instead, for the authentik part it should probably call add_single_application in initial-hooks?)
I am wondering whether features is the most suitable name for this. Could you consider this a feature of the instance deployment? Or might CONFIG-SETS and
config-sets.ymlbe a more generic name for what this does, applying a set of configs to the instance?And what about disabling it: Enabling the feature in alaka.yml of some grouped instance dir as a default, and then disabling it by setting
bbb: falsein an instance specific file?Yes to all of this! 😍
I also like all these ideas!
This is an unfortunately undocumented feature of alakazam: if the value of an env is a dict (like
APPLICATIONS) , in the first step the dict will be merged and then it will be converted into a json. Therefore theAPPLICATIONSenv won't be overwritten.