Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b436c08
Update location and variability of template files
Gavinok Feb 4, 2025
51caf0f
Relocate templates and configure helm charts
Gavinok Feb 4, 2025
5a888c4
Improve config to now set template directory and overrides
Gavinok Feb 6, 2025
3c6974f
Remove default config files as they are already in image
Gavinok Feb 6, 2025
f5b2a01
Remove minikube settings
Gavinok Feb 6, 2025
6c6443e
Relocate docs to ConfigurationGuide.md
Gavinok Feb 7, 2025
f992e6d
Merge branch 'main' into user-defined-templates
Gavinok Feb 7, 2025
f678eb1
Correct /etc to /tmp for templates directory
Gavinok Feb 7, 2025
022e618
Minor corrections
Gavinok Feb 7, 2025
9eab049
remove tsconfig
Gavinok Feb 7, 2025
8d188a3
Merge branch 'main' into user-defined-templates
Gavinok Feb 10, 2025
af6d44a
Correct grammar and relocate /tmp/templates to /etc/templates
Gavinok Feb 10, 2025
7155e4a
Update repository image in helm charts
Gavinok Feb 11, 2025
52aea62
migrate /etc/templates to /etc/controller-config/templates
Gavinok Feb 11, 2025
01b70e3
Removed the need for mounting an empty configmap
Gavinok Feb 13, 2025
d90d88d
Removed htmlFileOverrides
Gavinok Feb 13, 2025
aa08d14
move to configmap name rather than manually entering from values
Gavinok Feb 18, 2025
8192ca0
Merge branch 'main' into user-defined-templates
Gavinok Feb 18, 2025
5cee75e
Correct the missing customHtmlConfigMapName comments
Gavinok Feb 18, 2025
e80e918
Update docs/ConfigurationGuide.md
Gavinok Feb 19, 2025
31eb720
Merge branch 'main' into user-defined-templates
Gavinok Feb 19, 2025
abaa448
apply esun's doc suggestions
Gavinok Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions charts/vc-authn-oidc/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,3 @@ data:
{{ .Values.controller.sessionTimeout.config | toJson }}
user_variable_substitution.py: |
{{ .Values.controller.userVariableSubsitution | nindent 4 }}
---
{{- if .Values.controller.htmlFileOverrides }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "global.fullname" . }}-template-overrides
data:
{{- range $key, $value := .Values.controller.htmlFileOverrides }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
12 changes: 8 additions & 4 deletions charts/vc-authn-oidc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ spec:
- name: controller-config
configMap:
name: {{ include "global.fullname" . }}-controller-config
{{- if .Values.controller.htmlFileOverrides }}
{{- if (not (empty .Values.controller.customHtmlConfigMapName)) }}
- name: controller-templates
projected:
sources:
- configMap:
name: {{ include "global.fullname" . }}-template-overrides
name: {{ .Values.controller.customHtmlConfigMapName | quote }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down Expand Up @@ -142,8 +142,12 @@ spec:
- name: jwt-token
mountPath: /opt/token
- name: controller-config
mountPath: /etc/controller-config
{{- if .Values.controller.htmlFileOverrides }}
mountPath: /etc/controller-config/sessiontimeout.json
subPath: sessiontimeout.json
- name: controller-config
mountPath: /etc/controller-config/user_variable_substitution.py
subPath: user_variable_substitution.py
{{- if (not (empty .Values.controller.customHtmlConfigMapName)) }}
- name: controller-templates
mountPath: {{ .Values.controller.templateDirectory }}
{{- end }}
Expand Down
6 changes: 2 additions & 4 deletions charts/vc-authn-oidc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ controller:
# variable_substitution_map.add_variable_substitution(
# r"\$sub_days_plus_one_(\d+)", sub_days_plus_one
# )
# htmlFileOverrides:
# ver_config_explorer.html: ""
# verified_credentials.html: ""
# wallet_howto.html: ""
customHtmlConfigMapName: ""

## @param useHTTPS Prepend Agent and Admin URLs with `https`
useHTTPS: true
## @param logLevel Accepts one of the following values: CRITICAL, ERROR, WARNING, INFO, DEBUG
Expand Down
28 changes: 26 additions & 2 deletions docs/ConfigurationGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,36 @@ indication of this will also be logged
## ConfigMap Based Overrides

By default the QR page shown to users uses OpenWallet branding users
are capable of overriding any of these files using the
`controller.htmlFileOverrides` value in
are capable of overriding any of these files using a custom ConfigMap.

Users can modify [configmap.yaml](charts/vc-authn-oidc/templates/configmap.yaml)
and adding a new config map over riding any of the HTML files in [html-templates](../html-templates/). Specifically you can replace:
- [verified_credentials.html](../html-templates/verified_credentials.html)
- [wallet_howto.html](../html-templates/wallet_howto.html)
- [ver_config_explorer.html](../html-templates/ver_config_explorer.html)

One example of the new ConfigMap would be

```yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: user-template-overrides
data:
verified_credentials.html: "<p>New contents of the verified_credentials.html page</p>"
wallet_howto.html: "<p>New contents of the wallet_howto.html page</p>"
ver_config_explorer.html: "<p>New contents of the ver_config_explorer.html page</p>"
```

The name of this new ConfigMap needs to be added to
`controller.customHtmlConfigMapName` value in
[values.yaml](charts/vc-authn-oidc/values.yaml).

These files will override the existing files seen in
[html-templates](../html-templates/).


## Complete Directory Overrides

In addition, to allow for more flexibility users are welcome to build
Expand Down