-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User defined templates #715
User defined templates #715
Conversation
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Pull Request Test Coverage Report for Build 13422494467Details
💛 - Coveralls |
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering what people think about default location?
For the override variables it's CONTROLLER_VARIABLE_SUBSTITUTION_OVERRIDE=/etc/controller-config/user_variable_substitution.py
right? Good to have templates in the same spot rather than /tmp
? Maybe we add more config files later on so could be good to have things together...
I haven't tried an override locally in docker (just confirmed it runs all good as-is), but I think the solution should work (would get Ivan to give a look through Helm setup on this PR) if I'm understanding right. So anything I put in /tmp/templates
(or whatever we specify that to be, or the user species with CONTROLLER_TEMPLATE_DIR
), that should get resolved at runtime and pulled in right?
So it's not necessary to build the image with custom templates? Like if someone adds a volume mount at their template directory could those files be independently controlled as deployment time?
Ideally we (and others) wouldn't be building custom I think, just using the vcauth image and deploying files and setting the path? If I'm reading the config right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like @loneil suggestion to keep all templates together in /etc/controller-config/
as default directory. We can still provide a way to specify a different location, but that path would make sense in most scenarios.
I am also wondering if we should put a "toggle" for the template configmap to be mounted or not (it would always be created in k8s): if we don't do this, even when using a custom build image we would get the configmap mounted at the target location overriding the modified files.
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Resolved the grammar and corrected the directory + registry address. Do we also want to change the chart to point at that registry? |
Yes please, that was something I must have missed when prepping for the move |
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍🏻
e87d3b6
to
52aea62
Compare
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more tweaks, sorry for the back-and-forth: after reviewing the current strategy with @i5okie he came up with some extra recommendations that are worth following.
I just created an issue regarding placing files in |
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple nitpick suggestions for the docs and we're good to go I think.
Co-authored-by: Emiliano Suñé <[email protected]> Signed-off-by: Gavinok <[email protected]>
Signed-off-by: Gavin Jaeger-Freeborn <[email protected]>
This PR attempts to resolve #713
There are now two supported options.
Add overriding files to the ConfigMap for the deployment and the other requires users to
Add additional build step in order to add their own html template directory to the controller image and change the environment variable
CONTROLLER_TEMPLATE_DIR
to point to their new template directory.Why 2 Options
While option 1 prevents the need for additional build steps it is limited by the maximum size of a ConfigMap (1MB). Option 2 allows for more complex user made html templates but requires an additional build step.