diff --git a/.github/ISSUE_TEMPLATE/Support_question.md b/.github/ISSUE_TEMPLATE/Support_question.md index 3f32d2a..1650377 100644 --- a/.github/ISSUE_TEMPLATE/Support_question.md +++ b/.github/ISSUE_TEMPLATE/Support_question.md @@ -9,9 +9,9 @@ We primarily use GitHub as an issue tracker. If however you're encountering an i --- -Please make sure you have read our [main Readme](https://github.com/numerique-gouv/drive). +Please make sure you have read our [main Readme](https://github.com/suitenumerique/find). -Also make sure it was not already answered in [an open or close issue](https://github.com/numerique-gouv/drive/issues). +Also make sure it was not already answered in [an open or close issue](https://github.com/suitenumerique/find/issues). If your question was not covered, and you feel like it should be, fire away! We'd love to improve our docs! 👌 diff --git a/Dockerfile b/Dockerfile index 45bd7fc..980bead 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Django drive +# Django find # ---- base image to inherit from ---- FROM python:3.10-slim-bullseye AS base @@ -24,7 +24,7 @@ RUN mkdir /install && \ # ---- static link collector ---- FROM base AS link-collector -ARG DRIVE_STATIC_ROOT=/data/static +ARG FIND_STATIC_ROOT=/data/static # Install libpangocairo & rdfind RUN apt-get update && \ @@ -36,7 +36,7 @@ RUN apt-get update && \ # Copy installed python dependencies COPY --from=back-builder /install /usr/local -# Copy drive application (see .dockerignore) +# Copy find application (see .dockerignore) COPY ./src/backend /app/ WORKDIR /app @@ -47,7 +47,7 @@ RUN DJANGO_CONFIGURATION=Build DJANGO_JWT_PRIVATE_SIGNING_KEY=Dummy \ # Replace duplicated file by a symlink to decrease the overall size of the # final image -RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${DRIVE_STATIC_ROOT} +RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${FIND_STATIC_ROOT} # ---- Core application image ---- FROM base AS core @@ -77,7 +77,7 @@ RUN chmod g=u /etc/passwd # Copy installed python dependencies COPY --from=back-builder /install /usr/local -# Copy drive application (see .dockerignore) +# Copy find application (see .dockerignore) COPY ./src/backend /app/ WORKDIR /app @@ -98,9 +98,9 @@ RUN apt-get update && \ apt-get install -y postgresql-client && \ rm -rf /var/lib/apt/lists/* -# Uninstall drive and re-install it in editable mode along with development +# Uninstall find and re-install it in editable mode along with development # dependencies -RUN pip uninstall -y drive +RUN pip uninstall -y find RUN pip install -e .[dev] # Restore the un-privileged user running the application @@ -118,21 +118,21 @@ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] # ---- Production image ---- FROM core AS backend-production -ARG DRIVE_STATIC_ROOT=/data/static +ARG FIND_STATIC_ROOT=/data/static # Gunicorn RUN mkdir -p /usr/local/etc/gunicorn -COPY docker/files/usr/local/etc/gunicorn/drive.py /usr/local/etc/gunicorn/drive.py +COPY docker/files/usr/local/etc/gunicorn/find.py /usr/local/etc/gunicorn/find.py # Un-privileged user running the application ARG DOCKER_USER USER ${DOCKER_USER} # Copy statics -COPY --from=link-collector ${DRIVE_STATIC_ROOT} ${DRIVE_STATIC_ROOT} +COPY --from=link-collector ${FIND_STATIC_ROOT} ${FIND_STATIC_ROOT} -# Copy drive mails +# Copy find mails COPY --from=mail-builder /mail/backend/core/templates/mail /app/core/templates/mail -# The default command runs gunicorn WSGI server in drive's main module -CMD ["gunicorn", "-c", "/usr/local/etc/gunicorn/drive.py", "drive.wsgi:application"] +# The default command runs gunicorn WSGI server in find's main module +CMD ["gunicorn", "-c", "/usr/local/etc/gunicorn/find.py", "find.wsgi:application"] diff --git a/Makefile b/Makefile index 2462b7c..582fa46 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,7 @@ bootstrap: \ build \ migrate \ demo \ + back-i18n-generate \ back-i18n-compile .PHONY: bootstrap @@ -151,14 +152,14 @@ test-back-parallel: ## run all back-end tests in parallel bin/pytest -n auto $${args:-${1}} .PHONY: test-back-parallel -makemigrations: ## run django makemigrations for the drive project. +makemigrations: ## run django makemigrations for the find project. @echo "$(BOLD)Running makemigrations$(RESET)" @$(COMPOSE) up -d postgresql @$(WAIT_DB) @$(MANAGE) makemigrations .PHONY: makemigrations -migrate: ## run django migrations for the drive project. +migrate: ## run django migrations for the find project. @echo "$(BOLD)Running migrations$(RESET)" @$(COMPOSE) up -d postgresql @$(WAIT_DB) @@ -197,15 +198,15 @@ resetdb: ## flush database and create a superuser "admin" .PHONY: resetdb env.d/development/common: - cp -n env.d/development/common.dist env.d/development/common + cp --update=none env.d/development/common.dist env.d/development/common env.d/development/postgresql: - cp -n env.d/development/postgresql.dist env.d/development/postgresql + cp --update=none env.d/development/postgresql.dist env.d/development/postgresql # -- Internationalization env.d/development/crowdin: - cp -n env.d/development/crowdin.dist env.d/development/crowdin + cp --update=none env.d/development/crowdin.dist env.d/development/crowdin crowdin-download: ## Download translated message from crowdin @$(COMPOSE_RUN_CROWDIN) download -c crowdin/config.yml @@ -249,7 +250,7 @@ clean: ## restore repository state as it was freshly cloned .PHONY: clean help: - @echo "$(BOLD)drive Makefile" + @echo "$(BOLD)find Makefile" @echo "Please use 'make $(BOLD)target$(RESET)' where $(BOLD)target$(RESET) is one of:" @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(GREEN)%-30s$(RESET) %s\n", $$1, $$2}' .PHONY: help diff --git a/README.md b/README.md index fcdcd83..29a6cde 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Drive +# Find -Drive can index documents from several applications sharing a common OIDC federation +Find can index documents from several applications sharing a common OIDC federation and allows users to search documents with their access rights accross all applications in the federation. -Drive is built on top of [Django Rest +Find is built on top of [Django Rest Framework](https://www.django-rest-framework.org/). ## Getting started @@ -16,14 +16,15 @@ Compose](https://docs.docker.com/compose/install) installed on your laptop: ```bash $ docker -v - Docker version 20.10.2, build 2291f61 + Docker version 27.4.1, build b9d17ea -$ docker compose -v - docker compose version 1.27.4, build 40524192 +$ docker compose version + Docker Compose version v2.32.1 ``` > ⚠️ You may need to run the following commands with `sudo` but this can be -> avoided by assigning your user to the `docker` group. +> avoided by assigning your user to the `docker` group. See docker +> [Documentation](https://docs.docker.com/engine/install/linux-postinstall/) ### Project bootstrap diff --git a/bin/Tiltfile b/bin/Tiltfile index 909cb51..705a658 100644 --- a/bin/Tiltfile +++ b/bin/Tiltfile @@ -1,9 +1,9 @@ load('ext://uibutton', 'cmd_button', 'bool_input', 'location') load('ext://namespace', 'namespace_create', 'namespace_inject') -namespace_create('drive') +namespace_create('find') docker_build( - 'localhost:5001/drive-backend:latest', + 'localhost:5001/find-backend:latest', context='..', dockerfile='../Dockerfile', only=['./src/backend', './docker'], @@ -18,27 +18,28 @@ docker_build( ) docker_build( - 'localhost:5001/drive-frontend:latest', + 'localhost:5001/find-frontend:latest', context='..', dockerfile='../src/frontend/Dockerfile', only=['./src/frontend', './docker', './.dockerignore'], - target = 'drive', + target = 'find', live_update=[ sync('../src/frontend', '/home/frontend'), ] ) -k8s_yaml(local('cd ../src/helm && helmfile -n drive -e dev template .')) + +k8s_yaml(local('cd ../src/helm && helmfile -n find -e dev template .')) migration = ''' set -eu # get k8s pod name from tilt resource name -POD_NAME="$(tilt get kubernetesdiscovery drive-backend -ojsonpath='{.status.pods[0].name}')" -kubectl -n drive exec "$POD_NAME" -- python manage.py makemigrations +POD_NAME="$(tilt get kubernetesdiscovery find-backend -ojsonpath='{.status.pods[0].name}')" +kubectl -n find exec "$POD_NAME" -- python manage.py makemigrations ''' cmd_button('Make migration', argv=['sh', '-c', migration], - resource='drive-backend', + resource='find-backend', icon_name='developer_board', text='Run makemigration', ) @@ -46,12 +47,12 @@ cmd_button('Make migration', pod_migrate = ''' set -eu # get k8s pod name from tilt resource name -POD_NAME="$(tilt get kubernetesdiscovery drive-backend -ojsonpath='{.status.pods[0].name}')" -kubectl -n drive exec "$POD_NAME" -- python manage.py migrate --no-input +POD_NAME="$(tilt get kubernetesdiscovery find-backend -ojsonpath='{.status.pods[0].name}')" +kubectl -n find exec "$POD_NAME" -- python manage.py migrate --no-input ''' cmd_button('Migrate db', argv=['sh', '-c', pod_migrate], - resource='drive-backend', + resource='find-backend', icon_name='developer_board', text='Run database migration', ) diff --git a/bin/_config.sh b/bin/_config.sh index e8e6c80..e53c02a 100644 --- a/bin/_config.sh +++ b/bin/_config.sh @@ -6,7 +6,7 @@ REPO_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd)" UNSET_USER=0 COMPOSE_FILE="${REPO_DIR}/docker-compose.yml" -COMPOSE_PROJECT="drive" +COMPOSE_PROJECT="find" # _set_user: set (or unset) default user id used to run docker commands diff --git a/bin/update_openapi_schema b/bin/update_openapi_schema index 4b684f7..bef9da6 100755 --- a/bin/update_openapi_schema +++ b/bin/update_openapi_schema @@ -7,6 +7,6 @@ _dc_run \ app \ python manage.py spectacular \ --api-version 'v1.0' \ - --urlconf 'drive.api_urls' \ + --urlconf 'find.api_urls' \ --format openapi-json \ --file /app/core/tests/swagger/swagger.json diff --git a/crowdin/config.yml b/crowdin/config.yml index 80a760d..5056eb7 100644 --- a/crowdin/config.yml +++ b/crowdin/config.yml @@ -17,13 +17,13 @@ preserve_hierarchy: true files: [ { source : "/backend/locale/django.pot", - dest: "/backend-drive.pot", + dest: "/backend-find.pot", translation : "/backend/locale/%locale_with_underscore%/LC_MESSAGES/django.po" }, { - source: "/frontend/packages/i18n/locales/drive/translations-crowdin.json", - dest: "/frontend-drive.json", - translation: "/frontend/packages/i18n/locales/drive/%two_letters_code%/translations.json", + source: "/frontend/packages/i18n/locales/find/translations-crowdin.json", + dest: "/frontend-find.json", + translation: "/frontend/packages/i18n/locales/find/%two_letters_code%/translations.json", skip_untranslated_strings: true, }, ] diff --git a/docker-compose.yml b/docker-compose.yml index 39c982b..ab3b808 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - discovery.type=single-node - plugins.security.disabled=true - plugins.security.ssl.http.enabled=false - - OPENSEARCH_INITIAL_ADMIN_PASSWORD=drive.PASS123 + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=find.PASS123 ulimits: memlock: soft: -1 @@ -43,7 +43,7 @@ services: args: DOCKER_USER: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000} - image: drive:backend-development + image: find:backend-development environment: - PYLINTHOME=/app/.pylint.d - DJANGO_CONFIGURATION=Development @@ -62,8 +62,8 @@ services: celery: user: ${DOCKER_USER:-1000} - image: drive:backend-development - command: ["celery", "-A", "drive.celery_app", "worker", "-l", "DEBUG"] + image: find:backend-development + command: ["celery", "-A", "find.celery_app", "worker", "-l", "DEBUG"] environment: - DJANGO_CONFIGURATION=Development env_file: diff --git a/docker/files/usr/local/bin/entrypoint b/docker/files/usr/local/bin/entrypoint index c849a92..12b3fca 100755 --- a/docker/files/usr/local/bin/entrypoint +++ b/docker/files/usr/local/bin/entrypoint @@ -13,7 +13,7 @@ # # To pass environment variables, you can either use the -e option of the docker run command: # -# docker run --rm -e USER_NAME=foo -e HOME='/home/foo' drive:latest python manage.py migrate +# docker run --rm -e USER_NAME=foo -e HOME='/home/foo' find:latest python manage.py migrate # # or define new variables in an environment file to use with docker or docker compose: # @@ -21,7 +21,7 @@ # USER_NAME=foo # HOME=/home/foo # -# docker run --rm --env-file env.d/production drive:latest python manage.py migrate +# docker run --rm --env-file env.d/production find:latest python manage.py migrate # echo "🐳(entrypoint) creating user running in the container..." diff --git a/docker/files/usr/local/etc/gunicorn/drive.py b/docker/files/usr/local/etc/gunicorn/find.py similarity index 95% rename from docker/files/usr/local/etc/gunicorn/drive.py rename to docker/files/usr/local/etc/gunicorn/find.py index 8b870d5..ae6a001 100644 --- a/docker/files/usr/local/etc/gunicorn/drive.py +++ b/docker/files/usr/local/etc/gunicorn/find.py @@ -1,6 +1,6 @@ # Gunicorn-django settings bind = ["0.0.0.0:8000"] -name = "drive" +name = "find" python_path = "/app" # Run diff --git a/env.d/development/common.dist b/env.d/development/common.dist index b118e83..52665f4 100644 --- a/env.d/development/common.dist +++ b/env.d/development/common.dist @@ -1,28 +1,28 @@ # Django DJANGO_ALLOWED_HOSTS=* DJANGO_SECRET_KEY=ThisIsAnExampleKeyForDevPurposeOnly -DJANGO_SETTINGS_MODULE=drive.settings +DJANGO_SETTINGS_MODULE=find.settings DJANGO_SUPERUSER_PASSWORD=admin # Python PYTHONPATH=/app -# drive settings +# find settings # Backend url -DRIVE_BASE_URL="http://localhost:8072" +FIND_BASE_URL="http://localhost:8072" # Opensearch -OPENSEARCH_PASSWORD=drive.PASS123 +OPENSEARCH_PASSWORD=find.PASS123 OPENSEARCH_USE_SSL=false # OIDC -OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/drive/protocol/openid-connect/certs -OIDC_OP_AUTHORIZATION_ENDPOINT=http://localhost:8083/realms/drive/protocol/openid-connect/auth -OIDC_OP_TOKEN_ENDPOINT=http://nginx:8083/realms/drive/protocol/openid-connect/token -OIDC_OP_USER_ENDPOINT=http://nginx:8083/realms/drive/protocol/openid-connect/userinfo +OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/find/protocol/openid-connect/certs +OIDC_OP_AUTHORIZATION_ENDPOINT=http://localhost:8083/realms/find/protocol/openid-connect/auth +OIDC_OP_TOKEN_ENDPOINT=http://nginx:8083/realms/find/protocol/openid-connect/token +OIDC_OP_USER_ENDPOINT=http://nginx:8083/realms/find/protocol/openid-connect/userinfo -OIDC_RP_CLIENT_ID=drive +OIDC_RP_CLIENT_ID=find OIDC_RP_CLIENT_SECRET=ThisIsAnExampleKeyForDevPurposeOnly OIDC_RP_SIGN_ALGO=RS256 OIDC_RP_SCOPES="openid email" diff --git a/env.d/development/postgresql.dist b/env.d/development/postgresql.dist index 21f03ea..221b0f6 100644 --- a/env.d/development/postgresql.dist +++ b/env.d/development/postgresql.dist @@ -1,11 +1,11 @@ # Postgresql db container configuration -POSTGRES_DB=drive +POSTGRES_DB=find POSTGRES_USER=dinum POSTGRES_PASSWORD=pass # App database configuration DB_HOST=postgresql -DB_NAME=drive +DB_NAME=find DB_USER=dinum DB_PASSWORD=pass -DB_PORT=5432 \ No newline at end of file +DB_PORT=5432 diff --git a/src/backend/MANIFEST.in b/src/backend/MANIFEST.in index d55d1c4..bde72dc 100644 --- a/src/backend/MANIFEST.in +++ b/src/backend/MANIFEST.in @@ -1,3 +1,3 @@ include LICENSE include README.md -recursive-include src/backend/drive *.html *.png *.gif *.css *.ico *.jpg *.jpeg *.po *.mo *.eot *.svg *.ttf *.woff *.woff2 +recursive-include src/backend/find *.html *.png *.gif *.css *.ico *.jpg *.jpeg *.po *.mo *.eot *.svg *.ttf *.woff *.woff2 diff --git a/src/backend/core/admin.py b/src/backend/core/admin.py index b637411..4f94a47 100644 --- a/src/backend/core/admin.py +++ b/src/backend/core/admin.py @@ -1,4 +1,4 @@ -"""Admin config for drive's core app""" +"""Admin config for find's core app""" from django.contrib import admin from .models import Service diff --git a/src/backend/core/enums.py b/src/backend/core/enums.py index 5618c66..b77a63d 100644 --- a/src/backend/core/enums.py +++ b/src/backend/core/enums.py @@ -1,4 +1,4 @@ -"""Enums for drive's core app.""" +"""Enums for find's core app.""" RELEVANCE = "relevance" diff --git a/src/backend/core/factories.py b/src/backend/core/factories.py index f112f2b..f61d909 100644 --- a/src/backend/core/factories.py +++ b/src/backend/core/factories.py @@ -1,4 +1,4 @@ -"""Factories for the drive's core app""" +"""Factories for the find's core app""" from uuid import uuid4 diff --git a/src/backend/core/migrations/0001_initial.py b/src/backend/core/migrations/0001_initial.py index 7c72745..8b13fc2 100644 --- a/src/backend/core/migrations/0001_initial.py +++ b/src/backend/core/migrations/0001_initial.py @@ -27,7 +27,7 @@ class Migration(migrations.Migration): options={ 'verbose_name': 'service', 'verbose_name_plural': 'services', - 'db_table': 'drive_service', + 'db_table': 'find_service', 'ordering': ['-is_active', '-created_at'], }, ), diff --git a/src/backend/core/models.py b/src/backend/core/models.py index 9a0dc46..4766a14 100644 --- a/src/backend/core/models.py +++ b/src/backend/core/models.py @@ -1,4 +1,4 @@ -"""Models for drive's core app""" +"""Models for find's core app""" import secrets import string @@ -13,11 +13,11 @@ TOKEN_LENGTH = 50 class User(AbstractUser): - """User for the drive application""" + """User for the find application""" class Service(models.Model): - """Service registered to index its documents to our drive""" + """Service registered to index its documents to our find""" name = models.SlugField(max_length=20, unique=True) token = models.CharField(max_length=TOKEN_LENGTH) @@ -25,7 +25,7 @@ class Service(models.Model): is_active = models.BooleanField(default=True) class Meta: - db_table = "drive_service" + db_table = "find_service" verbose_name = _("service") verbose_name_plural = _("services") ordering = ["-is_active", "-created_at"] @@ -55,4 +55,4 @@ class Service(models.Model): @property def index_name(self): """Compute index name from service name""" - return f"drive-{self.name:s}" + return f"find-{self.name:s}" diff --git a/src/backend/core/permissions.py b/src/backend/core/permissions.py index cee7f92..224a308 100644 --- a/src/backend/core/permissions.py +++ b/src/backend/core/permissions.py @@ -1,4 +1,4 @@ -"""Permission classes for drive's core app""" +"""Permission classes for find's core app""" from rest_framework import permissions diff --git a/src/backend/core/tests/test_models_services.py b/src/backend/core/tests/test_models_services.py index 908c71c..744286e 100644 --- a/src/backend/core/tests/test_models_services.py +++ b/src/backend/core/tests/test_models_services.py @@ -1,4 +1,4 @@ -"""Tests Service model for drive's core app.""" +"""Tests Service model for find's core app.""" from django.db import DataError, IntegrityError @@ -26,7 +26,7 @@ def test_models_services_name_slugified(): def test_models_services_index_name(): """The index name should be computed as a property from the service name.""" service = factories.ServiceFactory(name="My service name") - assert service.index_name == "drive-my-service-name" + assert service.index_name == "find-my-service-name" def test_models_services_token_50_characters_exact(): diff --git a/src/backend/core/urls.py b/src/backend/core/urls.py index d24a21e..5fb11f3 100644 --- a/src/backend/core/urls.py +++ b/src/backend/core/urls.py @@ -1,4 +1,4 @@ -"""URL configuration for drive's core app.""" +"""URL configuration for find's core app.""" from django.urls import path from .views import DocumentView diff --git a/src/backend/core/views.py b/src/backend/core/views.py index 051e702..d97570f 100644 --- a/src/backend/core/views.py +++ b/src/backend/core/views.py @@ -1,4 +1,4 @@ -"""Views for drive's core app.""" +"""Views for find's core app.""" from pydantic import ValidationError as PydanticValidationError from rest_framework import status, views from rest_framework.response import Response @@ -35,7 +35,7 @@ class DocumentView(views.APIView): @property def index_name(self): """Compute index name from the service name extracted during authentication""" - return f"drive-{self.request.auth}" + return f"find-{self.request.auth}" # pylint: disable=too-many-locals def post(self, request, *args, **kwargs): @@ -46,7 +46,7 @@ class DocumentView(views.APIView): the following scenarios based on the type of request data: 1. **Single Document Indexing**: If the request contains a single document (as a - dictionary), it will be indexed into an OpenSearch index named `drive-{auth_token}`. + dictionary), it will be indexed into an OpenSearch index named `find-{auth_token}`. On success, the indexed document is returned with a `201 Created` status. If an error occurs, a `400 Bad Request` response with an error message is returned. diff --git a/src/backend/demo/management/commands/create_demo.py b/src/backend/demo/management/commands/create_demo.py index 5ba9c44..997c636 100644 --- a/src/backend/demo/management/commands/create_demo.py +++ b/src/backend/demo/management/commands/create_demo.py @@ -20,7 +20,7 @@ from demo import defaults fake = Faker() -logger = logging.getLogger("drive.commands.demo.create_demo") +logger = logging.getLogger("find.commands.demo.create_demo") class BulkIndexing: diff --git a/src/backend/drive/__init__.py b/src/backend/find/__init__.py similarity index 100% rename from src/backend/drive/__init__.py rename to src/backend/find/__init__.py diff --git a/src/backend/drive/celery_app.py b/src/backend/find/celery_app.py similarity index 82% rename from src/backend/drive/celery_app.py rename to src/backend/find/celery_app.py index ac81604..d77ffcb 100644 --- a/src/backend/drive/celery_app.py +++ b/src/backend/find/celery_app.py @@ -1,16 +1,16 @@ -"""Drive celery configuration file.""" +"""find celery configuration file.""" import os from celery import Celery from configurations.importer import install # Set the default Django settings module for the 'celery' program. -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drive.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "find.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") install(check_options=True) -app = Celery("drive") +app = Celery("find") # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. diff --git a/src/backend/drive/settings.py b/src/backend/find/settings.py similarity index 97% rename from src/backend/drive/settings.py rename to src/backend/find/settings.py index 79a859a..7711194 100755 --- a/src/backend/drive/settings.py +++ b/src/backend/find/settings.py @@ -1,5 +1,5 @@ """ -Django settings for drive project. +Django settings for find project. Generated by 'django-admin startproject' using Django 3.1.5. @@ -72,8 +72,8 @@ class Base(Configuration): SECRET_KEY = values.Value(None) # Application definition - ROOT_URLCONF = "drive.urls" - WSGI_APPLICATION = "drive.wsgi.application" + ROOT_URLCONF = "find.urls" + WSGI_APPLICATION = "find.wsgi.application" # Database DATABASES = { @@ -83,7 +83,7 @@ class Base(Configuration): environ_name="DB_ENGINE", environ_prefix=None, ), - "NAME": values.Value("drive", environ_name="DB_NAME", environ_prefix=None), + "NAME": values.Value("find", environ_name="DB_NAME", environ_prefix=None), "USER": values.Value("dinum", environ_name="DB_USER", environ_prefix=None), "PASSWORD": values.Value( "pass", environ_name="DB_PASSWORD", environ_prefix=None @@ -181,7 +181,7 @@ class Base(Configuration): # Django applications from the highest priority to the lowest INSTALLED_APPS = [ - # drive + # find "core", "demo", # Third party apps @@ -242,8 +242,8 @@ class Base(Configuration): ) SPECTACULAR_SETTINGS = { - "TITLE": "Drive API", - "DESCRIPTION": "This is the drive API schema.", + "TITLE": "Find API", + "DESCRIPTION": "This is the find API schema.", "VERSION": "0.1.0", "SERVE_INCLUDE_SCHEMA": False, "ENABLE_DJANGO_DEPLOY_CHECK": values.BooleanValue( @@ -286,7 +286,7 @@ class Base(Configuration): "RS256", environ_name="OIDC_RP_SIGN_ALGO", environ_prefix=None ) OIDC_RP_CLIENT_ID = values.Value( - "drive", environ_name="OIDC_RP_CLIENT_ID", environ_prefix=None + "find", environ_name="OIDC_RP_CLIENT_ID", environ_prefix=None ) OIDC_RP_CLIENT_SECRET = values.Value( None, @@ -408,7 +408,7 @@ class Development(Base): CSRF_TRUSTED_ORIGINS = ["http://localhost:8072", "http://localhost:3000"] DEBUG = True - SESSION_COOKIE_NAME = "drive_sessionid" + SESSION_COOKIE_NAME = "find_sessionid" USE_SWAGGER = True @@ -430,7 +430,7 @@ class Test(Base): }, }, "loggers": { - "drive": { + "find": { "handlers": ["console"], "level": "DEBUG", }, diff --git a/src/backend/drive/urls.py b/src/backend/find/urls.py similarity index 95% rename from src/backend/drive/urls.py rename to src/backend/find/urls.py index 1040740..728c03d 100644 --- a/src/backend/drive/urls.py +++ b/src/backend/find/urls.py @@ -1,4 +1,4 @@ -"""URL configuration for the drive project""" +"""URL configuration for the find project""" from django.conf import settings from django.contrib import admin diff --git a/src/backend/drive/wsgi.py b/src/backend/find/wsgi.py similarity index 77% rename from src/backend/drive/wsgi.py rename to src/backend/find/wsgi.py index a021ef2..eacedc6 100644 --- a/src/backend/drive/wsgi.py +++ b/src/backend/find/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for the drive project. +WSGI config for the find project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,7 +11,7 @@ import os from configurations.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drive.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "find.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") application = get_wsgi_application() diff --git a/src/backend/manage.py b/src/backend/manage.py index 34c7eb4..b50269d 100644 --- a/src/backend/manage.py +++ b/src/backend/manage.py @@ -1,12 +1,12 @@ #!/usr/bin/env python """ -drive's sandbox management script. +find's sandbox management script. """ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drive.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "find.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") from configurations.management import execute_from_command_line diff --git a/src/backend/pyproject.toml b/src/backend/pyproject.toml index 1a847d2..734f75c 100644 --- a/src/backend/pyproject.toml +++ b/src/backend/pyproject.toml @@ -1,12 +1,12 @@ # -# drive package +# find package # [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] -name = "drive" +name = "find" version = "1.1.0" authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }] classifiers = [ @@ -48,10 +48,10 @@ dependencies = [ ] [project.urls] -"Bug Tracker" = "https://github.com/numerique-gouv/drive/issues/new" -"Changelog" = "https://github.com/numerique-gouv/drive/blob/main/CHANGELOG.md" -"Homepage" = "https://github.com/numerique-gouv/drive" -"Repository" = "https://github.com/numerique-gouv/drive" +"Bug Tracker" = "https://github.com/suitenumerique/find/issues/new" +"Changelog" = "https://github.com/suitenumerique/find/blob/main/CHANGELOG.md" +"Homepage" = "https://github.com/suitenumerique/find" +"Repository" = "https://github.com/suitenumerique/find" [project.optional-dependencies] dev = [ @@ -112,8 +112,8 @@ select = [ ] [tool.ruff.lint.isort] -section-order = ["future","standard-library","django","third-party","drive","first-party","local-folder"] -sections = { drive=["core"], django=["django"] } +section-order = ["future","standard-library","django","third-party","find","first-party","local-folder"] +sections = { find=["core"], django=["django"] } [tool.ruff.per-file-ignores] "**/tests/*" = ["S", "SLF"] diff --git a/src/backend/setup.py b/src/backend/setup.py index 5573f43..fb3b9cb 100644 --- a/src/backend/setup.py +++ b/src/backend/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -"""Setup file for the drive module. All configuration stands in the setup.cfg file.""" +"""Setup file for the find module. All configuration stands in the setup.cfg file.""" # coding: utf-8 from setuptools import setup diff --git a/src/helm/env.d/dev/values.drive.yaml.gotmpl b/src/helm/env.d/dev/values.find.yaml.gotmpl similarity index 72% rename from src/helm/env.d/dev/values.drive.yaml.gotmpl rename to src/helm/env.d/dev/values.find.yaml.gotmpl index 74b6901..1e849d1 100644 --- a/src/helm/env.d/dev/values.drive.yaml.gotmpl +++ b/src/helm/env.d/dev/values.find.yaml.gotmpl @@ -1,16 +1,16 @@ image: - repository: localhost:5001/drive-backend + repository: localhost:5001/find-backend pullPolicy: Always tag: "latest" backend: replicas: 1 envVars: - DJANGO_CSRF_TRUSTED_ORIGINS: https://drive.127.0.0.1.nip.io,http://drive.127.0.0.1.nip.io + DJANGO_CSRF_TRUSTED_ORIGINS: https://find.127.0.0.1.nip.io,http://find.127.0.0.1.nip.io DJANGO_CONFIGURATION: Production DJANGO_ALLOWED_HOSTS: "*" DJANGO_SECRET_KEY: {{ .Values.djangoSecretKey }} - DJANGO_SETTINGS_MODULE: drive.settings + DJANGO_SETTINGS_MODULE: find.settings DJANGO_SUPERUSER_PASSWORD: admin DJANGO_EMAIL_HOST: "mailcatcher" DJANGO_EMAIL_PORT: 1025 @@ -24,17 +24,17 @@ backend: OIDC_RP_CLIENT_SECRET: {{ .Values.oidc.clientSecret }} OIDC_RP_SIGN_ALGO: RS256 OIDC_RP_SCOPES: "openid email" - OIDC_REDIRECT_ALLOWED_HOSTS: https://drive.127.0.0.1.nip.io + OIDC_REDIRECT_ALLOWED_HOSTS: https://find.127.0.0.1.nip.io OIDC_AUTH_REQUEST_EXTRA_PARAMS: "{'acr_values': 'eidas1'}" - LOGIN_REDIRECT_URL: https://drive.127.0.0.1.nip.io - LOGIN_REDIRECT_URL_FAILURE: https://drive.127.0.0.1.nip.io - LOGOUT_REDIRECT_URL: https://drive.127.0.0.1.nip.io + LOGIN_REDIRECT_URL: https://find.127.0.0.1.nip.io + LOGIN_REDIRECT_URL_FAILURE: https://find.127.0.0.1.nip.io + LOGOUT_REDIRECT_URL: https://find.127.0.0.1.nip.io DB_HOST: postgres-postgresql - DB_NAME: drive + DB_NAME: find DB_USER: dinum DB_PASSWORD: pass DB_PORT: 5432 - POSTGRES_DB: drive + POSTGRES_DB: find POSTGRES_USER: dinum POSTGRES_PASSWORD: pass REDIS_URL: redis://default:pass@redis-master:6379/1 @@ -52,8 +52,8 @@ backend: command: - "gunicorn" - "-c" - - "/usr/local/etc/gunicorn/drive.py" - - "drive.wsgi:application" + - "/usr/local/etc/gunicorn/find.py" + - "find.wsgi:application" - "--reload" createsuperuser: @@ -67,8 +67,8 @@ backend: frontend: envVars: PORT: 8080 - NEXT_PUBLIC_API_ORIGIN: https://drive.127.0.0.1.nip.io - NEXT_PUBLIC_SIGNALING_URL: wss://drive.127.0.0.1.nip.io/ws + NEXT_PUBLIC_API_ORIGIN: https://find.127.0.0.1.nip.io + NEXT_PUBLIC_SIGNALING_URL: wss://find.127.0.0.1.nip.io/ws replicas: 1 command: @@ -76,14 +76,14 @@ frontend: - dev image: - repository: localhost:5001/drive-frontend + repository: localhost:5001/find-frontend pullPolicy: Always tag: "latest" ingress: enabled: true - host: drive.127.0.0.1.nip.io + host: find.127.0.0.1.nip.io ingressAdmin: enabled: true - host: drive.127.0.0.1.nip.io + host: find.127.0.0.1.nip.io diff --git a/src/helm/env.d/preprod/values.drive.yaml.gotmpl b/src/helm/env.d/preprod/values.find.yaml.gotmpl similarity index 82% rename from src/helm/env.d/preprod/values.drive.yaml.gotmpl rename to src/helm/env.d/preprod/values.find.yaml.gotmpl index f469a46..ec80e9f 100644 --- a/src/helm/env.d/preprod/values.drive.yaml.gotmpl +++ b/src/helm/env.d/preprod/values.find.yaml.gotmpl @@ -1,5 +1,5 @@ image: - repository: lasuite/drive-backend + repository: lasuite/find-backend pullPolicy: Always tag: "v1.1.0" @@ -8,7 +8,7 @@ backend: argocd.argoproj.io/hook: PreSync argocd.argoproj.io/hook-delete-policy: HookSucceeded envVars: - DJANGO_CSRF_TRUSTED_ORIGINS: http://drive-preprod.beta.numerique.gouv.fr,https://drive-preprod.beta.numerique.gouv.fr + DJANGO_CSRF_TRUSTED_ORIGINS: http://find-preprod.beta.numerique.gouv.fr,https://find-preprod.beta.numerique.gouv.fr DJANGO_CONFIGURATION: Production DJANGO_ALLOWED_HOSTS: "*" DJANGO_SUPERUSER_EMAIL: @@ -19,7 +19,7 @@ backend: secretKeyRef: name: backend key: DJANGO_SECRET_KEY - DJANGO_SETTINGS_MODULE: drive.settings + DJANGO_SETTINGS_MODULE: find.settings DJANGO_SUPERUSER_PASSWORD: secretKeyRef: name: backend @@ -43,11 +43,11 @@ backend: key: OIDC_RP_CLIENT_SECRET OIDC_RP_SIGN_ALGO: RS256 OIDC_RP_SCOPES: "openid email" - OIDC_REDIRECT_ALLOWED_HOSTS: https://drive-preprod.beta.numerique.gouv.fr + OIDC_REDIRECT_ALLOWED_HOSTS: https://find-preprod.beta.numerique.gouv.fr OIDC_AUTH_REQUEST_EXTRA_PARAMS: "{'acr_values': 'eidas1'}" - LOGIN_REDIRECT_URL: https://drive-preprod.beta.numerique.gouv.fr - LOGIN_REDIRECT_URL_FAILURE: https://drive-preprod.beta.numerique.gouv.fr - LOGOUT_REDIRECT_URL: https://drive-preprod.beta.numerique.gouv.fr + LOGIN_REDIRECT_URL: https://find-preprod.beta.numerique.gouv.fr + LOGIN_REDIRECT_URL_FAILURE: https://find-preprod.beta.numerique.gouv.fr + LOGOUT_REDIRECT_URL: https://find-preprod.beta.numerique.gouv.fr DB_HOST: secretKeyRef: name: postgresql.postgres.libre.sh @@ -86,19 +86,19 @@ backend: key: url AWS_S3_ENDPOINT_URL: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: url AWS_S3_ACCESS_KEY_ID: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: accessKey AWS_S3_SECRET_ACCESS_KEY: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: secretKey AWS_STORAGE_BUCKET_NAME: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: bucket AWS_S3_REGION_NAME: local STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage @@ -113,13 +113,13 @@ backend: frontend: image: - repository: lasuite/drive-frontend + repository: lasuite/find-frontend pullPolicy: Always tag: "v1.1.0" ingress: enabled: true - host: drive-preprod.beta.numerique.gouv.fr + host: find-preprod.beta.numerique.gouv.fr className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod @@ -129,7 +129,7 @@ ingress: ingressAdmin: enabled: true - host: drive-preprod.beta.numerique.gouv.fr + host: find-preprod.beta.numerique.gouv.fr className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod diff --git a/src/helm/env.d/production/values.drive.yaml.gotmpl b/src/helm/env.d/production/values.find.yaml.gotmpl similarity index 92% rename from src/helm/env.d/production/values.drive.yaml.gotmpl rename to src/helm/env.d/production/values.find.yaml.gotmpl index 781a899..d3a9612 100644 --- a/src/helm/env.d/production/values.drive.yaml.gotmpl +++ b/src/helm/env.d/production/values.find.yaml.gotmpl @@ -1,5 +1,5 @@ image: - repository: lasuite/drive-backend + repository: lasuite/find-backend pullPolicy: Always tag: "v1.1.0" @@ -15,7 +15,7 @@ backend: secretKeyRef: name: backend key: DJANGO_SECRET_KEY - DJANGO_SETTINGS_MODULE: drive.settings + DJANGO_SETTINGS_MODULE: find.settings DJANGO_SUPERUSER_EMAIL: secretKeyRef: name: backend @@ -86,19 +86,19 @@ backend: key: url AWS_S3_ENDPOINT_URL: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: url AWS_S3_ACCESS_KEY_ID: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: accessKey AWS_S3_SECRET_ACCESS_KEY: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: secretKey AWS_STORAGE_BUCKET_NAME: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: bucket AWS_S3_REGION_NAME: local STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage @@ -113,7 +113,7 @@ backend: frontend: image: - repository: lasuite/drive-frontend + repository: lasuite/find-frontend pullPolicy: Always tag: "v1.1.0" diff --git a/src/helm/env.d/staging/values.drive.yaml.gotmpl b/src/helm/env.d/staging/values.find.yaml.gotmpl similarity index 81% rename from src/helm/env.d/staging/values.drive.yaml.gotmpl rename to src/helm/env.d/staging/values.find.yaml.gotmpl index 4af5632..e5a2ba0 100644 --- a/src/helm/env.d/staging/values.drive.yaml.gotmpl +++ b/src/helm/env.d/staging/values.find.yaml.gotmpl @@ -1,5 +1,5 @@ image: - repository: lasuite/drive-backend + repository: lasuite/find-backend pullPolicy: Always tag: "main" @@ -8,14 +8,14 @@ backend: argocd.argoproj.io/hook: PreSync argocd.argoproj.io/hook-delete-policy: HookSucceeded envVars: - DJANGO_CSRF_TRUSTED_ORIGINS: http://drive-staging.beta.numerique.gouv.fr,https://drive-staging.beta.numerique.gouv.fr + DJANGO_CSRF_TRUSTED_ORIGINS: http://find-staging.beta.numerique.gouv.fr,https://find-staging.beta.numerique.gouv.fr DJANGO_CONFIGURATION: Production DJANGO_ALLOWED_HOSTS: "*" DJANGO_SECRET_KEY: secretKeyRef: name: backend key: DJANGO_SECRET_KEY - DJANGO_SETTINGS_MODULE: drive.settings + DJANGO_SETTINGS_MODULE: find.settings DJANGO_SUPERUSER_EMAIL: secretKeyRef: name: backend @@ -43,11 +43,11 @@ backend: key: OIDC_RP_CLIENT_SECRET OIDC_RP_SIGN_ALGO: RS256 OIDC_RP_SCOPES: "openid email" - OIDC_REDIRECT_ALLOWED_HOSTS: https://drive-staging.beta.numerique.gouv.fr + OIDC_REDIRECT_ALLOWED_HOSTS: https://find-staging.beta.numerique.gouv.fr OIDC_AUTH_REQUEST_EXTRA_PARAMS: "{'acr_values': 'eidas1'}" - LOGIN_REDIRECT_URL: https://drive-staging.beta.numerique.gouv.fr - LOGIN_REDIRECT_URL_FAILURE: https://drive-staging.beta.numerique.gouv.fr - LOGOUT_REDIRECT_URL: https://drive-staging.beta.numerique.gouv.fr + LOGIN_REDIRECT_URL: https://find-staging.beta.numerique.gouv.fr + LOGIN_REDIRECT_URL_FAILURE: https://find-staging.beta.numerique.gouv.fr + LOGOUT_REDIRECT_URL: https://find-staging.beta.numerique.gouv.fr DB_HOST: secretKeyRef: name: postgresql.postgres.libre.sh @@ -86,19 +86,19 @@ backend: key: url AWS_S3_ENDPOINT_URL: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: url AWS_S3_ACCESS_KEY_ID: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: accessKey AWS_S3_SECRET_ACCESS_KEY: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: secretKey AWS_STORAGE_BUCKET_NAME: secretKeyRef: - name: drive-media-storage.bucket.libre.sh + name: find-media-storage.bucket.libre.sh key: bucket AWS_S3_REGION_NAME: local STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage @@ -113,20 +113,20 @@ backend: frontend: image: - repository: lasuite/drive-frontend + repository: lasuite/find-frontend pullPolicy: Always tag: "main" ingress: enabled: true - host: drive-staging.beta.numerique.gouv.fr + host: find-staging.beta.numerique.gouv.fr className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod ingressAdmin: enabled: true - host: drive-staging.beta.numerique.gouv.fr + host: find-staging.beta.numerique.gouv.fr className: nginx annotations: cert-manager.io/cluster-issuer: letsencrypt-prod diff --git a/src/helm/extra/Chart.yaml b/src/helm/extra/Chart.yaml index 4dea1bb..b3a1c50 100644 --- a/src/helm/extra/Chart.yaml +++ b/src/helm/extra/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 name: extra -description: A Helm chart to add some manifests to drive +description: A Helm chart to add some manifests to find type: application version: 0.1.0 diff --git a/src/helm/extra/templates/postgresql.yaml b/src/helm/extra/templates/postgresql.yaml index 4812f49..e26e0a3 100644 --- a/src/helm/extra/templates/postgresql.yaml +++ b/src/helm/extra/templates/postgresql.yaml @@ -4,4 +4,4 @@ metadata: name: postgresql namespace: {{ .Release.Namespace | quote }} spec: - database: drive + database: find diff --git a/src/helm/extra/templates/s3.yaml b/src/helm/extra/templates/s3.yaml index 10b108c..bb6d24a 100644 --- a/src/helm/extra/templates/s3.yaml +++ b/src/helm/extra/templates/s3.yaml @@ -1,7 +1,7 @@ apiVersion: core.libre.sh/v1alpha1 kind: Bucket metadata: - name: drive-media-storage + name: find-media-storage namespace: {{ .Release.Namespace | quote }} spec: provider: data diff --git a/src/helm/drive/Chart.yaml b/src/helm/find/Chart.yaml similarity index 80% rename from src/helm/drive/Chart.yaml rename to src/helm/find/Chart.yaml index d9d9f09..14a1907 100644 --- a/src/helm/drive/Chart.yaml +++ b/src/helm/find/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 type: application -name: drive +name: find version: 0.0.1 diff --git a/src/helm/drive/README.md b/src/helm/find/README.md similarity index 96% rename from src/helm/drive/README.md rename to src/helm/find/README.md index 959e9cd..de6908c 100644 --- a/src/helm/drive/README.md +++ b/src/helm/find/README.md @@ -1,4 +1,4 @@ -# Drive helm chart +# Find helm chart ## Parameters @@ -6,8 +6,8 @@ | Name | Description | Value | | ------------------------------------------ | ---------------------------------------------------- | ------------------------ | -| `image.repository` | Repository to use to pull drive's container image | `lasuite/drive-backend` | -| `image.tag` | drive's container tag | `latest` | +| `image.repository` | Repository to use to pull find's container image | `lasuite/find-backend` | +| `image.tag` | find's container tag | `latest` | | `image.pullPolicy` | Container image pull policy | `IfNotPresent` | | `image.credentials.username` | Username for container registry authentication | | | `image.credentials.password` | Password for container registry authentication | | @@ -17,7 +17,7 @@ | `fullnameOverride` | Override the full application name | `""` | | `ingress.enabled` | whether to enable the Ingress or not | `false` | | `ingress.className` | IngressClass to use for the Ingress | `nil` | -| `ingress.host` | Host for the Ingress | `drive.example.com` | +| `ingress.host` | Host for the Ingress | `find.example.com` | | `ingress.path` | Path to use for the Ingress | `/` | | `ingress.hosts` | Additional host to configure for the Ingress | `[]` | | `ingress.tls.enabled` | Weather to enable TLS for the Ingress | `true` | @@ -26,7 +26,7 @@ | `ingress.customBackends` | Add custom backends to ingress | `[]` | | `ingressAdmin.enabled` | whether to enable the Ingress or not | `false` | | `ingressAdmin.className` | IngressClass to use for the Ingress | `nil` | -| `ingressAdmin.host` | Host for the Ingress | `drive.example.com` | +| `ingressAdmin.host` | Host for the Ingress | `find.example.com` | | `ingressAdmin.path` | Path to use for the Ingress | `/admin` | | `ingressAdmin.hosts` | Additional host to configure for the Ingress | `[]` | | `ingressAdmin.tls.enabled` | Weather to enable TLS for the Ingress | `true` | @@ -83,8 +83,8 @@ | Name | Description | Value | | ------------------------------------------------------ | ----------------------------------------------------------------------------------- | ------------------------- | -| `frontend.image.repository` | Repository to use to pull drive's frontend container image | `lasuite/drive-frontend` | -| `frontend.image.tag` | drive's frontend container tag | `latest` | +| `frontend.image.repository` | Repository to use to pull find's frontend container image | `lasuite/find-frontend` | +| `frontend.image.tag` | find's frontend container tag | `latest` | | `frontend.image.pullPolicy` | frontend container image pull policy | `IfNotPresent` | | `frontend.command` | Override the frontend container command | `[]` | | `frontend.args` | Override the frontend container args | `[]` | diff --git a/src/helm/drive/generate-readme.sh b/src/helm/find/generate-readme.sh similarity index 100% rename from src/helm/drive/generate-readme.sh rename to src/helm/find/generate-readme.sh diff --git a/src/helm/drive/templates/_helpers.tpl b/src/helm/find/templates/_helpers.tpl similarity index 67% rename from src/helm/drive/templates/_helpers.tpl rename to src/helm/find/templates/_helpers.tpl index 18518d7..493ad13 100644 --- a/src/helm/drive/templates/_helpers.tpl +++ b/src/helm/find/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "drive.name" -}} +{{- define "find.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "drive.fullname" -}} +{{- define "find.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "drive.chart" -}} +{{- define "find.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* -drive.labels +find.labels */}} -{{- define "drive.labels" -}} -helm.sh/chart: {{ include "drive.chart" . }} -{{ include "drive.selectorLabels" . }} +{{- define "find.labels" -}} +helm.sh/chart: {{ include "find.chart" . }} +{{ include "find.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,14 +45,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "drive.selectorLabels" -}} -app.kubernetes.io/name: {{ include "drive.name" . }} +{{- define "find.selectorLabels" -}} +app.kubernetes.io/name: {{ include "find.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* transform dictionnary of environment variables -Usage : {{ include "drive.env.transformDict" .Values.envVars }} +Usage : {{ include "find.env.transformDict" .Values.envVars }} Example: envVars: @@ -69,7 +69,7 @@ envVars: name: secret-name key: "key_in_secret" */}} -{{- define "drive.env.transformDict" -}} +{{- define "find.env.transformDict" -}} {{- range $key, $value := . }} - name: {{ $key | quote }} {{- if $value | kindIs "map" }} @@ -82,12 +82,12 @@ envVars: {{/* -drive env vars +find env vars */}} -{{- define "drive.common.env" -}} +{{- define "find.common.env" -}} {{- $topLevelScope := index . 0 -}} {{- $workerScope := index . 1 -}} -{{- include "drive.env.transformDict" $workerScope.envVars -}} +{{- include "find.env.transformDict" $workerScope.envVars -}} {{- end }} {{/* @@ -95,10 +95,10 @@ Common labels Requires array with top level scope and component name */}} -{{- define "drive.common.labels" -}} +{{- define "find.common.labels" -}} {{- $topLevelScope := index . 0 -}} {{- $component := index . 1 -}} -{{- include "drive.labels" $topLevelScope }} +{{- include "find.labels" $topLevelScope }} app.kubernetes.io/component: {{ $component }} {{- end }} @@ -107,14 +107,14 @@ Common selector labels Requires array with top level scope and component name */}} -{{- define "drive.common.selectorLabels" -}} +{{- define "find.common.selectorLabels" -}} {{- $topLevelScope := index . 0 -}} {{- $component := index . 1 -}} -{{- include "drive.selectorLabels" $topLevelScope }} +{{- include "find.selectorLabels" $topLevelScope }} app.kubernetes.io/component: {{ $component }} {{- end }} -{{- define "drive.probes.abstract" -}} +{{- define "find.probes.abstract" -}} {{- if .exec -}} exec: {{- toYaml .exec | nindent 2 }} @@ -135,8 +135,8 @@ Full name for the backend Requires top level scope */}} -{{- define "drive.backend.fullname" -}} -{{ include "drive.fullname" . }}-backend +{{- define "find.backend.fullname" -}} +{{ include "find.fullname" . }}-backend {{- end }} {{/* @@ -144,8 +144,8 @@ Full name for the frontend Requires top level scope */}} -{{- define "drive.frontend.fullname" -}} -{{ include "drive.fullname" . }}-frontend +{{- define "find.frontend.fullname" -}} +{{ include "find.fullname" . }}-frontend {{- end }} {{/* @@ -153,32 +153,32 @@ Full name for the webrtc Requires top level scope */}} -{{- define "drive.webrtc.fullname" -}} -{{ include "drive.fullname" . }}-webrtc +{{- define "find.webrtc.fullname" -}} +{{ include "find.fullname" . }}-webrtc {{- end }} {{/* -Usage : {{ include "drive.secret.dockerconfigjson.name" (dict "fullname" (include "drive.fullname" .) "imageCredentials" .Values.path.to.the.image1) }} +Usage : {{ include "find.secret.dockerconfigjson.name" (dict "fullname" (include "find.fullname" .) "imageCredentials" .Values.path.to.the.image1) }} */}} -{{- define "drive.secret.dockerconfigjson.name" }} +{{- define "find.secret.dockerconfigjson.name" }} {{- if (default (dict) .imageCredentials).name }}{{ .imageCredentials.name }}{{ else }}{{ .fullname | trunc 63 | trimSuffix "-" }}-dockerconfig{{ end -}} {{- end }} {{/* -Usage : {{ include "drive.secret.dockerconfigjson" (dict "fullname" (include "drive.fullname" .) "imageCredentials" .Values.path.to.the.image1) }} +Usage : {{ include "find.secret.dockerconfigjson" (dict "fullname" (include "find.fullname" .) "imageCredentials" .Values.path.to.the.image1) }} */}} -{{- define "drive.secret.dockerconfigjson" }} +{{- define "find.secret.dockerconfigjson" }} {{- if .imageCredentials -}} apiVersion: v1 kind: Secret metadata: - name: {{ template "drive.secret.dockerconfigjson.name" (dict "fullname" .fullname "imageCredentials" .imageCredentials) }} + name: {{ template "find.secret.dockerconfigjson.name" (dict "fullname" .fullname "imageCredentials" .imageCredentials) }} annotations: "helm.sh/hook": pre-install,pre-upgrade "helm.sh/hook-weight": "-5" "helm.sh/hook-delete-policy": before-hook-creation type: kubernetes.io/dockerconfigjson data: - .dockerconfigjson: {{ template "drive.secret.dockerconfigjson.data" .imageCredentials }} + .dockerconfigjson: {{ template "find.secret.dockerconfigjson.data" .imageCredentials }} {{- end -}} {{- end }} diff --git a/src/helm/drive/templates/backend_deployment.yaml b/src/helm/find/templates/backend_deployment.yaml similarity index 80% rename from src/helm/drive/templates/backend_deployment.yaml rename to src/helm/find/templates/backend_deployment.yaml index 0aa7b1b..dac5218 100644 --- a/src/helm/drive/templates/backend_deployment.yaml +++ b/src/helm/find/templates/backend_deployment.yaml @@ -1,5 +1,5 @@ -{{- $envVars := include "drive.common.env" (list . .Values.backend) -}} -{{- $fullName := include "drive.backend.fullname" . -}} +{{- $envVars := include "find.common.env" (list . .Values.backend) -}} +{{- $fullName := include "find.backend.fullname" . -}} {{- $component := "backend" -}} apiVersion: apps/v1 kind: Deployment @@ -7,12 +7,12 @@ metadata: name: {{ $fullName }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.common.labels" (list . $component) | nindent 4 }} + {{- include "find.common.labels" (list . $component) | nindent 4 }} spec: replicas: {{ .Values.backend.replicas }} selector: matchLabels: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 6 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 6 }} template: metadata: annotations: @@ -20,11 +20,11 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 8 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 8 }} spec: {{- if $.Values.image.credentials }} imagePullSecrets: - - name: {{ include "drive.secret.dockerconfigjson.name" (dict "fullname" (include "drive.fullname" .) "imageCredentials" $.Values.image.credentials) }} + - name: {{ include "find.secret.dockerconfigjson.name" (dict "fullname" (include "find.fullname" .) "imageCredentials" $.Values.image.credentials) }} {{- end}} shareProcessNamespace: {{ .Values.backend.shareProcessNamespace }} containers: @@ -56,15 +56,15 @@ spec: protocol: TCP {{- if .Values.backend.probes.liveness }} livenessProbe: - {{- include "drive.probes.abstract" (merge .Values.backend.probes.liveness (dict "targetPort" .Values.backend.service.targetPort )) | nindent 12 }} + {{- include "find.probes.abstract" (merge .Values.backend.probes.liveness (dict "targetPort" .Values.backend.service.targetPort )) | nindent 12 }} {{- end }} {{- if .Values.backend.probes.readiness }} readinessProbe: - {{- include "drive.probes.abstract" (merge .Values.backend.probes.readiness (dict "targetPort" .Values.backend.service.targetPort )) | nindent 12 }} + {{- include "find.probes.abstract" (merge .Values.backend.probes.readiness (dict "targetPort" .Values.backend.service.targetPort )) | nindent 12 }} {{- end }} {{- if .Values.backend.probes.startup }} startupProbe: - {{- include "drive.probes.abstract" (merge .Values.backend.probes.startup (dict "targetPort" .Values.backend.service.targetPort )) | nindent 12 }} + {{- include "find.probes.abstract" (merge .Values.backend.probes.startup (dict "targetPort" .Values.backend.service.targetPort )) | nindent 12 }} {{- end }} {{- with .Values.backend.resources }} resources: @@ -102,7 +102,7 @@ spec: {{- range $index, $value := .Values.mountFiles }} - name: "files-{{ $index }}" configMap: - name: "{{ include "drive.fullname" $ }}-files-{{ $index }}" + name: "{{ include "find.fullname" $ }}-files-{{ $index }}" {{- end }} {{- range $name, $volume := .Values.backend.persistence }} - name: "{{ $name }}" diff --git a/src/helm/drive/templates/backend_job.yaml b/src/helm/find/templates/backend_job.yaml similarity index 88% rename from src/helm/drive/templates/backend_job.yaml rename to src/helm/find/templates/backend_job.yaml index e8152b7..0eb0016 100644 --- a/src/helm/drive/templates/backend_job.yaml +++ b/src/helm/find/templates/backend_job.yaml @@ -1,5 +1,5 @@ -{{- $envVars := include "drive.common.env" (list . .Values.backend) -}} -{{- $fullName := include "drive.backend.fullname" . -}} +{{- $envVars := include "find.common.env" (list . .Values.backend) -}} +{{- $fullName := include "find.backend.fullname" . -}} {{- $component := "backend" -}} apiVersion: batch/v1 kind: Job @@ -11,7 +11,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - {{- include "drive.common.labels" (list . $component) | nindent 4 }} + {{- include "find.common.labels" (list . $component) | nindent 4 }} spec: template: metadata: @@ -20,11 +20,11 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 8 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 8 }} spec: {{- if $.Values.image.credentials }} imagePullSecrets: - - name: {{ include "drive.secret.dockerconfigjson.name" (dict "fullname" (include "drive.fullname" .) "imageCredentials" $.Values.image.credentials) }} + - name: {{ include "find.secret.dockerconfigjson.name" (dict "fullname" (include "find.fullname" .) "imageCredentials" $.Values.image.credentials) }} {{- end}} shareProcessNamespace: {{ .Values.backend.shareProcessNamespace }} containers: @@ -87,7 +87,7 @@ spec: {{- range $index, $value := .Values.mountFiles }} - name: "files-{{ $index }}" configMap: - name: "{{ include "drive.fullname" $ }}-files-{{ $index }}" + name: "{{ include "find.fullname" $ }}-files-{{ $index }}" {{- end }} {{- range $name, $volume := .Values.backend.persistence }} - name: "{{ $name }}" diff --git a/src/helm/drive/templates/backend_job_createsuperuser.yaml b/src/helm/find/templates/backend_job_createsuperuser.yaml similarity index 88% rename from src/helm/drive/templates/backend_job_createsuperuser.yaml rename to src/helm/find/templates/backend_job_createsuperuser.yaml index 842565d..2c849e2 100644 --- a/src/helm/drive/templates/backend_job_createsuperuser.yaml +++ b/src/helm/find/templates/backend_job_createsuperuser.yaml @@ -1,5 +1,5 @@ -{{- $envVars := include "drive.common.env" (list . .Values.backend) -}} -{{- $fullName := include "drive.backend.fullname" . -}} +{{- $envVars := include "find.common.env" (list . .Values.backend) -}} +{{- $fullName := include "find.backend.fullname" . -}} {{- $component := "backend" -}} apiVersion: batch/v1 kind: Job @@ -11,7 +11,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - {{- include "drive.common.labels" (list . $component) | nindent 4 }} + {{- include "find.common.labels" (list . $component) | nindent 4 }} spec: template: metadata: @@ -20,11 +20,11 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 8 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 8 }} spec: {{- if $.Values.image.credentials }} imagePullSecrets: - - name: {{ include "drive.secret.dockerconfigjson.name" (dict "fullname" (include "drive.fullname" .) "imageCredentials" $.Values.image.credentials) }} + - name: {{ include "find.secret.dockerconfigjson.name" (dict "fullname" (include "find.fullname" .) "imageCredentials" $.Values.image.credentials) }} {{- end}} shareProcessNamespace: {{ .Values.backend.shareProcessNamespace }} containers: @@ -87,7 +87,7 @@ spec: {{- range $index, $value := .Values.mountFiles }} - name: "files-{{ $index }}" configMap: - name: "{{ include "drive.fullname" $ }}-files-{{ $index }}" + name: "{{ include "find.fullname" $ }}-files-{{ $index }}" {{- end }} {{- range $name, $volume := .Values.backend.persistence }} - name: "{{ $name }}" diff --git a/src/helm/drive/templates/backend_svc.yaml b/src/helm/find/templates/backend_svc.yaml similarity index 61% rename from src/helm/drive/templates/backend_svc.yaml rename to src/helm/find/templates/backend_svc.yaml index bcb0bec..8aa65d0 100644 --- a/src/helm/drive/templates/backend_svc.yaml +++ b/src/helm/find/templates/backend_svc.yaml @@ -1,5 +1,5 @@ -{{- $envVars := include "drive.common.env" (list . .Values.backend) -}} -{{- $fullName := include "drive.backend.fullname" . -}} +{{- $envVars := include "find.common.env" (list . .Values.backend) -}} +{{- $fullName := include "find.backend.fullname" . -}} {{- $component := "backend" -}} apiVersion: v1 kind: Service @@ -7,7 +7,7 @@ metadata: name: {{ $fullName }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.common.labels" (list . $component) | nindent 4 }} + {{- include "find.common.labels" (list . $component) | nindent 4 }} annotations: {{- toYaml $.Values.backend.service.annotations | nindent 4 }} spec: @@ -18,4 +18,4 @@ spec: protocol: TCP name: http selector: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 4 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 4 }} diff --git a/src/helm/drive/templates/frontend_deployment.yaml b/src/helm/find/templates/frontend_deployment.yaml similarity index 80% rename from src/helm/drive/templates/frontend_deployment.yaml rename to src/helm/find/templates/frontend_deployment.yaml index a2f93b2..991f960 100644 --- a/src/helm/drive/templates/frontend_deployment.yaml +++ b/src/helm/find/templates/frontend_deployment.yaml @@ -1,5 +1,5 @@ -{{- $envVars := include "drive.common.env" (list . .Values.frontend) -}} -{{- $fullName := include "drive.frontend.fullname" . -}} +{{- $envVars := include "find.common.env" (list . .Values.frontend) -}} +{{- $fullName := include "find.frontend.fullname" . -}} {{- $component := "frontend" -}} apiVersion: apps/v1 kind: Deployment @@ -7,12 +7,12 @@ metadata: name: {{ $fullName }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.common.labels" (list . $component) | nindent 4 }} + {{- include "find.common.labels" (list . $component) | nindent 4 }} spec: replicas: {{ .Values.frontend.replicas }} selector: matchLabels: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 6 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 6 }} template: metadata: annotations: @@ -20,11 +20,11 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 8 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 8 }} spec: {{- if $.Values.image.credentials }} imagePullSecrets: - - name: {{ include "drive.secret.dockerconfigjson.name" (dict "fullname" (include "drive.fullname" .) "imageCredentials" $.Values.image.credentials) }} + - name: {{ include "find.secret.dockerconfigjson.name" (dict "fullname" (include "find.fullname" .) "imageCredentials" $.Values.image.credentials) }} {{- end}} shareProcessNamespace: {{ .Values.frontend.shareProcessNamespace }} containers: @@ -56,15 +56,15 @@ spec: protocol: TCP {{- if .Values.frontend.probes.liveness }} livenessProbe: - {{- include "drive.probes.abstract" (merge .Values.frontend.probes.liveness (dict "targetPort" .Values.frontend.service.targetPort )) | nindent 12 }} + {{- include "find.probes.abstract" (merge .Values.frontend.probes.liveness (dict "targetPort" .Values.frontend.service.targetPort )) | nindent 12 }} {{- end }} {{- if .Values.frontend.probes.readiness }} readinessProbe: - {{- include "drive.probes.abstract" (merge .Values.frontend.probes.readiness (dict "targetPort" .Values.frontend.service.targetPort )) | nindent 12 }} + {{- include "find.probes.abstract" (merge .Values.frontend.probes.readiness (dict "targetPort" .Values.frontend.service.targetPort )) | nindent 12 }} {{- end }} {{- if .Values.frontend.probes.startup }} startupProbe: - {{- include "drive.probes.abstract" (merge .Values.frontend.probes.startup (dict "targetPort" .Values.frontend.service.targetPort )) | nindent 12 }} + {{- include "find.probes.abstract" (merge .Values.frontend.probes.startup (dict "targetPort" .Values.frontend.service.targetPort )) | nindent 12 }} {{- end }} {{- with .Values.frontend.resources }} resources: @@ -102,7 +102,7 @@ spec: {{- range $index, $value := .Values.mountFiles }} - name: "files-{{ $index }}" configMap: - name: "{{ include "drive.fullname" $ }}-files-{{ $index }}" + name: "{{ include "find.fullname" $ }}-files-{{ $index }}" {{- end }} {{- range $name, $volume := .Values.frontend.persistence }} - name: "{{ $name }}" diff --git a/src/helm/drive/templates/frontend_svc.yaml b/src/helm/find/templates/frontend_svc.yaml similarity index 61% rename from src/helm/drive/templates/frontend_svc.yaml rename to src/helm/find/templates/frontend_svc.yaml index 5c2f96a..eb8c840 100644 --- a/src/helm/drive/templates/frontend_svc.yaml +++ b/src/helm/find/templates/frontend_svc.yaml @@ -1,5 +1,5 @@ -{{- $envVars := include "drive.common.env" (list . .Values.frontend) -}} -{{- $fullName := include "drive.frontend.fullname" . -}} +{{- $envVars := include "find.common.env" (list . .Values.frontend) -}} +{{- $fullName := include "find.frontend.fullname" . -}} {{- $component := "frontend" -}} apiVersion: v1 kind: Service @@ -7,7 +7,7 @@ metadata: name: {{ $fullName }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.common.labels" (list . $component) | nindent 4 }} + {{- include "find.common.labels" (list . $component) | nindent 4 }} annotations: {{- toYaml $.Values.frontend.service.annotations | nindent 4 }} spec: @@ -18,4 +18,4 @@ spec: protocol: TCP name: http selector: - {{- include "drive.common.selectorLabels" (list . $component) | nindent 4 }} + {{- include "find.common.selectorLabels" (list . $component) | nindent 4 }} diff --git a/src/helm/drive/templates/ingress.yaml b/src/helm/find/templates/ingress.yaml similarity index 86% rename from src/helm/drive/templates/ingress.yaml rename to src/helm/find/templates/ingress.yaml index bd628ec..b430dce 100644 --- a/src/helm/drive/templates/ingress.yaml +++ b/src/helm/find/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingress.enabled -}} -{{- $fullName := include "drive.fullname" . -}} +{{- $fullName := include "find.fullname" . -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} @@ -17,7 +17,7 @@ metadata: name: {{ $fullName }} namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.labels" . | nindent 4 }} + {{- include "find.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -53,11 +53,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.frontend.fullname" . }} + name: {{ include "find.frontend.fullname" . }} port: number: {{ .Values.frontend.service.port }} {{- else }} - serviceName: {{ include "drive.frontend.fullname" . }} + serviceName: {{ include "find.frontend.fullname" . }} servicePort: {{ .Values.frontend.service.port }} {{- end }} - path: /api @@ -67,11 +67,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" . }} + name: {{ include "find.backend.fullname" . }} port: number: {{ .Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" . }} + serviceName: {{ include "find.backend.fullname" . }} servicePort: {{ .Values.backend.service.port }} {{- end }} {{- with .Values.ingress.customBackends }} @@ -89,11 +89,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.frontend.fullname" $ }} + name: {{ include "find.frontend.fullname" $ }} port: number: {{ $.Values.frontend.service.port }} {{- else }} - serviceName: {{ include "drive.frontend.fullname" $ }} + serviceName: {{ include "find.frontend.fullname" $ }} servicePort: {{ $.Values.frontend.service.port }} {{- end }} - path: /api @@ -103,11 +103,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" $ }} + name: {{ include "find.backend.fullname" $ }} port: number: {{ $.Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" $ }} + serviceName: {{ include "find.backend.fullname" $ }} servicePort: {{ $.Values.backend.service.port }} {{- end }} {{- with $.Values.ingress.customBackends }} diff --git a/src/helm/drive/templates/ingress_admin.yaml b/src/helm/find/templates/ingress_admin.yaml similarity index 86% rename from src/helm/drive/templates/ingress_admin.yaml rename to src/helm/find/templates/ingress_admin.yaml index 855a6e4..b7fbd6b 100644 --- a/src/helm/drive/templates/ingress_admin.yaml +++ b/src/helm/find/templates/ingress_admin.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingressAdmin.enabled -}} -{{- $fullName := include "drive.fullname" . -}} +{{- $fullName := include "find.fullname" . -}} {{- if and .Values.ingressAdmin.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingressAdmin.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingressAdmin.annotations "kubernetes.io/ingress.class" .Values.ingressAdmin.className}} @@ -17,7 +17,7 @@ metadata: name: {{ $fullName }}-admin namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.labels" . | nindent 4 }} + {{- include "find.labels" . | nindent 4 }} {{- with .Values.ingressAdmin.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -53,11 +53,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" . }} + name: {{ include "find.backend.fullname" . }} port: number: {{ .Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" . }} + serviceName: {{ include "find.backend.fullname" . }} servicePort: {{ .Values.backend.service.port }} {{- end }} - path: /static @@ -67,11 +67,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" . }} + name: {{ include "find.backend.fullname" . }} port: number: {{ .Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" . }} + serviceName: {{ include "find.backend.fullname" . }} servicePort: {{ .Values.backend.service.port }} {{- end }} {{- end }} @@ -86,11 +86,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" $ }} + name: {{ include "find.backend.fullname" $ }} port: number: {{ $.Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" $ }} + serviceName: {{ include "find.backend.fullname" $ }} servicePort: {{ $.Values.backend.service.port }} {{- end }} {{- end }} diff --git a/src/helm/drive/templates/ingress_media.yaml b/src/helm/find/templates/ingress_media.yaml similarity index 88% rename from src/helm/drive/templates/ingress_media.yaml rename to src/helm/find/templates/ingress_media.yaml index 8aa40e9..618e216 100644 --- a/src/helm/drive/templates/ingress_media.yaml +++ b/src/helm/find/templates/ingress_media.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingressMedia.enabled -}} -{{- $fullName := include "drive.fullname" . -}} +{{- $fullName := include "find.fullname" . -}} {{- if and .Values.ingressMedia.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingressMedia.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingressMedia.annotations "kubernetes.io/ingress.class" .Values.ingressMedia.className}} @@ -17,7 +17,7 @@ metadata: name: {{ $fullName }}-media namespace: {{ .Release.Namespace | quote }} labels: - {{- include "drive.labels" . | nindent 4 }} + {{- include "find.labels" . | nindent 4 }} {{- with .Values.ingressMedia.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -53,11 +53,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" . }} + name: {{ include "find.backend.fullname" . }} port: number: {{ .Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" . }} + serviceName: {{ include "find.backend.fullname" . }} servicePort: {{ .Values.backend.service.port }} {{- end }} {{- end }} @@ -72,11 +72,11 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "drive.backend.fullname" $ }} + name: {{ include "find.backend.fullname" $ }} port: number: {{ $.Values.backend.service.port }} {{- else }} - serviceName: {{ include "drive.backend.fullname" $ }} + serviceName: {{ include "find.backend.fullname" $ }} servicePort: {{ $.Values.backend.service.port }} {{- end }} {{- end }} diff --git a/src/helm/drive/templates/secret.yaml b/src/helm/find/templates/secret.yaml similarity index 100% rename from src/helm/drive/templates/secret.yaml rename to src/helm/find/templates/secret.yaml diff --git a/src/helm/drive/values.yaml b/src/helm/find/values.yaml similarity index 96% rename from src/helm/drive/values.yaml rename to src/helm/find/values.yaml index 32ceae6..b0eb3d0 100644 --- a/src/helm/drive/values.yaml +++ b/src/helm/find/values.yaml @@ -1,18 +1,18 @@ -# Default values for drive. +# Default values for find. # This is a YAML-formatted file. # Declare variables to be passed into your templates. ## @section General configuration -## @param image.repository Repository to use to pull drive's container image -## @param image.tag drive's container tag +## @param image.repository Repository to use to pull find's container image +## @param image.tag find's container tag ## @param image.pullPolicy Container image pull policy ## @extra image.credentials.username Username for container registry authentication ## @extra image.credentials.password Password for container registry authentication ## @extra image.credentials.registry Registry url for which the credentials are specified ## @extra image.credentials.name Name of the generated secret for imagePullSecrets image: - repository: lasuite/drive-backend + repository: lasuite/find-backend pullPolicy: IfNotPresent tag: "latest" @@ -32,7 +32,7 @@ commonEnvVars: &commonEnvVars ingress: enabled: false className: null - host: drive.example.com + host: find.example.com path: / ## @param ingress.hosts Additional host to configure for the Ingress hosts: [] @@ -56,7 +56,7 @@ ingress: ingressAdmin: enabled: false className: null - host: drive.example.com + host: find.example.com path: /admin ## @param ingressAdmin.hosts Additional host to configure for the Ingress hosts: [ ] @@ -176,11 +176,11 @@ backend: ## @section frontend frontend: - ## @param frontend.image.repository Repository to use to pull drive's frontend container image - ## @param frontend.image.tag drive's frontend container tag + ## @param frontend.image.repository Repository to use to pull find's frontend container image + ## @param frontend.image.tag find's frontend container tag ## @param frontend.image.pullPolicy frontend container image pull policy image: - repository: lasuite/drive-frontend + repository: lasuite/find-frontend pullPolicy: IfNotPresent tag: "latest" diff --git a/src/helm/helmfile.yaml b/src/helm/helmfile.yaml index 178ab23..0e0d57e 100644 --- a/src/helm/helmfile.yaml +++ b/src/helm/helmfile.yaml @@ -13,7 +13,7 @@ releases: - auth: username: dinum password: pass - database: drive + database: find - tls: enabled: true autoGenerated: true @@ -35,12 +35,12 @@ releases: secrets: - env.d/{{ .Environment.Name }}/secrets.enc.yaml - - name: drive + - name: find version: {{ .Values.version }} namespace: {{ .Namespace }} - chart: ./drive + chart: ./find values: - - env.d/{{ .Environment.Name }}/values.drive.yaml.gotmpl + - env.d/{{ .Environment.Name }}/values.find.yaml.gotmpl secrets: - env.d/{{ .Environment.Name }}/secrets.enc.yaml