6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 22:27:47 +00:00
tutor/tutor
Florian Haas 78424776b6 fix: Enable rolling updates for the Caddy deployment in multi-node Kubernetes
When a Pod associated with a Deployment is updated (for example, due
to a change to its ConfigMap, or an updated image reference),
Kubernetes uses a ReplicaSet to spin up a Pod with the new
configuration, and once it is up, it tears down the old one.

In case of the Caddy Deployment, this is complicated by the fact that
it uses a Persistent Volume Claim (PVC), whose corresponding volume
uses a Read/Write-Once (RWO) configuration. This means that it can
only be used by multiple Pods if all those Pods all run on the same
Kubernetes worker node.

In order to enable rolling upgrades for the Caddy Deployment, we need
to ensure that its replacement Pod is scheduled on the same node as
the original Pod.

Thus, add a pod affinity rule that will force exactly that behavior.

Reference:
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/

The other Tutor services that use volumes (MySQL, Redis, Elasticsearch
and MongoDB) do not need this fix, since they all use the "Recreate"
deployment strategy: their Pods are all automatically torn down before
being replaced. This strategy is not needed for Caddy, and using a pod
affinity rule is less disruptive to the learner experience.
2022-05-19 12:51:23 +02:00
..
commands fix: mounts were not being rendered in dev mode 2022-05-07 13:37:57 +02:00
hooks Fix copy-paste error in docstring 2022-05-10 08:40:08 +02:00
plugins feat: minor warning formatting change 2022-04-25 08:06:01 +02:00
templates fix: Enable rolling updates for the Caddy deployment in multi-node Kubernetes 2022-05-19 12:51:23 +02:00
__about__.py v13.2.2 2022-05-07 13:37:57 +02:00
__init__.py Tutor v3 complete rewrite 2019-02-09 20:30:01 +01:00
bindmounts.py feat: add --mount option to local/dev 2022-04-20 19:33:17 +02:00
config.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
env.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
exceptions.py Tutor v3 complete rewrite 2019-02-09 20:30:01 +01:00
fmt.py feat: upgrade to Maple 2021-12-20 21:21:36 +01:00
images.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
interactive.py feat: introduce tutor dev quickstart 2022-04-19 16:53:57 +02:00
jobs.py refactor: get rid of the openedx Docker entrypoint 2022-04-15 15:37:56 +02:00
serialize.py fix: YamlParamType supports line terminators 2021-04-25 09:14:21 +02:00
types.py feat: migrate to plugins.v1 with filters & actions 2022-04-15 15:30:54 +02:00
utils.py chore: fix various linting warnings in f-strings and docs 2022-02-25 14:50:36 +01:00