User defined templates#715
Conversation
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Pull Request Test Coverage Report for Build 13422494467Details
💛 - Coveralls |
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
loneil
left a comment
There was a problem hiding this comment.
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.
esune
left a comment
There was a problem hiding this comment.
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 <gavinfreeborn@gmail.com>
|
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 <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
e87d3b6 to
52aea62
Compare
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
|
I just created an issue regarding placing files in |
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
esune
left a comment
There was a problem hiding this comment.
Looks good, just a couple nitpick suggestions for the docs and we're good to go I think.
Co-authored-by: Emiliano Suñé <emiliano.sune@gmail.com> Signed-off-by: Gavinok <34443260+Gavinok@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
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_DIRto 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.