From 4fdbe2a9a5ea8775c45f33b0625894951b20791a Mon Sep 17 00:00:00 2001 From: Paulo Viadanna Date: Thu, 6 Feb 2025 14:51:22 -0300 Subject: [PATCH] feat: add MEILISEARCH_STORAGE_SIZE configuration --- docs/configuration.rst | 4 ++++ tutor/templates/config/defaults.yml | 1 + tutor/templates/k8s/volumes.yml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 711fde2734..603971fffd 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -237,11 +237,15 @@ Meilisearch - ``MEILISEARCH_MASTER_KEY`` (default: ``"{{ 24|random_string }}"``) - ``MEILISEARCH_API_KEY_UID`` (default: ``"{{ 4|uuid }}"``): UID used to sign the API key. - ``MEILISEARCH_API_KEY`` (default: ``"{{ MEILISEARCH_MASTER_KEY|uid_master_hash(MEILISEARCH_API_KEY_UID) }}"``) +- ``MEILISEARCH_STORAGE_SIZE`` (default: ``"5Gi"``): amount of persistent storage allocated. To reset the Meilisearch API key, make sure to unset both the API key and it's UID: tutor config save --unset MEILISEARCH_API_KEY_UID MEILISEARCH_API_KEY +.. note:: + Tutor does not support changing the storage size after it has been deployed. You'll have to manually resize the `pvc/meilisearch` using `kubectl`. Also note that it's not possible to reduce a `PVC` size, it must be deleted and recreated in such cases. + MongoDB ******* diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index aa8bd9ab9a..a9aad6f896 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -41,6 +41,7 @@ LOCAL_PROJECT_NAME: "{{ TUTOR_APP }}_local" MEILISEARCH_URL: "http://meilisearch:7700" MEILISEARCH_PUBLIC_URL: "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://meilisearch.{{ LMS_HOST }}" MEILISEARCH_INDEX_PREFIX: "tutor_" +MEILISEARCH_STORAGE_SIZE: "5Gi" MONGODB_AUTH_MECHANISM: "" MONGODB_AUTH_SOURCE: "admin" MONGODB_HOST: "mongodb" diff --git a/tutor/templates/k8s/volumes.yml b/tutor/templates/k8s/volumes.yml index aa31555ba0..f7cde4b5b1 100644 --- a/tutor/templates/k8s/volumes.yml +++ b/tutor/templates/k8s/volumes.yml @@ -28,7 +28,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 5Gi + storage: {{ MEILISEARCH_STORAGE_SIZE }} {% endif %} {% if RUN_MONGODB %} ---