feat: support for passing additional parameters from app repository to root repository using override file#184
Draft
makrelas wants to merge 1 commit intobaloise:masterfrom
Draft
feat: support for passing additional parameters from app repository to root repository using override file#184makrelas wants to merge 1 commit intobaloise:masterfrom
makrelas wants to merge 1 commit intobaloise:masterfrom
Conversation
|
|
||
| **root_repo/whitelist.yaml** | ||
| ```yaml | ||
| teamcode: null |
Member
There was a problem hiding this comment.
why not a list of allowed keys?
allowed_custom_parameters:
- teamcode
- keyallowed| teamcode: null | ||
| keyallowed: null | ||
| ``` | ||
| **app_repo/app-xy-test/custom_values.yaml** |
Member
There was a problem hiding this comment.
maybe custom_project_config.yaml, custom_namespace_config.yaml or custom_root_config.yaml gives a bit more context to what the file is for
| except YAMLException as yex: | ||
| logging.error("Unable to load whitelist.yaml from root repository, please validate if this is a correct YAML file" , exc_info=yex) | ||
| return {} | ||
| #TODO: should sync fail, assume default whitelist or skip adding custom values (return {}) |
Member
There was a problem hiding this comment.
Taking into account that the sync-apps command is usually run by some pipeline not directly maintained by the individual teams, it might be a bit hard to figure out what went wrong (or even notice that it failed in the first place).
A compromise could be to create a YAML comment in the resulting root config file with the failure message:
applications:
app-xy-staging:
teamcode: team-xy
# sync-apps error: 'keydisallowed' not allowed (custom_values.yaml, line 3)This way you neither have to swallow the error nor break the sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As requested by @niiku , this is work inspired by: #174 request.
It is supposed to provide capability for the users to pass additional (whitelisted) values to the root repo configuration - which may be used for enhancement purposes (i.e. labeling objects with proper team/project billing code) .
PR is not yet ready - as I would need to know - and discuss - what would be the proper way to raise errors in-line with the rest of the project - and which way will be the correct one to proceed with check "Root repository already up-to-date. I'm done here." - as the implementation of this capability will break the way ho app is behaving now.
Additionally - we would need to agree on way of overriding the whitelist, as well as locations and names of the additional yaml configuration files.