Skip to content

Commit 19aff56

Browse files
committed
📝(kubernetes) update doc with our dev-backend helm chart
We removed the usage of bitnami charts and created our own dev-backend helm chart. We need to update the kubernetes document accordingly.
1 parent 546f97c commit 19aff56

File tree

6 files changed

+228
-2455
lines changed

6 files changed

+228
-2455
lines changed

docs/examples/helm/impress.values.yaml

Lines changed: 81 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
djangoSecretKey: &djangoSecretKey "lkjsdlfkjsldkfjslkdfjslkdjfslkdjf"
2+
djangoSuperUserEmail: [email protected]
3+
djangoSuperUserPass: admin
4+
aiApiKey: changeme
5+
aiBaseUrl: changeme
6+
oidc:
7+
clientId: impress
8+
clientSecret: ThisIsAnExampleKeyForDevPurposeOnly
9+
110
image:
211
repository: lasuite/impress-backend
312
pullPolicy: Always
@@ -6,86 +15,98 @@ image:
615
backend:
716
replicas: 1
817
envVars:
9-
COLLABORATION_API_URL: https://impress.127.0.0.1.nip.io/collaboration/api/
1018
COLLABORATION_SERVER_SECRET: my-secret
11-
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
1220
DJANGO_CONFIGURATION: Feature
13-
DJANGO_ALLOWED_HOSTS: impress.127.0.0.1.nip.io
21+
DJANGO_ALLOWED_HOSTS: docs.127.0.0.1.nip.io
1422
DJANGO_SERVER_TO_SERVER_API_TOKENS: secret-api-key
15-
DJANGO_SECRET_KEY: AgoodOrAbadKey
23+
DJANGO_SECRET_KEY: *djangoSecretKey
1624
DJANGO_SETTINGS_MODULE: impress.settings
1725
DJANGO_SUPERUSER_PASSWORD: admin
1826
DJANGO_EMAIL_BRAND_NAME: "La Suite Numérique"
1927
DJANGO_EMAIL_HOST: "mailcatcher"
20-
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
2129
DJANGO_EMAIL_PORT: 1025
2230
DJANGO_EMAIL_USE_SSL: False
2331
LOGGING_LEVEL_HANDLERS_CONSOLE: ERROR
2432
LOGGING_LEVEL_LOGGERS_ROOT: INFO
2533
LOGGING_LEVEL_LOGGERS_APP: INFO
26-
OIDC_OP_JWKS_ENDPOINT: https://keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/certs
27-
OIDC_OP_AUTHORIZATION_ENDPOINT: https://keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/auth
28-
OIDC_OP_TOKEN_ENDPOINT: https://keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/token
29-
OIDC_OP_USER_ENDPOINT: https://keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/userinfo
30-
OIDC_OP_LOGOUT_ENDPOINT: https://keycloak.127.0.0.1.nip.io/realms/impress/protocol/openid-connect/logout
31-
OIDC_RP_CLIENT_ID: impress
34+
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
35+
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
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
3242
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
3343
OIDC_RP_SIGN_ALGO: RS256
3444
OIDC_RP_SCOPES: "openid email"
35-
OIDC_VERIFY_SSL: False
36-
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
37-
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
38-
OIDC_REDIRECT_ALLOWED_HOSTS: https://impress.127.0.0.1.nip.io
39-
OIDC_AUTH_REQUEST_EXTRA_PARAMS: "{'acr_values': 'eidas1'}"
40-
LOGIN_REDIRECT_URL: https://impress.127.0.0.1.nip.io
41-
LOGIN_REDIRECT_URL_FAILURE: https://impress.127.0.0.1.nip.io
42-
LOGOUT_REDIRECT_URL: https://impress.127.0.0.1.nip.io
43-
POSTHOG_KEY: "{'id': 'posthog_key', 'host': 'https://product.impress.127.0.0.1.nip.io'}"
44-
DB_HOST: postgresql
45-
DB_NAME: impress
46-
DB_USER: dinum
47-
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: postgresql-dev-backend-postgres
49+
DB_NAME:
50+
secretKeyRef:
51+
name: postgresql-dev-backend-postgres
52+
key: database
53+
DB_USER:
54+
secretKeyRef:
55+
name: postgresql-dev-backend-postgres
56+
key: username
57+
DB_PASSWORD:
58+
secretKeyRef:
59+
name: postgresql-dev-backend-postgres
60+
key: password
4861
DB_PORT: 5432
49-
REDIS_URL: redis://default:pass@redis-master:6379/1
50-
AWS_S3_ENDPOINT_URL: http://minio.impress.svc.cluster.local:9000
51-
AWS_S3_ACCESS_KEY_ID: root
62+
REDIS_URL: redis://user:pass@redis-dev-backend-redis:6379/1
63+
DJANGO_CELERY_BROKER_URL: redis://user:pass@redis-dev-backend-redis:6379/1
64+
AWS_S3_ENDPOINT_URL: http://minio-dev-backend-minio.impress.svc.cluster.local:9000
65+
AWS_S3_ACCESS_KEY_ID: dinum
5266
AWS_S3_SECRET_ACCESS_KEY: password
53-
AWS_STORAGE_BUCKET_NAME: impress-media-storage
67+
AWS_STORAGE_BUCKET_NAME: docs-media-storage
5468
STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage
5569
Y_PROVIDER_API_BASE_URL: http://impress-y-provider:443/api/
5670
Y_PROVIDER_API_KEY: my-secret
57-
71+
CACHES_KEY_PREFIX: "{{ now | unixEpoch }}"
5872
migrate:
5973
command:
6074
- "/bin/sh"
6175
- "-c"
6276
- |
63-
python manage.py migrate --no-input &&
64-
python manage.py create_demo --force
65-
restartPolicy: Never
77+
while ! python manage.py check --database default > /dev/null 2>&1
78+
do
79+
echo "Database not ready"
80+
sleep 2
81+
done
6682
67-
command:
68-
- "gunicorn"
69-
- "-c"
70-
- "/usr/local/etc/gunicorn/impress.py"
71-
- "impress.wsgi:application"
72-
- "--reload"
83+
echo "Database is ready"
84+
85+
python manage.py migrate --no-input
86+
restartPolicy: Never
7387

7488
createsuperuser:
7589
command:
7690
- "/bin/sh"
7791
- "-c"
7892
- |
93+
while ! python manage.py check --database default > /dev/null 2>&1
94+
do
95+
echo "Database not ready"
96+
sleep 2
97+
done
98+
99+
echo "Database is ready"
79100
python manage.py createsuperuser --email [email protected] --password admin
80101
restartPolicy: Never
81102

82-
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false
103+
# Extra volume mounts to manage our local custom CA and avoid to set ssl_verify: false
83104
extraVolumeMounts:
84105
- name: certs
85106
mountPath: /cert/cacert.pem
86107
subPath: cacert.pem
87108

88-
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false
109+
# Extra volumes to manage our local custom CA and avoid to set ssl_verify: false
89110
extraVolumes:
90111
- name: certs
91112
configMap:
@@ -94,12 +115,7 @@ backend:
94115
- key: cacert.pem
95116
path: cacert.pem
96117
frontend:
97-
envVars:
98-
PORT: 8080
99-
NEXT_PUBLIC_API_ORIGIN: https://impress.127.0.0.1.nip.io
100-
101118
replicas: 1
102-
103119
image:
104120
repository: lasuite/impress-frontend
105121
pullPolicy: Always
@@ -114,60 +130,47 @@ yProvider:
114130
tag: "latest"
115131

116132
envVars:
133+
COLLABORATION_BACKEND_BASE_URL: https://docs.127.0.0.1.nip.io
117134
COLLABORATION_LOGGING: true
118-
COLLABORATION_SERVER_ORIGIN: https://impress.127.0.0.1.nip.io
135+
COLLABORATION_SERVER_ORIGIN: https://docs.127.0.0.1.nip.io
119136
COLLABORATION_SERVER_SECRET: my-secret
120137
Y_PROVIDER_API_KEY: my-secret
121-
COLLABORATION_BACKEND_BASE_URL: https://impress.127.0.0.1.nip.io
122-
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/cacert.pem
123-
124-
# Mount the certificate so yProvider can establish tls with the backend
125-
extraVolumeMounts:
126-
- name: certs
127-
mountPath: /usr/local/share/ca-certificates/cacert.pem
128-
subPath: cacert.pem
129-
130-
extraVolumes:
131-
- name: certs
132-
configMap:
133-
name: certifi
134-
items:
135-
- key: cacert.pem
136-
path: cacert.pem
137-
138-
posthog:
139-
ingress:
140-
enabled: false
141-
ingressAssets:
142-
enabled: false
143138

144139
ingress:
145140
enabled: true
146-
host: impress.127.0.0.1.nip.io
141+
host: docs.127.0.0.1.nip.io
142+
annotations:
143+
nginx.ingress.kubernetes.io/proxy-body-size: 10m
147144

148145
ingressCollaborationWS:
149146
enabled: true
150-
host: impress.127.0.0.1.nip.io
147+
host: docs.127.0.0.1.nip.io
151148

152149
ingressCollaborationApi:
153150
enabled: true
154-
host: impress.127.0.0.1.nip.io
151+
host: docs.127.0.0.1.nip.io
155152

156153
ingressAdmin:
157154
enabled: true
158-
host: impress.127.0.0.1.nip.io
155+
host: docs.127.0.0.1.nip.io
156+
157+
posthog:
158+
ingress:
159+
enabled: false
160+
161+
ingressAssets:
162+
enabled: false
159163

160164
ingressMedia:
161165
enabled: true
162-
host: impress.127.0.0.1.nip.io
166+
host: docs.127.0.0.1.nip.io
163167

164168
annotations:
165-
nginx.ingress.kubernetes.io/auth-url: https://impress.127.0.0.1.nip.io/api/v1.0/documents/media-auth/
169+
nginx.ingress.kubernetes.io/auth-url: https://docs.127.0.0.1.nip.io/api/v1.0/documents/media-auth/
166170
nginx.ingress.kubernetes.io/auth-response-headers: "Authorization, X-Amz-Date, X-Amz-Content-SHA256"
167-
nginx.ingress.kubernetes.io/upstream-vhost: minio.impress.svc.cluster.local:9000
168-
nginx.ingress.kubernetes.io/rewrite-target: /impress-media-storage/$1
171+
nginx.ingress.kubernetes.io/upstream-vhost: minio-dev-backend-minio.impress.svc.cluster.local:9000
172+
nginx.ingress.kubernetes.io/rewrite-target: /docs-media-storage/$1
169173

170174
serviceMedia:
171-
host: minio.impress.svc.cluster.local
175+
host: minio-dev-backend-minio.impress.svc.cluster.local
172176
port: 9000
173-

0 commit comments

Comments
 (0)