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

feat: Add config parameters for k8s volume sizes #675

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Every user-facing change should have an entry in this changelog. Please respect

## Unreleased

- [Improvement] Make it possible to set volume sizes for Caddy, ElasticSearch, MongoDB, MySQL,and Redis services in Kubernetes. (by @foadlind)
- [Fix] Ignore Python plugins that cannot be loaded. (by @regisb)
- [Improvement] Faster and more reliable builds with `npm clean-install` instead of `npm install`. (by @regisb. Thanks @ghassanmas!)
- [Fix] Fix 500 error during studio login. (by @regisb)
Expand Down
5 changes: 5 additions & 0 deletions tutor/templates/config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ JWT_COMMON_AUDIENCE: "openedx"
JWT_COMMON_ISSUER: "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/oauth2"
JWT_COMMON_SECRET_KEY: "{{ OPENEDX_SECRET_KEY }}"
K8S_NAMESPACE: "openedx"
K8S_CADDY_VOLUME_SIZE: "1Gi"
K8S_ELASTICSEARCH_VOLUME_SIZE: "2Gi"
K8S_MONGODB_VOLUME_SIZE: "5Gi"
K8S_MYSQL_VOLUME_SIZE: "5Gi"
K8S_REDIS_VOLUME_SIZE: "1Gi"
LANGUAGE_CODE: "en"
LMS_HOST: "www.myopenedx.com"
LOCAL_PROJECT_NAME: "{{ TUTOR_APP }}_local"
Expand Down
10 changes: 5 additions & 5 deletions tutor/templates/k8s/volumes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ K8S_CADDY_VOLUME_SIZE }}
{% endif %}
{% if RUN_ELASTICSEARCH %}
---
Expand All @@ -28,7 +28,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storage: {{ K8S_ELASTICSEARCH_VOLUME_SIZE }}
{% endif %}
{% if RUN_MONGODB %}
---
Expand All @@ -44,7 +44,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storage: {{ K8S_MONGODB_VOLUME_SIZE }}
{% endif %}
{% if RUN_MYSQL %}
---
Expand All @@ -60,7 +60,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storage: {{ K8S_MYSQL_VOLUME_SIZE }}
{% endif %}
{% if RUN_REDIS %}
---
Expand All @@ -76,6 +76,6 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ K8S_REDIS_VOLUME_SIZE }}
{% endif %}
{{ patch("k8s-volumes") }}