Skip to content

Commit d36ea59

Browse files
authored
fix(op-faucet): set op.network.id label (#341)
This change sets the faucet labels properly, so we can use them in service recognition downstream.
1 parent d7f3c8b commit d36ea59

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/faucet/op-faucet/op_faucet_launcher.star

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,24 @@ def launch(
3232
)
3333

3434
config = _get_config(
35-
image,
36-
faucet_config,
35+
image=image,
36+
faucet_config=faucet_config,
37+
network_ids=[f.ChainID for f in faucets],
3738
)
3839
plan.add_service(service_name, config)
3940

4041

4142
def _get_config(
4243
image,
4344
faucet_config,
45+
network_ids,
4446
):
4547
"""Get the ServiceConfig for the op-faucet service.
4648
4749
Args:
4850
image (str): The image to use for the op-faucet service.
4951
faucet_config (artifact): The config artifact for the op-faucet service.
52+
network_ids (list of str): The network IDs to use for the op-faucet service.
5053
"""
5154
mount_path = "/config"
5255
cmd = [
@@ -66,8 +69,8 @@ def _get_config(
6669
),
6770
},
6871
labels={
69-
"op.kind": "faucet"
70-
# TODO Add network IDs
72+
"op.kind": "faucet",
73+
"op.network.id": "-".join(network_ids),
7174
},
7275
files={
7376
mount_path: faucet_config,

0 commit comments

Comments
 (0)