Skip to content

Commit

Permalink
feat(#3): support disabling frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Jumpy-Squirrel committed Dec 23, 2023
1 parent c5edda0 commit 5c6623b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/eurofurence-registration-system/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: eurofurence-registration-system
version: 0.0.14
version: 0.0.15
description: A helm chart that can deploy the Eurofurence Registration System.
type: application
home: https://github.com/eurofurence/reg-helm-chart
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,9 @@ data:
style: {{ .Values.system.logging.style }}
HTTPD_CONF_PATH_PREFIX_NO_SLASHES: '{{ .Values.system.public_base_context }}'
HTTPD_CONF_SERVER_NAME: '{{ .Values.ingress.host }}'
{{- if .Values.system.components.frontend.enable }}
HTTPD_CONF_STATIC_DIR: 'reg-frontend'
{{- else }}
HTTPD_CONF_STATIC_DIR: 'reg-frontend-disabled'
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
{{ $frontendInput := dict "name" "frontend"
"all" .Values
"component" .Values.system.components.frontend
"envs" (list "HTTPD_CONF_PATH_PREFIX_NO_SLASHES")
"envs" (list "HTTPD_CONF_PATH_PREFIX_NO_SLASHES" "HTTPD_CONF_SERVER_NAME" "HTTPD_CONF_STATIC_DIR")
"command" "/usr/sbin/httpd"
"args" (list "-f" "/etc/apache2/regsys.conf" "-DNO_DETACH" "-DFOREGROUND")
"volume" "no" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ templates:
tests:
- it: should create correct configmap
set:
ingress:
host: my.domain.example.com
system:
public_base_url_domain: https://my.domain.example.com
public_base_context: 'hello/you'
Expand Down Expand Up @@ -486,6 +488,12 @@ tests:
- equal:
path: data.HTTPD_CONF_PATH_PREFIX_NO_SLASHES
value: 'hello/you'
- equal:
path: data.HTTPD_CONF_SERVER_NAME
value: 'my.domain.example.com'
- equal:
path: data.HTTPD_CONF_STATIC_DIR
value: 'reg-frontend'

- it: should not set namespace if unset
set:
Expand Down
10 changes: 10 additions & 0 deletions charts/eurofurence-registration-system/tests/deployments_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,16 @@ tests:
configMapKeyRef:
name: regsys-cm
key: HTTPD_CONF_PATH_PREFIX_NO_SLASHES
- name: HTTPD_CONF_SERVER_NAME
valueFrom:
configMapKeyRef:
name: regsys-cm
key: HTTPD_CONF_SERVER_NAME
- name: HTTPD_CONF_STATIC_DIR
valueFrom:
configMapKeyRef:
name: regsys-cm
key: HTTPD_CONF_STATIC_DIR
documentIndex: 6

- it: should not set namespace if unset
Expand Down

0 comments on commit 5c6623b

Please sign in to comment.