Skip to content

Commit

Permalink
add authorized key
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Dec 10, 2023
1 parent c668884 commit b409494
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
1 change: 0 additions & 1 deletion charts/tezos/scripts/rpc-baker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion charts/tezos/templates/octez-baker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
spec:
initContainers:
- image: {{ $.Values.tezos_k8s_images.utils }}
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
name: config-generator
args:
- config-generator
Expand Down
10 changes: 10 additions & 0 deletions test/charts/mainnet.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions test/charts/mainnet2.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/charts/private-chain.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ data:
}
OCTEZ_ROLLUP_NODES: |
{}
OCTEZ_BAKERS: |
{}
---
# Source: tezos-chain/templates/configs.yaml
apiVersion: v1
Expand Down
5 changes: 1 addition & 4 deletions utils/config-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", {}):
Expand Down

0 comments on commit b409494

Please sign in to comment.