Skip to content

Commit 017f9b6

Browse files
committed
spin up nodes as pods not deployments
1 parent e98c6be commit 017f9b6

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

src/warnet/cli/network.py

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -166,31 +166,24 @@ def create_node_deployment(node: int, data: dict) -> dict:
166166
bitcoin_config = data.get("bitcoin_config", "")
167167

168168
return {
169-
"apiVersion": "apps/v1",
170-
"kind": "Deployment",
169+
"apiVersion": "v1",
170+
"kind": "Pod",
171171
"metadata": {
172172
"name": f"warnet-node-{node}",
173173
"namespace": "warnet",
174174
"labels": {"app": "warnet", "node": str(node)},
175175
},
176176
"spec": {
177-
"replicas": 1,
178-
"selector": {"matchLabels": {"app": "warnet", "node": str(node)}},
179-
"template": {
180-
"metadata": {"labels": {"app": "warnet", "node": str(node)}},
181-
"spec": {
182-
"containers": [
183-
{
184-
"name": "bitcoin",
185-
"image": image,
186-
"env": [
187-
{"name": "BITCOIN_VERSION", "value": version},
188-
{"name": "BITCOIN_CONFIG", "value": bitcoin_config},
189-
],
190-
}
191-
]
192-
},
193-
},
177+
"containers": [
178+
{
179+
"name": "bitcoin",
180+
"image": image,
181+
"env": [
182+
{"name": "BITCOIN_VERSION", "value": version},
183+
{"name": "BITCOIN_CONFIG", "value": bitcoin_config},
184+
],
185+
}
186+
]
194187
},
195188
}
196189

0 commit comments

Comments
 (0)