Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2. Add HotReload to Just Clusters #9308

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions justfiles/cluster.just
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ delete-high: (delete-cluster cluster_high)
[group('highside')]
deploy-high: (deploy-devspace cluster_high ns_default)

# Deploy Syft to the high-side cluster in Hot Reload Mode
[group('highside')]
hotreload-high: (hotreload-devspace cluster_high ns_default)

# Reset Syft DB state in the high-side cluster
[group('highside')]
reset-high: (reset-syft cluster_high ns_default)
Expand All @@ -34,6 +38,10 @@ delete-low: (delete-cluster cluster_low)
[group('lowside')]
deploy-low: (deploy-devspace cluster_low ns_default "-p datasite-low")

# Deploy Syft to the low-side cluster in Hot Reload Mode
[group('lowside')]
hotreload-low: (hotreload-devspace cluster_low ns_default "-p datasite-low")

# Reset Syft DB state in the low-side cluster
[group('lowside')]
reset-low: (reset-syft cluster_low ns_default)
Expand All @@ -56,6 +64,10 @@ delete-gw: (delete-cluster cluster_gw)
[group('gateway')]
deploy-gw: (deploy-devspace cluster_gw ns_default "-p gateway")

# Deploy Syft to the gateway cluster in Hot Reload Mode
[group('gateway')]
hotreload-gw: (hotreload-devspace cluster_gw ns_default "-p gateway")

# Reset Syft DB state in the gateway cluster
[group('gateway')]
reset-gw: (reset-syft cluster_gw ns_default)
Expand Down
26 changes: 26 additions & 0 deletions justfiles/devspace.just
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,32 @@ deploy-devspace cluster namespace *args='':
{{ args }} \
--var CONTAINER_REGISTRY={{ registry_url }}


[group('devspace')]
[private]
hotreload-devspace cluster namespace *args='':
#!/bin/bash
set -euo pipefail

cd packages/grid

PROFILE="{{ _g_profiles }}"
PROFILE=$(echo "$PROFILE" | sed -E 's/^,*|,*$//g')
if [ -n "$PROFILE" ]; then
PROFILE="-p $PROFILE"
fi

echo "Deploying to {{ cluster }}"

devspace dev \
--no-warn \
--kube-context {{ cluster }} \
--namespace {{ namespace }} \
$PROFILE \
{{ args }} \
--var CONTAINER_REGISTRY={{ registry_url }}


[group('devspace')]
[private]
purge-devspace cluster namespace:
Expand Down