@@ -45,17 +45,17 @@ def generate_all_skaffolds():
45
45
# Clean up and create temporary directory
46
46
shutil .rmtree (f"{ GENERATED_SKAFFOLD_TMP_DIR } " , ignore_errors = True )
47
47
os .makedirs (f'{ GENERATED_SKAFFOLD_TMP_DIR } ' , exist_ok = True )
48
-
48
+
49
49
# Create an empty .gitkeep file
50
50
with open (f'{ GENERATED_SKAFFOLD_TMP_DIR } /.gitkeep' , 'w' ) as f :
51
51
f .write ("" )
52
-
52
+
53
53
# Load secrets
54
54
# Load configuration from YAML
55
55
with open (config_path , 'r' ) as f :
56
56
config = yaml .safe_load (f )
57
57
env_vars = config .get ('env' , {})
58
-
58
+
59
59
# Core infrastructure
60
60
increase_fs_watchers_limit = create_increase_fs_watchers_limit (
61
61
slug = "increase-fs-watchers-limit" ,
@@ -148,14 +148,14 @@ def generate_all_skaffolds():
148
148
)
149
149
# Get disk configurations from config
150
150
longhorn_disks = longhorn_config .get ('LONGHORN_DISKS' , [])
151
-
151
+
152
152
# Ensure each disk has the correct node selector format
153
153
for disk in longhorn_disks :
154
154
if 'node_selector' not in disk and 'kubernetes.io/hostname' not in disk .get ('node_selector' , {}):
155
155
# If node name is specified but not in the correct format, fix it
156
156
if 'node' in disk :
157
157
disk ['node_selector' ] = {'kubernetes.io/hostname' : disk ['node' ]}
158
-
158
+
159
159
# Define storage classes for different performance tiers
160
160
longhorn_storage_classes = [
161
161
{
@@ -183,7 +183,7 @@ def generate_all_skaffolds():
183
183
"fs_type" : "ext4"
184
184
}
185
185
]
186
-
186
+
187
187
longhorn = create_longhorn (
188
188
slug = "longhorn" ,
189
189
namespace = "longhorn-system" ,
@@ -395,20 +395,20 @@ def generate_all_skaffolds():
395
395
whatsapp_waha_postgres_instance ,
396
396
whatsapp_waha ,
397
397
]
398
-
398
+
399
399
# Generate skaffold configurations
400
400
generate_skaffolds (
401
401
components = components ,
402
402
)
403
-
403
+
404
404
# Generate IntelliJ run configurations if enabled
405
405
if INTELLIJ_RUN_CONFIGURATIONS_ENABLED or env_vars ['INTELLIJ_RUN_CONFIGURATIONS_ENABLED' ].lower () == 'true' :
406
406
generate_intelij_skaffolds_run_configurations ()
407
-
407
+
408
408
# Sync generated files to the final directory
409
409
subprocess .call (["rsync" , "-rcvu" , "--delete" , f"{ GENERATED_SKAFFOLD_TMP_DIR } /" , f"{ GENERATED_SKAFFOLD_DIR } /" ])
410
410
subprocess .call (["rm" , "-rf" , f"{ GENERATED_SKAFFOLD_TMP_DIR } /" ])
411
411
412
412
413
413
if __name__ == '__main__' :
414
- generate_all_skaffolds ()
414
+ generate_all_skaffolds ()
0 commit comments