From b4094942ef70ab6611c4ac46254435b38ebd811f Mon Sep 17 00:00:00 2001 From: Nicolas Ochem Date: Sat, 9 Dec 2023 23:49:51 -0800 Subject: [PATCH] add authorized key --- charts/tezos/scripts/rpc-baker.sh | 1 - charts/tezos/templates/octez-baker.yaml | 2 +- test/charts/mainnet.expect.yaml | 10 ++++++++++ test/charts/mainnet2.expect.yaml | 10 ++++++++++ test/charts/private-chain.expect.yaml | 2 ++ utils/config-generator.py | 5 +---- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/charts/tezos/scripts/rpc-baker.sh b/charts/tezos/scripts/rpc-baker.sh index 8ca36e150..874bcdcd9 100644 --- a/charts/tezos/scripts/rpc-baker.sh +++ b/charts/tezos/scripts/rpc-baker.sh @@ -30,5 +30,4 @@ CMD="$TEZ_BIN/octez-baker-${PROTO_COMMAND} -d $CLIENT_DIR" # ensure we can run octez-client commands without specifying client dir ln -s /var/tezos/client /home/tezos/.tezos-client -sleep 10000 exec $CMD --endpoint ${NODE_RPC_URL} run remotely ${extra_args} ${BAKER_EXTRA_ARGS_FROM_ENV} ${BAKE_USING_ACCOUNTS} diff --git a/charts/tezos/templates/octez-baker.yaml b/charts/tezos/templates/octez-baker.yaml index a8a9a3f81..f7220fc49 100644 --- a/charts/tezos/templates/octez-baker.yaml +++ b/charts/tezos/templates/octez-baker.yaml @@ -18,7 +18,7 @@ spec: spec: initContainers: - image: {{ $.Values.tezos_k8s_images.utils }} - imagePullPolicy: IfNotPresent + imagePullPolicy: Always name: config-generator args: - config-generator diff --git a/test/charts/mainnet.expect.yaml b/test/charts/mainnet.expect.yaml index 0d94865b1..a8e58abbd 100644 --- a/test/charts/mainnet.expect.yaml +++ b/test/charts/mainnet.expect.yaml @@ -73,6 +73,16 @@ data: {} OCTEZ_ROLLUP_NODES: | {} + OCTEZ_BAKERS: | + {} +--- +# Source: tezos-chain/templates/configs.yaml +apiVersion: v1 +data: +kind: ConfigMap +metadata: + name: baker-config + namespace: testing --- # Source: tezos-chain/templates/static.yaml apiVersion: v1 diff --git a/test/charts/mainnet2.expect.yaml b/test/charts/mainnet2.expect.yaml index 1efec4ed2..b1d7a1b67 100644 --- a/test/charts/mainnet2.expect.yaml +++ b/test/charts/mainnet2.expect.yaml @@ -120,6 +120,16 @@ data: {} OCTEZ_ROLLUP_NODES: | {} + OCTEZ_BAKERS: | + {} +--- +# Source: tezos-chain/templates/configs.yaml +apiVersion: v1 +data: +kind: ConfigMap +metadata: + name: baker-config + namespace: testing --- # Source: tezos-chain/templates/static.yaml apiVersion: v1 diff --git a/test/charts/private-chain.expect.yaml b/test/charts/private-chain.expect.yaml index 703a2fd89..f6de434d6 100644 --- a/test/charts/private-chain.expect.yaml +++ b/test/charts/private-chain.expect.yaml @@ -216,6 +216,8 @@ data: } OCTEZ_ROLLUP_NODES: | {} + OCTEZ_BAKERS: | + {} --- # Source: tezos-chain/templates/configs.yaml apiVersion: v1 diff --git a/utils/config-generator.py b/utils/config-generator.py index ac0bc5987..cae6b4d22 100755 --- a/utils/config-generator.py +++ b/utils/config-generator.py @@ -349,10 +349,7 @@ def expose_secret_key(account_name): if MY_POD_TYPE == "rollup": return account_name == MY_POD_CONFIG.get("operator_account") - if MY_POD_TYPE == "baker": - return account_name in MY_POD_CONFIG.get("bake_using_accounts") - - if MY_POD_TYPE == "node": + if MY_POD_TYPE in [ "node", "baker" ]: if MY_POD_CONFIG.get("bake_using_account", "") == account_name: return True if account_name in MY_POD_CONFIG.get("authorized_keys", {}):