Skip to content
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

add teamware privacy policy variables #3

Merged
merged 8 commits into from
Mar 10, 2023
2 changes: 1 addition & 1 deletion gate-teamware/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.3
version: 0.2.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
16 changes: 16 additions & 0 deletions gate-teamware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ Things you will commonly need to override include:
- `replicaCount` (default 1) - the number of replicas of the Django container to run. Alternatively you can set `backend.autoscaling.enabled` to `true` for auto-scaling based on CPU usage
- `staticFiles`
- `replicaCount` (default 1) - the same for the static files nginx, though this is highly unlikely to need more than one replica as it's a simple static file server
- `privacyPolicy` - contact details of the service's host and administrator to be rendered in the privacy policy and terms & conditions.
- `host` - the organisation or individual responsible for managing the deployment of the teamware instance.
- `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.
ianroberts marked this conversation as resolved.
Show resolved Hide resolved
- `name` - admin organisation/individual's name.
- `address` - physical address.
- `contact` - a means of contact, supports HTML for e.g. email or contact form links.

You can also set `resources`, `nodeSelector`, `affinity` and/or `tolerations` if required, under both the `backend` and `staticFiles` sections

Expand Down Expand Up @@ -134,6 +143,13 @@ and the deployments may need to be manually updated using `kubectl rollout resta

## Changelog

### Version 0.2.4

No breaking changes.

Minor changes:
- `privacyPolicy` key added containing `host` and `admin`, each containing `name`, `address` and `contact` fields to hold contact details for the app's privacy policy and terms & conditions.

### Version 0.2.1

**Breaking changes**
Expand Down
30 changes: 30 additions & 0 deletions gate-teamware/templates/deployment-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,39 @@ spec:
key: refresh-token
{{- end }}{{/* if backend gmail */}}
{{- end }}{{/* with .Values.email */}}

{{- with $.Values.privacyPolicy }}
# Privacy Policy Settings
{{- with .host.name }}
- name: PP_HOST_NAME
value: {{ . | quote }}
{{- end }}
{{- with .host.address }}
- name: PP_HOST_ADDRESS
value: {{ . | quote }}
{{- end }}
{{- with .host.contact }}
- name: PP_HOST_CONTACT
value: {{ . | quote }}
{{- end }}
{{- with .admin.name }}
ianroberts marked this conversation as resolved.
Show resolved Hide resolved
- name: PP_ADMIN_NAME
value: {{ . | quote }}
{{- end }}
{{- with .admin.address }}
- name: PP_ADMIN_ADDRESS
value: {{ . | quote }}
{{- end }}
{{- with .admin.contact }}
- name: PP_ADMIN_CONTACT
value: {{ . | quote }}
{{- end }}{{/* with .admin.contact */}}
{{- end }}{{/* with $.Values.privacyPolicy */}}

{{- with .extraEnv }}
{{- toYaml . | nindent 10 }}
{{- end }}

{{- if and $.Values.email.smtp.security $.Values.email.smtp.clientCertSecret }}
volumeMounts:
- name: email-client-cert
Expand Down
14 changes: 14 additions & 0 deletions gate-teamware/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,20 @@ email:
# client secret and "refresh-token" for the GMail API refresh token.
secretName: ""

privacyPolicy:
# Contact details of the host and administrator of the teamware instance
host:
# Name of the host
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: ""
address: ""
contact: ""

# Database settings - see the bitnami postgresql chart documentation for full
# details
postgresql:
Expand Down