Skip to content

Commit e93a095

Browse files
committed
build: Move locale.yaml to new mount location
Hopefully will fix k8s build issues around the size of the pythonpath configmap.
1 parent 6c9f957 commit e93a095

File tree

7 files changed

+36
-3
lines changed

7 files changed

+36
-3
lines changed

scripts/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def get_text_for_translations(root_path):
2929
assets_file = (
30-
root_path + "/env/plugins/aspects/apps/superset/pythonpath/assets.yaml"
30+
root_path + "/env/plugins/aspects/apps/superset/localization/assets.yaml"
3131
)
3232

3333
strings = []
@@ -96,7 +96,7 @@ def compile_translations(root_path):
9696
tx.fetch_translations()
9797

9898
translation_file = (
99-
"tutoraspects/templates/aspects/apps/superset/pythonpath/locale.yaml"
99+
"tutoraspects/templates/aspects/apps/superset/localization/locale.yaml"
100100
)
101101
file = open(translation_file, "w")
102102

tutoraspects/patches/k8s-deployments

+15
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ spec:
211211
name: docker
212212
- mountPath: /app/pythonpath
213213
name: pythonpath
214+
- mountPath: /app/localization
215+
name: localization
214216
- mountPath: /app/security
215217
name: security
216218
volumes:
@@ -220,6 +222,9 @@ spec:
220222
- name: pythonpath
221223
configMap:
222224
name: superset-pythonpath
225+
- name: localization
226+
configMap:
227+
name: superset-localization
223228
- name: security
224229
configMap:
225230
name: superset-security
@@ -300,6 +305,8 @@ spec:
300305
name: docker
301306
- mountPath: /app/pythonpath
302307
name: pythonpath
308+
- mountPath: /app/localization
309+
name: localization
303310
- mountPath: /app/security
304311
name: security
305312
volumes:
@@ -309,6 +316,9 @@ spec:
309316
- name: pythonpath
310317
configMap:
311318
name: superset-pythonpath
319+
- name: localization
320+
configMap:
321+
name: superset-localization
312322
- name: security
313323
configMap:
314324
name: superset-security
@@ -389,6 +399,8 @@ spec:
389399
name: docker
390400
- mountPath: /app/pythonpath
391401
name: pythonpath
402+
- mountPath: /app/localization
403+
name: localization
392404
- mountPath: /app/security
393405
name: security
394406
volumes:
@@ -398,6 +410,9 @@ spec:
398410
- name: pythonpath
399411
configMap:
400412
name: superset-pythonpath
413+
- name: localization
414+
configMap:
415+
name: superset-localization
401416
- name: security
402417
configMap:
403418
name: superset-security

tutoraspects/patches/k8s-jobs

+10
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ spec:
216216
name: docker
217217
- mountPath: /app/pythonpath
218218
name: pythonpath
219+
- mountPath: /app/localization
220+
name: localization
219221
- mountPath: /app/security
220222
name: security
221223
- mountPath: /app/assets
@@ -227,6 +229,9 @@ spec:
227229
- name: pythonpath
228230
configMap:
229231
name: superset-pythonpath
232+
- name: localization
233+
configMap:
234+
name: superset-localization
230235
- name: security
231236
configMap:
232237
name: superset-security
@@ -296,6 +301,8 @@ spec:
296301
name: docker
297302
- mountPath: /app/pythonpath
298303
name: pythonpath
304+
- mountPath: /app/localization
305+
name: localization
299306
- mountPath: /app/security
300307
name: security
301308
- mountPath: /app/assets
@@ -307,6 +314,9 @@ spec:
307314
- name: pythonpath
308315
configMap:
309316
name: superset-pythonpath
317+
- name: localization
318+
configMap:
319+
name: superset-localization
310320
- name: security
311321
configMap:
312322
name: superset-security

tutoraspects/patches/kustomization-configmapgenerator

+7
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@
6868
labels:
6969
app.kubernetes.io/name: superset
7070

71+
- name: superset-localization
72+
files:{% for file in "aspects/apps/superset/localization"|walk_templates %}
73+
- plugins/{{ file }}{% endfor %}
74+
options:
75+
labels:
76+
app.kubernetes.io/name: superset
77+
7178
- name: superset-security
7279
files:
7380
- plugins/aspects/apps/superset/security/roles.json

tutoraspects/templates/aspects/apps/superset/pythonpath/create_assets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
FILE_NAME_ATTRIBUTE = "_file_name"
3535

36-
TRANSLATIONS_FILE_PATH = "/app/pythonpath/locale.yaml"
36+
TRANSLATIONS_FILE_PATH = "/app/localization/locale.yaml"
3737
ASSETS_FILE_PATH = "/app/pythonpath/assets.yaml"
3838

3939
merged_data = {}

tutoraspects/templates/base-docker-compose-services

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ image: {{ DOCKER_IMAGE_SUPERSET }}
33
volumes:
44
- ../../env/plugins/aspects/apps/superset/docker:/app/docker
55
- ../../env/plugins/aspects/apps/superset/pythonpath:/app/pythonpath
6+
- ../../env/plugins/aspects/apps/superset/localization:/app/localization
67
- ../../env/plugins/aspects/apps/superset/security:/app/security
78
- ../../env/plugins/aspects/apps/superset/superset_home:/app/superset_home
89
- ../../env/plugins/aspects/apps/superset/assets:/app/assets

0 commit comments

Comments
 (0)