Skip to content

Commit 2c66d10

Browse files
committed
refactor: restructure platform for multi-deployment support
- Move shared components to platform/base/ - Move Kind-specific components to platform/deployments/kind/ - Create platform/deployments/k3s/ skeleton for GPU server deployment - Add root bootstrap.sh dispatcher with --deployment flag - Update all ArgoCD app paths to reflect new structure Structure: platform/base/ - Shared (CRDs, controller, RBAC, auth, catalog) platform/deployments/ - Deployment-specific (kind, k3s) Usage: ./bootstrap.sh --deployment kind [options] ./bootstrap.sh --deployment k3s [options]
1 parent 8598c07 commit 2c66d10

143 files changed

Lines changed: 84 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bootstrap.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
# Aphex Platform Bootstrap Dispatcher
6+
#
7+
# Routes to deployment-specific bootstrap scripts based on --deployment flag.
8+
#
9+
# Usage:
10+
# ./bootstrap.sh --deployment kind [options]
11+
# ./bootstrap.sh --deployment k3s [options]
12+
13+
DEPLOYMENT=""
14+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
15+
16+
# Parse --deployment flag first
17+
while [[ $# -gt 0 ]]; do
18+
case $1 in
19+
--deployment)
20+
DEPLOYMENT="$2"
21+
shift 2
22+
;;
23+
*)
24+
break
25+
;;
26+
esac
27+
done
28+
29+
if [[ -z "$DEPLOYMENT" ]]; then
30+
echo "Usage: $0 --deployment <kind|k3s> [options]"
31+
echo ""
32+
echo "Deployments:"
33+
echo " kind Local Kind cluster (development)"
34+
echo " k3s K3s cluster with GPU support (production)"
35+
exit 1
36+
fi
37+
38+
BOOTSTRAP_SCRIPT="$SCRIPT_DIR/platform/deployments/$DEPLOYMENT/bootstrap/bootstrap.sh"
39+
40+
if [[ ! -f "$BOOTSTRAP_SCRIPT" ]]; then
41+
echo "Error: Bootstrap script not found for deployment '$DEPLOYMENT'"
42+
echo "Expected: $BOOTSTRAP_SCRIPT"
43+
exit 1
44+
fi
45+
46+
exec "$BOOTSTRAP_SCRIPT" "$@"

platform/argocd/apps/platform-auth.yaml renamed to platform/base/argocd/apps/platform-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
source:
1313
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1414
targetRevision: HEAD
15-
path: platform/auth
15+
path: platform/base/auth
1616
directory:
1717
recurse: true
1818
destination:

platform/argocd/apps/platform-catalog.yaml renamed to platform/base/argocd/apps/platform-catalog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
source:
1313
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1414
targetRevision: HEAD
15-
path: platform/catalog
15+
path: platform/base/catalog
1616
destination:
1717
server: https://kubernetes.default.svc
1818
namespace: platform-system

platform/argocd/apps/platform-cert-foundation.yaml renamed to platform/base/argocd/apps/platform-cert-foundation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
source:
1111
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1212
targetRevision: HEAD
13-
path: platform/cert-foundation
13+
path: platform/deployments/kind/cert-foundation
1414
destination:
1515
server: https://kubernetes.default.svc
1616
syncPolicy:

platform/argocd/apps/platform-cert-manager.yaml renamed to platform/base/argocd/apps/platform-cert-manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
source:
1414
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1515
targetRevision: HEAD
16-
path: platform/cert-manager
16+
path: platform/base/cert-manager
1717

1818
destination:
1919
server: https://kubernetes.default.svc

platform/argocd/apps/platform-controllers.yaml renamed to platform/base/argocd/apps/platform-controllers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
source:
1313
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1414
targetRevision: HEAD
15-
path: platform/platform-controller
15+
path: platform/base/platform-controller
1616
destination:
1717
server: https://kubernetes.default.svc
1818
namespace: platform-system

platform/argocd/apps/platform-crds.yaml renamed to platform/base/argocd/apps/platform-crds.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
source:
1313
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1414
targetRevision: HEAD
15-
path: platform/crds
15+
path: platform/base/crds
1616
destination:
1717
server: https://kubernetes.default.svc
1818
namespace: platform-system

platform/argocd/apps/platform-gpu.yaml renamed to platform/base/argocd/apps/platform-gpu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
source:
1414
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1515
targetRevision: HEAD
16-
path: platform/gpu
16+
path: platform/deployments/kind/gpu
1717
destination:
1818
server: https://kubernetes.default.svc
1919
# RuntimeClass is cluster-scoped, namespace is ignored but required

platform/argocd/apps/platform-ingress-controller.yaml renamed to platform/base/argocd/apps/platform-ingress-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
source:
1414
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1515
targetRevision: HEAD
16-
path: platform/ingress-controller
16+
path: platform/deployments/kind/ingress-controller
1717

1818
destination:
1919
server: https://kubernetes.default.svc

platform/argocd/apps/platform-ingress.yaml renamed to platform/base/argocd/apps/platform-ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
source:
1414
repoURL: https://github.com/bdchatham/AphexPlatformInfrastructure.git
1515
targetRevision: HEAD
16-
path: platform/ingress
16+
path: platform/deployments/kind/ingress
1717

1818
destination:
1919
server: https://kubernetes.default.svc

0 commit comments

Comments
 (0)