Skip to content

Commit 949abf5

Browse files
committed
Add local dev platform with Tilt, Skaffold, and VS Code tools
Ships hot-reload Tiltfile, Skaffold profile, 12 dev templates, VS Code extension stub, and developer experience guide for sub-hour onboarding.
1 parent d68fa3b commit 949abf5

18 files changed

Lines changed: 702 additions & 0 deletions

Tiltfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Tilt local development for Stellar-K8s
2+
# Usage: tilt up
3+
4+
allow_k8s_contexts('kind-stellar', 'k3d-stellar')
5+
6+
local_resource(
7+
'build-operator',
8+
'cargo build --bin stellar-operator --features rest-api,metrics,admission-webhook,k8s-v1-30',
9+
deps=['src', 'Cargo.toml'],
10+
ignore=['target'],
11+
)
12+
13+
docker_build(
14+
'stellar-operator',
15+
'.',
16+
dockerfile='Dockerfile',
17+
only=['target/release/stellar-operator', 'target/release/kubectl-stellar'],
18+
live_update=[
19+
sync('./target/debug/stellar-operator', '/usr/local/bin/stellar-operator'),
20+
],
21+
)
22+
23+
k8s_yaml('config/manifests/operator-deployment.yaml')
24+
k8s_resource('stellar-operator', port_forwards=['8080:8080', '9090:9090'])
25+
26+
local_resource(
27+
'cargo-watch',
28+
serve_cmd='cargo watch -x "run --bin stellar-operator --features rest-api,metrics,admission-webhook,k8s-v1-30"',
29+
resource_deps=['build-operator'],
30+
allow_parallel=True,
31+
)

dev/templates/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Stellar-K8s developer resource templates
2+
# Copy any template to bootstrap common workflows.

dev/templates/debug-operator.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

dev/templates/horizon-dev.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

dev/templates/log-stream.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

dev/templates/metrics-scrape.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

dev/templates/network-policy.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

dev/templates/registry-scan.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

dev/templates/secret-vault.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# validator-testnet.yaml
2+
# Lightweight example of a Stellar Core Validator node for the Testnet.
3+
# Useful for development, testing, and CI environments.
4+
5+
apiVersion: stellar.org/v1alpha1
6+
kind: StellarNode
7+
metadata:
8+
name: validator-testnet
9+
namespace: stellar
10+
spec:
11+
# 'Validator' runs stellar-core synchronously with the network.
12+
nodeType: Validator
13+
14+
# 'Testnet' uses the SDF Test Network passphrase and default archives.
15+
network: testnet
16+
17+
version: "v21.0.0"
18+
19+
# Required rollout availability and spreading constraints.
20+
maxUnavailable: 0
21+
minAvailable: 1
22+
topologySpreadConstraints: []
23+
24+
# Balanced resources for a Testnet workload.
25+
resources:
26+
requests:
27+
cpu: "500m"
28+
memory: "1Gi"
29+
limits:
30+
cpu: "1"
31+
memory: "2Gi"
32+
33+
storage:
34+
storageClass: "standard"
35+
# Testnet ledger is significantly smaller than Mainnet.
36+
size: "100Gi"
37+
# 'Delete' automatically cleans up the PVC when the resource is deleted.
38+
retentionPolicy: Delete
39+
40+
validatorConfig:
41+
# Seed secret for the Testnet validator.
42+
seedSecretRef: "validator-seed-testnet"
43+
# Enable history archiving for full sync capabilities.
44+
enableHistoryArchive: true

0 commit comments

Comments
 (0)