File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99# - hostPath volume mounts (source code mounted directly into pods)
1010# - Hupper (Python process watcher, auto-reloads on file changes)
1111
12+ import os
13+
1214# Configuration
1315k8s_context ('orbstack' )
16+
17+ # Dynamic paths (avoids hardcoding user-specific paths)
18+ HOME = os .environ ['HOME' ]
1419load ('ext://namespace' , 'namespace_create' )
1520
1621# Create namespace
@@ -119,7 +124,11 @@ k8s_resource(
119124# Application Resources
120125# =============================================================================
121126
122- k8s_yaml ('k8s/dev/app.yaml' )
127+ # Template app.yaml with dynamic paths
128+ app_yaml = str (read_file ('k8s/dev/app.yaml' ))
129+ app_yaml = app_yaml .replace ('__HOME__' , HOME )
130+ k8s_yaml (blob (app_yaml ))
131+
123132k8s_yaml ('k8s/dev/ingress.yaml' )
124133
125134# Cabotage Web App
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ spec:
106106 type : Directory
107107 - name : kubeconfig
108108 hostPath :
109- path : ~ /.kube
109+ path : __HOME__ /.kube
110110 type : Directory
111111---
112112# Cabotage App - Celery Worker
@@ -198,5 +198,5 @@ spec:
198198 type : Directory
199199 - name : kubeconfig
200200 hostPath :
201- path : /Users/coffee /.kube
201+ path : __HOME__ /.kube
202202 type : Directory
You can’t perform that action at this time.
0 commit comments