From 43fe15a78deabcbda7ba0c4f7cc260b0954b81b8 Mon Sep 17 00:00:00 2001 From: Ian Roberts Date: Thu, 2 Mar 2023 15:57:16 +0000 Subject: [PATCH] If an admin option is not specified, default it to match the corresponding host option --- gate-teamware/README.md | 2 +- gate-teamware/templates/deployment-backend.yaml | 6 +++--- gate-teamware/values.yaml | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gate-teamware/README.md b/gate-teamware/README.md index fabcf1b..3c42f83 100644 --- a/gate-teamware/README.md +++ b/gate-teamware/README.md @@ -62,7 +62,7 @@ Things you will commonly need to override include: - `name` - host organisation/individual's name. - `address` - physical address. - `contact` - a means of contact, supports HTML for e.g. email or contact form links. - - `admin` - the individual or organisation responsible for managing users of the teamware instance. + - `admin` - the individual or organisation responsible for managing users of the teamware instance, if this is not the same as the `host`. - `name` - admin organisation/individual's name. - `address` - physical address. - `contact` - a means of contact, supports HTML for e.g. email or contact form links. diff --git a/gate-teamware/templates/deployment-backend.yaml b/gate-teamware/templates/deployment-backend.yaml index 35ab778..3783065 100644 --- a/gate-teamware/templates/deployment-backend.yaml +++ b/gate-teamware/templates/deployment-backend.yaml @@ -147,15 +147,15 @@ spec: - name: PP_HOST_CONTACT value: {{ . | quote }} {{- end }} - {{- with .admin.name }} + {{- with (coalesce .admin.name .host.name) }} - name: PP_ADMIN_NAME value: {{ . | quote }} {{- end }} - {{- with .admin.address }} + {{- with (coalesce .admin.address .host.address) }} - name: PP_ADMIN_ADDRESS value: {{ . | quote }} {{- end }} - {{- with .admin.contact }} + {{- with (coalesce .admin.contact .host.contact) }} - name: PP_ADMIN_CONTACT value: {{ . | quote }} {{- end }}{{/* with .admin.contact */}} diff --git a/gate-teamware/values.yaml b/gate-teamware/values.yaml index bb5b032..b29594d 100644 --- a/gate-teamware/values.yaml +++ b/gate-teamware/values.yaml @@ -319,15 +319,20 @@ email: privacyPolicy: # Contact details of the host and administrator of the teamware instance host: - # Name of the host + # Name of the organization that hosts this teamware instance name: "" # Host's physical address address: "" # A method of contacting the host, field supports HTML for e.g. linking to a form contact: "" admin: + # Name of the organization that is responsible for administering this + # teamware instance, if not the same as the host name: "" + # Administrator's physical address, if not the same as the host address: "" + # A method of contacting the administrator, if not the same as the host. This + # field supports HTML. contact: "" # Database settings - see the bitnami postgresql chart documentation for full