Skip to content

Commit eab2a75

Browse files
authored
♻️(tilt) use hem dev-backend chart (#1340)
Remove usage of bitnami charts and use our own dev-backend charts instead.
1 parent cd84751 commit eab2a75

File tree

4 files changed

+107
-111
lines changed

4 files changed

+107
-111
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to
2323
- ♿(frontend) improve accessibility:
2424
- ♿(frontend) fix major accessibility issues reported by wave and axe #1344
2525
- #1341
26+
- ♻️(tilt) use helm dev-backend chart
2627

2728
## [3.6.0] - 2025-09-04
2829

bin/Tiltfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ docker_build(
3939
]
4040
)
4141

42-
k8s_resource('impress-docs-backend-migrate', resource_deps=['postgres-postgresql'])
42+
k8s_resource('impress-docs-backend-migrate', resource_deps=['dev-backend-postgres'])
4343
k8s_resource('impress-docs-backend-createsuperuser', resource_deps=['impress-docs-backend-migrate'])
44-
k8s_resource('impress-docs-backend', resource_deps=['impress-docs-backend-migrate'])
44+
k8s_resource('dev-backend-keycloak', resource_deps=['dev-backend-keycloak-pg'])
45+
k8s_resource('impress-docs-backend', resource_deps=['impress-docs-backend-migrate', 'dev-backend-redis', 'dev-backend-keycloak', 'dev-backend-postgres', 'dev-backend-minio:statefulset'])
4546
k8s_yaml(local('cd ../src/helm && helmfile -n impress -e dev template .'))
4647

4748
migration = '''

src/helm/env.d/dev/values.impress.yaml.gotmpl

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,46 +16,55 @@ backend:
1616
replicas: 1
1717
envVars:
1818
COLLABORATION_SERVER_SECRET: my-secret
19-
DJANGO_CSRF_TRUSTED_ORIGINS: https://impress.127.0.0.1.nip.io
19+
DJANGO_CSRF_TRUSTED_ORIGINS: https://docs.127.0.0.1.nip.io
2020
DJANGO_CONFIGURATION: Feature
21-
DJANGO_ALLOWED_HOSTS: impress.127.0.0.1.nip.io
21+
DJANGO_ALLOWED_HOSTS: docs.127.0.0.1.nip.io
2222
DJANGO_SERVER_TO_SERVER_API_TOKENS: secret-api-key
2323
DJANGO_SECRET_KEY: *djangoSecretKey
2424
DJANGO_SETTINGS_MODULE: impress.settings
2525
DJANGO_SUPERUSER_PASSWORD: admin
2626
DJANGO_EMAIL_BRAND_NAME: "La Suite Numérique"
2727
DJANGO_EMAIL_HOST: "mailcatcher"
28-
DJANGO_EMAIL_LOGO_IMG: https://impress.127.0.0.1.nip.io/assets/logo-suite-numerique.png
28+
DJANGO_EMAIL_LOGO_IMG: https://docs.127.0.0.1.nip.io/assets/logo-suite-numerique.png
2929
DJANGO_EMAIL_PORT: 1025
3030
DJANGO_EMAIL_USE_SSL: False
3131
LOGGING_LEVEL_HANDLERS_CONSOLE: ERROR
3232
LOGGING_LEVEL_LOGGERS_ROOT: INFO
3333
LOGGING_LEVEL_LOGGERS_APP: INFO
3434
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
3535
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
36-
OIDC_OP_JWKS_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/certs
37-
OIDC_OP_AUTHORIZATION_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/auth
38-
OIDC_OP_TOKEN_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/token
39-
OIDC_OP_USER_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/userinfo
40-
OIDC_OP_LOGOUT_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/logout
41-
OIDC_RP_CLIENT_ID: impress
36+
OIDC_OP_JWKS_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/certs
37+
OIDC_OP_AUTHORIZATION_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/auth
38+
OIDC_OP_TOKEN_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/token
39+
OIDC_OP_USER_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/userinfo
40+
OIDC_OP_LOGOUT_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/docs/protocol/openid-connect/logout
41+
OIDC_RP_CLIENT_ID: docs
4242
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
4343
OIDC_RP_SIGN_ALGO: RS256
4444
OIDC_RP_SCOPES: "openid email"
45-
LOGIN_REDIRECT_URL: https://impress.127.0.0.1.nip.io
46-
LOGIN_REDIRECT_URL_FAILURE: https://impress.127.0.0.1.nip.io
47-
LOGOUT_REDIRECT_URL: https://impress.127.0.0.1.nip.io
48-
DB_HOST: postgres-postgresql
49-
DB_NAME: impress
50-
DB_USER: dinum
51-
DB_PASSWORD: pass
45+
LOGIN_REDIRECT_URL: https://docs.127.0.0.1.nip.io
46+
LOGIN_REDIRECT_URL_FAILURE: https://docs.127.0.0.1.nip.io
47+
LOGOUT_REDIRECT_URL: https://docs.127.0.0.1.nip.io
48+
DB_HOST: dev-backend-postgres
49+
DB_NAME:
50+
secretKeyRef:
51+
name: dev-backend-postgres
52+
key: database
53+
DB_USER:
54+
secretKeyRef:
55+
name: dev-backend-postgres
56+
key: username
57+
DB_PASSWORD:
58+
secretKeyRef:
59+
name: dev-backend-postgres
60+
key: password
5261
DB_PORT: 5432
53-
REDIS_URL: redis://default:pass@redis-master:6379/1
54-
DJANGO_CELERY_BROKER_URL: redis://default:pass@redis-master:6379/1
55-
AWS_S3_ENDPOINT_URL: http://minio.impress.svc.cluster.local:9000
56-
AWS_S3_ACCESS_KEY_ID: root
62+
REDIS_URL: redis://user:pass@dev-backend-redis:6379/1
63+
DJANGO_CELERY_BROKER_URL: redis://user:pass@dev-backend-redis:6379/1
64+
AWS_S3_ENDPOINT_URL: http://dev-backend-minio.impress.svc.cluster.local:9000
65+
AWS_S3_ACCESS_KEY_ID: dinum
5766
AWS_S3_SECRET_ACCESS_KEY: password
58-
AWS_STORAGE_BUCKET_NAME: impress-media-storage
67+
AWS_STORAGE_BUCKET_NAME: docs-media-storage
5968
STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage
6069
Y_PROVIDER_API_BASE_URL: http://impress-y-provider:443/api/
6170
Y_PROVIDER_API_KEY: my-secret
@@ -73,8 +82,7 @@ backend:
7382

7483
echo "Database is ready"
7584

76-
python manage.py migrate --no-input &&
77-
python manage.py create_demo --force
85+
python manage.py migrate --no-input
7886
restartPolicy: Never
7987

8088
command:
@@ -120,7 +128,7 @@ backend:
120128
frontend:
121129
envVars:
122130
PORT: 8080
123-
NEXT_PUBLIC_API_ORIGIN: https://impress.127.0.0.1.nip.io
131+
NEXT_PUBLIC_API_ORIGIN: https://docs.127.0.0.1.nip.io
124132

125133
replicas: 1
126134
command:
@@ -141,27 +149,29 @@ yProvider:
141149
tag: "latest"
142150

143151
envVars:
144-
COLLABORATION_BACKEND_BASE_URL: https://impress.127.0.0.1.nip.io
152+
COLLABORATION_BACKEND_BASE_URL: https://docs.127.0.0.1.nip.io
145153
COLLABORATION_LOGGING: true
146-
COLLABORATION_SERVER_ORIGIN: https://impress.127.0.0.1.nip.io
154+
COLLABORATION_SERVER_ORIGIN: https://docs.127.0.0.1.nip.io
147155
COLLABORATION_SERVER_SECRET: my-secret
148156
Y_PROVIDER_API_KEY: my-secret
149157

150158
ingress:
151159
enabled: true
152-
host: impress.127.0.0.1.nip.io
160+
host: docs.127.0.0.1.nip.io
161+
annotations:
162+
nginx.ingress.kubernetes.io/proxy-body-size: 10m
153163

154164
ingressCollaborationWS:
155165
enabled: true
156-
host: impress.127.0.0.1.nip.io
166+
host: docs.127.0.0.1.nip.io
157167

158168
ingressCollaborationApi:
159169
enabled: true
160-
host: impress.127.0.0.1.nip.io
170+
host: docs.127.0.0.1.nip.io
161171

162172
ingressAdmin:
163173
enabled: true
164-
host: impress.127.0.0.1.nip.io
174+
host: docs.127.0.0.1.nip.io
165175

166176
posthog:
167177
ingress:
@@ -172,14 +182,14 @@ posthog:
172182

173183
ingressMedia:
174184
enabled: true
175-
host: impress.127.0.0.1.nip.io
185+
host: docs.127.0.0.1.nip.io
176186

177187
annotations:
178-
nginx.ingress.kubernetes.io/auth-url: https://impress.127.0.0.1.nip.io/api/v1.0/documents/media-auth/
188+
nginx.ingress.kubernetes.io/auth-url: https://docs.127.0.0.1.nip.io/api/v1.0/documents/media-auth/
179189
nginx.ingress.kubernetes.io/auth-response-headers: "Authorization, X-Amz-Date, X-Amz-Content-SHA256"
180-
nginx.ingress.kubernetes.io/upstream-vhost: minio.impress.svc.cluster.local:9000
181-
nginx.ingress.kubernetes.io/rewrite-target: /impress-media-storage/$1
190+
nginx.ingress.kubernetes.io/upstream-vhost: dev-backend-minio.impress.svc.cluster.local:9000
191+
nginx.ingress.kubernetes.io/rewrite-target: /docs-media-storage/$1
182192

183193
serviceMedia:
184-
host: minio.impress.svc.cluster.local
194+
host: dev-backend-minio.impress.svc.cluster.local
185195
port: 9000

src/helm/helmfile.yaml

Lines changed: 58 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,91 +4,75 @@ environments:
44
- version: 3.6.0
55
---
66
repositories:
7-
- name: bitnami
8-
url: registry-1.docker.io/bitnamicharts
9-
oci: true
7+
- name: dev-backends
8+
url: https://suitenumerique.github.io/helm-dev-backend
109
---
1110

1211
releases:
13-
- name: keycloak
14-
installed: {{ eq .Environment.Name "dev" | toYaml }}
15-
missingFileHandler: Warn
12+
- name: dev-backend
1613
namespace: {{ .Namespace }}
17-
chart: bitnami/keycloak
18-
version: 17.3.6
14+
chart: dev-backends/dev-backend
15+
version: 0.0.2
1916
values:
20-
- postgresql:
21-
auth:
22-
username: keycloak
23-
password: keycloak
24-
database: keycloak
25-
- extraEnvVars:
26-
- name: KEYCLOAK_EXTRA_ARGS
27-
value: "--import-realm"
28-
- name: KC_HOSTNAME_URL
29-
value: https://docs-keycloak.127.0.0.1.nip.io
30-
- extraVolumes:
31-
- name: import
32-
configMap:
33-
name: docs-keycloak
34-
- extraVolumeMounts:
35-
- name: import
36-
mountPath: /opt/bitnami/keycloak/data/import/
37-
- auth:
38-
adminUser: su
39-
adminPassword: su
40-
- proxy: edge
41-
- ingress:
17+
- postgres:
4218
enabled: true
43-
hostname: docs-keycloak.127.0.0.1.nip.io
44-
- extraDeploy:
45-
- apiVersion: v1
46-
kind: ConfigMap
47-
metadata:
48-
name: docs-keycloak
49-
namespace: {{ .Namespace }}
50-
data:
51-
impress.json: |
52-
{{ readFile "../../docker/auth/realm.json" | replace "http://localhost:3200" "https://impress.127.0.0.1.nip.io" | indent 14 }}
53-
54-
- name: postgres
55-
installed: {{ eq .Environment.Name "dev" | toYaml }}
56-
namespace: {{ .Namespace }}
57-
chart: bitnami/postgresql
58-
version: 13.1.5
59-
values:
60-
- auth:
19+
name: postgres
20+
#serviceNameOverride: postgres
21+
image: postgres:16-alpine
6122
username: dinum
6223
password: pass
63-
database: impress
64-
- tls:
24+
database: docs
25+
size: 1Gi
26+
- redis:
6527
enabled: true
66-
autoGenerated: true
67-
68-
- name: minio
69-
installed: {{ eq .Environment.Name "dev" | toYaml }}
70-
namespace: {{ .Namespace }}
71-
chart: bitnami/minio
72-
version: 12.10.10
73-
values:
74-
- auth:
75-
rootUser: root
76-
rootPassword: password
77-
- provisioning:
28+
name: redis
29+
image: redis:8.2-alpine
30+
username: user
31+
password: pass
32+
- minio:
7833
enabled: true
79-
buckets:
80-
- name: impress-media-storage
81-
versioning: true
82-
83-
- name: redis
84-
installed: {{ eq .Environment.Name "dev" | toYaml }}
85-
namespace: {{ .Namespace }}
86-
chart: bitnami/redis
87-
version: 20.6.2
88-
values:
89-
- auth:
34+
image: minio/minio
35+
name: minio
36+
ingress:
37+
enabled: true
38+
hostname: docs-minio.127.0.0.1.nip.io
39+
tls:
40+
enabled: true
41+
secretName: docs-tls
42+
consoleIngress:
43+
enabled: true
44+
hostname: docs-minio-console.127.0.0.1.nip.io
45+
tls:
46+
enabled: true
47+
secretName: docs-tls
48+
username: dinum
49+
password: password
50+
bucket: docs-media-storage
51+
versioning: true
52+
size: 1Gi
53+
- keycloak:
54+
enabled: true
55+
image: quay.io/keycloak/keycloak:20.0.1
56+
name: keycloak
57+
#serviceNameOverride: keycloak
58+
hostname: docs-keycloak.127.0.0.1.nip.io
59+
username: admin
9060
password: pass
91-
architecture: standalone
61+
tls:
62+
enabled: true
63+
secretName: docs-tls
64+
db:
65+
username: dinum
66+
password: pass
67+
database: keycloak
68+
size: 1Gi
69+
image: postgres:16-alpine
70+
realm:
71+
name: docs
72+
username: docs
73+
password: docs
74+
75+
9276

9377
- name: impress
9478
version: {{ .Values.version }}

0 commit comments

Comments
 (0)