Allow customize http vhost config using HttpdCustomization.CustomConfigSecret #402
+210
−34
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.
This change allows to customize the httpd vhost config using this parameter to specify a secret that contains service config data. The content of each provided snippet gets rendered as a go template and placed into /etc/httpd/conf/httpd_custom_ .
At the end of the vhost config in the default httpd template these custom configs get included using
Include conf/httpd_custom_*
.For information on how sections in httpd configuration get merged, check section "How the sections are merged" in https://httpd.apache.org/docs/current/sections.html#merging
All possible parameters which can be use in a template can be looked up in the rendered config-data cm of the service like: $ oc get cm -n openstack horizon-config-data -o json | jq -r .data.templatingParameters | base64 -d
or in the running pod of the service in the file:
$ cat /var/lib/config-data/default/templatingParameters
The content is a versioned dump of the parameters of the service operator, like:
Depends-On: openstack-k8s-operators/lib-common#591
Depends-On: openstack-k8s-operators/lib-common#593
Jira: https://issues.redhat.com/browse/OSPRH-13100