🔨(tilt) fix local k8s deployment

Removes the docs references and fix the helmfile extension to work
with newest version.
This commit is contained in:
Quentin BEY
2025-07-31 15:07:39 +02:00
parent 44b50d5085
commit 8c917b90c2
8 changed files with 35 additions and 38 deletions
+2 -2
View File
@@ -21,10 +21,10 @@ jobs:
shell: bash
run: |
set -e
HELMFILE=src/helm/helmfile.yaml
HELMFILE=src/helm/helmfile.yaml.gotmpl
environments=$(awk 'BEGIN {in_env=0} /^environments:/ {in_env=1; next} /^---/ {in_env=0} in_env && /^ [^ ]/ {gsub(/^ /,""); gsub(/:.*$/,""); print}' "$HELMFILE")
for env in $environments; do
echo "################### $env lint ###################"
helmfile -e $env -f $HELMFILE lint || exit 1
echo -e "\n"
done
done
+3 -7
View File
@@ -10,10 +10,6 @@ docker_build(
target = 'backend-production',
live_update=[
sync('../src/backend', '/app'),
run(
'pip install -r /app/requirements.txt',
trigger=['./api/requirements.txt']
)
]
)
@@ -28,9 +24,9 @@ docker_build(
]
)
k8s_resource('conversations-conversations-backend-migrate', resource_deps=['postgres-postgresql'])
k8s_resource('conversations-conversations-backend-createsuperuser', resource_deps=['conversations-conversations-backend-migrate'])
k8s_resource('conversations-conversations-backend', resource_deps=['conversations-conversations-backend-migrate'])
k8s_resource('conversations-backend-migrate', resource_deps=['postgres-postgresql'])
k8s_resource('conversations-backend-createsuperuser', resource_deps=['conversations-backend-migrate'])
k8s_resource('conversations-backend', resource_deps=['conversations-backend-migrate'])
k8s_yaml(local('cd ../src/helm && helmfile -n conversations -e dev template .'))
migration = '''
@@ -112,25 +112,28 @@ def create_demo(stdout):
queue = BulkQueue(stdout)
with Timeit(stdout, "Creating users"):
name_size = int(math.sqrt(defaults.NB_OBJECTS["users"]))
first_names = [fake.first_name() for _ in range(name_size)]
last_names = [fake.last_name() for _ in range(name_size)]
for i in range(defaults.NB_OBJECTS["users"]):
first_name = random.choice(first_names)
queue.push(
models.User(
admin_email=f"user{i:d}@example.com",
email=f"user{i:d}@example.com",
password="!",
is_superuser=False,
is_active=True,
is_staff=False,
short_name=first_name,
full_name=f"{first_name:s} {random.choice(last_names):s}",
language=random.choice(settings.LANGUAGES)[0],
if models.User.objects.filter(email="user0@example.com").exists():
stdout.write("Users already exist, skipping user creation.")
else:
name_size = int(math.sqrt(defaults.NB_OBJECTS["users"]))
first_names = [fake.first_name() for _ in range(name_size)]
last_names = [fake.last_name() for _ in range(name_size)]
for i in range(defaults.NB_OBJECTS["users"]):
first_name = random.choice(first_names)
queue.push(
models.User(
admin_email=f"user{i:d}@example.com",
email=f"user{i:d}@example.com",
password="!",
is_superuser=False,
is_active=True,
is_staff=False,
short_name=first_name,
full_name=f"{first_name:s} {random.choice(last_names):s}",
language=random.choice(settings.LANGUAGES)[0],
)
)
)
queue.flush()
queue.flush()
class Command(BaseCommand):
-3
View File
@@ -41,9 +41,6 @@ WORKDIR /home/frontend/apps/conversations
ARG API_ORIGIN
ENV NEXT_PUBLIC_API_ORIGIN=${API_ORIGIN}
ARG SW_DEACTIVATED
ENV NEXT_PUBLIC_SW_DEACTIVATED=${SW_DEACTIVATED}
ARG PRODUCT_NAME
ENV NEXT_PUBLIC_PRODUCT_NAME=${PRODUCT_NAME}
@@ -125,7 +125,7 @@ spec:
{{- if .Values.backend.themeCustomization.enabled }}
- name: theme-customization
configMap:
name: docs-theme-customization
name: conversations-theme-customization
{{- end }}
{{- range .Values.backend.extraVolumes }}
- name: {{ .name }}
@@ -2,9 +2,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: docs-theme-customization
name: conversations-theme-customization
namespace: {{ .Release.Namespace }}
data:
default.json: |
{{ .Values.backend.themeCustomization.file_content | toJson | indent 4 }}
{{- end }}
{{- end }}
@@ -33,11 +33,11 @@ backend:
LOGGING_LEVEL_LOGGERS_APP: INFO
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
OIDC_OP_JWKS_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/certs
OIDC_OP_AUTHORIZATION_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/auth
OIDC_OP_TOKEN_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/token
OIDC_OP_USER_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/userinfo
OIDC_OP_LOGOUT_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/logout
OIDC_OP_JWKS_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/certs
OIDC_OP_AUTHORIZATION_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/auth
OIDC_OP_TOKEN_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/token
OIDC_OP_USER_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/userinfo
OIDC_OP_LOGOUT_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/logout
OIDC_RP_CLIENT_ID: conversations
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
OIDC_RP_SIGN_ALGO: RS256
@@ -122,6 +122,7 @@ frontend:
envVars:
PORT: 8080
NEXT_PUBLIC_API_ORIGIN: https://conversations.127.0.0.1.nip.io
NEXT_PUBLIC_PRODUCT_NAME: "Assistant"
replicas: 1
command: