Skip to content

Commit

Permalink
fix: always run Caddy on Kubernetes
Browse files Browse the repository at this point in the history
Caddy should always be running, even when ENABLE_WEB_PROXY is false.
It's the service that should not always be running.
  • Loading branch information
regisb committed Nov 1, 2021
1 parent 43259d5 commit 7a01f9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Note: Breaking changes between versions are indicated by "💥".

- [Bugfix] Fix running Caddy container in k8s, which should always be the case even if `ENABLE_WEB_PROXY` is false.
- 💥[Improvement] Run all services as unprivileged containers, for better security. This has multiple consequences:
- The "openedx-dev" image is now built with `tutor dev dc build lms`.
- The "smtp" service now runs the "devture/exim-relay" Docker image, which is unprivileged. Also, the default SMTP port is now 8025.
Expand Down
8 changes: 6 additions & 2 deletions tutor/templates/k8s/deployments.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% if ENABLE_WEB_PROXY %}
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -21,19 +20,24 @@ spec:
volumeMounts:
- mountPath: /etc/caddy/
name: config
{%- if ENABLE_WEB_PROXY %}
- mountPath: /data/
name: data
{%- endif %}
ports:
- containerPort: 80
{%- if ENABLE_WEB_PROXY %}
- containerPort: 443
{%- endif %}
volumes:
- name: config
configMap:
name: caddy-config
{%- if ENABLE_WEB_PROXY %}
- name: data
persistentVolumeClaim:
claimName: caddy
{% endif %}
{%- endif %}
{% if RUN_CMS %}
---
apiVersion: apps/v1
Expand Down

0 comments on commit 7a01f9d

Please sign in to comment.