diff --git a/.changeset/big-toes-hurt.md b/.changeset/big-toes-hurt.md new file mode 100644 index 00000000..d99ce6e7 --- /dev/null +++ b/.changeset/big-toes-hurt.md @@ -0,0 +1,5 @@ +--- +'@nordeck/matrix-meetings-widget': minor +--- + +Add Helm values for configuration of ipv4only mode diff --git a/README.md b/README.md index e3a7b427..0f94352d 100644 --- a/README.md +++ b/README.md @@ -103,13 +103,16 @@ You can find them at [`/docs/adrs`](./docs/adrs/). ## Deployment -Yon can run the widget using Docker: +You can run the widget using Docker: ```sh docker run --rm -p 8080:8080 ghcr.io/nordeck/matrix-meetings-widget:latest ``` -Yon can run the bot using Docker: +Our docker image supports customizing the nginx config by supplying additional config files. +For example, this allows running the image in an IPv4-only environment, as demonstrated at + +You can run the bot using Docker: ```sh docker run --rm -p 3000:3000 ghcr.io/nordeck/matrix-meetings-bot:latest diff --git a/charts/matrix-meetings-widget/Chart.yaml b/charts/matrix-meetings-widget/Chart.yaml index 4d047ace..4bc3818d 100644 --- a/charts/matrix-meetings-widget/Chart.yaml +++ b/charts/matrix-meetings-widget/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v2 name: matrix-meetings-widget description: A meetings widget for the Element messenger type: application -version: 0.1.0 +version: 0.2.0 appVersion: "0.0.0" home: https://github.com/nordeck/matrix-meetings diff --git a/charts/matrix-meetings-widget/templates/configmap.yaml b/charts/matrix-meetings-widget/templates/configmap.yaml index ef9fbc86..4cb7fb30 100644 --- a/charts/matrix-meetings-widget/templates/configmap.yaml +++ b/charts/matrix-meetings-widget/templates/configmap.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ConfigMap metadata: @@ -7,3 +8,15 @@ metadata: data: REACT_APP_API_BASE_URL: "https://matrix-meetings-bot.{{- .Values.settings.hostname -}}" REACT_APP_HOME_SERVER_URL: "https://synapse.{{- .Values.settings.hostname -}}" +{{- if .Values.nginx.ipv4Only }} +--- +kind: "ConfigMap" +apiVersion: "v1" +metadata: + name: "{{ include "app.fullname" . }}-nginx-configs" + labels: +{{ include "app.labels" . | indent 4 }} +data: + listen.conf: | + listen 8080; +{{- end }} diff --git a/charts/matrix-meetings-widget/templates/deployment.yaml b/charts/matrix-meetings-widget/templates/deployment.yaml index 303e74f7..ba00d65e 100644 --- a/charts/matrix-meetings-widget/templates/deployment.yaml +++ b/charts/matrix-meetings-widget/templates/deployment.yaml @@ -62,11 +62,22 @@ spec: mountPath: /var/cache/nginx - name: tmp-volume mountPath: /tmp + {{- if .Values.nginx.ipv4Only }} + - name: "nginx-configs" + mountPath: "/etc/nginx/conf.d/custom" + subpath: "listen.conf" + readOnly: true + {{- end }} volumes: - name: cache-volume emptyDir: {} - name: tmp-volume emptyDir: {} + {{- if .Values.nginx.ipv4Only }} + - name: "nginx-configs" + configMap: + name: "{{ include "app.fullname" . }}-nginx-configs" + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/matrix-meetings-widget/values.yaml b/charts/matrix-meetings-widget/values.yaml index d7069da3..c530dcdb 100644 --- a/charts/matrix-meetings-widget/values.yaml +++ b/charts/matrix-meetings-widget/values.yaml @@ -60,7 +60,6 @@ resources: {} # cpu: 250m # memory: 250Mi - autoscaling: enabled: false minReplicas: 1 @@ -79,3 +78,8 @@ settings: # Extra env variables to pass to the container env: [] + +# Configuration related to the nginx within the container which serves the widget. +nginx: + # Only listen on ipv4 + ipv4Only: false diff --git a/charts/matrix-meetings/Chart.yaml b/charts/matrix-meetings/Chart.yaml index 779040d5..f5094dd0 100644 --- a/charts/matrix-meetings/Chart.yaml +++ b/charts/matrix-meetings/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: matrix-meetings description: A helper chart to deploy both the widget and the bot type: application -version: 0.1.0 +version: 0.2.0 appVersion: "0.0.0" home: https://github.com/nordeck/matrix-meetings dependencies: