Add extension points to the BaseManifest repository#2
Merged
Conversation
dd494c1 to
e449d41
Compare
1327ffc to
381c0ea
Compare
|
|
||
| hooks.Filters.ENV_PATCH("drydock-kustomization-resources").add_item(f"- {self.EXTENSIONS_DIRECTORY}") | ||
|
|
||
| self.base_manifests.save(config) |
Contributor
There was a problem hiding this comment.
why is it necessary to save twice? Here and when rendering
Member
Author
There was a problem hiding this comment.
It's not the cleanest approach at the moment, but I use it to generate two different environments with different templates and merge them.
| Where ``extra_templates_root`` points to the directory that holds your extra templates. | ||
| In ``extra_templates_root`` you must include an directory named ``extra-extensions``. | ||
| Inside ``extra-extensions`` you can write any template that you want but is meant to | ||
| be used as a Kustomize overlay, therefore you will need atleast a Kustomization.yml file. |
Contributor
There was a problem hiding this comment.
Suggested change
| be used as a Kustomize overlay, therefore you will need atleast a Kustomization.yml file. | |
| be used as a Kustomize overlay, therefore you will need at least a Kustomization.yml file. |
mariajgrimaldi
approved these changes
Jul 25, 2022
381c0ea to
13e2a2b
Compare
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.
Description
This adds an additional manifest builder that creates an additional overlay on top of the ones generated by
BaseManifests.ExtendedManifestswill take the path defined inextra_templatesin your drydock reference and render the templates living there on to your drydock-env.How to use
extra_templates_root/extra-extensionsand add akustomization.ymlwith you additional resources. Remember that this is a template and you have access to all the variables (e.g.{{ K8S_NAMESPACE }}).tutor drydock save -r reference.ymlto generate the new environment.