-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dedicated RPC-baking baker pod * expose secret key * add authorized key * ensure baker authorized keys are populated * deploy authorized keys automatically where they are needed * fix object prop access * no get for list * fix old mkchain terminology * mkchain with new model * decouple baker name and baking account name * rename bakers * rename nodes * round robin the bakers and nodes * support multiple protos, simplify params of mkchain * wip dal * move to oxford * point DAL to l1 * right values for mock srs * utils for DAL node * black + lower expected pow for dal * add right volume to dal init container * don't do anything special with dal in config-gen, just populate accts * get DAL pod to derive a list of pkh from a list of named accounts * fix typo * black * fix wrong key * switch to coma separated * fix signers * rename to DAL_NODE_RPC_URL * simpler name for dal * rename dal service, add node * round robin the DALs to bakers * round robin baker and dal to nodes * restore bootstrap * smaller slot size for injector * add slot pusher (temporary) * add slot activator * lint * slot injector supports configurable endpoints * only load needed private key in injector * add slot size as param * specify injector account * fix wrong case statement * make slot injector optional * simplify ingress name * emptyDir for slot-injector, remove sleep 3 * add servicemonitor for dal node * make sure it scrapes * fix issue when using local chart * re-add explicit authorized key * perhaps authorized_key is absent for activation account * pull most recent container * typo * remove DAL slot injector - was temporary * Always => IfNotPresent * add experimental label to bake_remotely * fix activation with authorized_key * black * fix tests & lint * add a global pull policy setting in tezos chart * improve logging, remove duplicate key import * fix activation * remove temp mkchain change * nairobi => oxford in values.yaml commented out examples
- Loading branch information
1 parent
779e478
commit d34dee0
Showing
19 changed files
with
510 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set -ex | ||
|
||
TEZ_VAR=/var/tezos | ||
TEZ_BIN=/usr/local/bin | ||
CLIENT_DIR="$TEZ_VAR/client" | ||
NODE_DIR="$TEZ_VAR/node" | ||
BAKER_EXTRA_ARGS_FROM_ENV=${BAKER_EXTRA_ARGS} | ||
mkdir -p $CLIENT_DIR | ||
|
||
per_block_vote_file=/etc/tezos/baker-config/${BAKER_NAME}-${PROTO_COMMAND}-per-block-votes.json | ||
|
||
if [ ! -f "$per_block_vote_file" ]; then | ||
echo "Error: $per_block_vote_file not found" >&2 | ||
exit 1 | ||
fi | ||
|
||
extra_args="--votefile ${per_block_vote_file}" | ||
|
||
if [ "${OPERATIONS_POOL}" != "" ]; then | ||
extra_args="${extra_args} --operations-pool ${OPERATIONS_POOL}" | ||
fi | ||
|
||
if [ "${DAL_NODE_RPC_URL}" != "" ]; then | ||
extra_args="${extra_args} --dal-node ${DAL_NODE_RPC_URL}" | ||
fi | ||
|
||
CLIENT="$TEZ_BIN/octez-client -d $CLIENT_DIR" | ||
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 | ||
|
||
exec $CMD --endpoint ${NODE_RPC_URL} run remotely ${extra_args} ${BAKER_EXTRA_ARGS_FROM_ENV} ${BAKE_USING_ACCOUNTS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{{- range $k, $v := .Values.bakers }} | ||
|
||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: baker-{{ $k }} | ||
spec: | ||
podManagementPolicy: Parallel | ||
replicas: 1 | ||
serviceName: baker-{{ $k }} | ||
selector: | ||
matchLabels: | ||
app: baker-{{ $k }} | ||
template: | ||
metadata: | ||
labels: | ||
app: baker-{{ $k }} | ||
spec: | ||
initContainers: | ||
- image: {{ $.Values.tezos_k8s_images.utils }} | ||
imagePullPolicy: {{ $.Values.tezos_k8s_images_pull_policy }} | ||
name: config-generator | ||
args: | ||
- config-generator | ||
envFrom: | ||
- configMapRef: | ||
name: tezos-config | ||
env: | ||
- name: MY_POD_NAME | ||
value: {{ $k }} | ||
- name: MY_POD_TYPE | ||
value: baker | ||
volumeMounts: | ||
- mountPath: /var/tezos | ||
name: baker-volume | ||
- mountPath: /etc/secret-volume | ||
name: tezos-accounts | ||
containers: | ||
{{- $baker_name := index $v.bake_using_accounts 0 }} | ||
{{- $account := get $.Values.accounts $baker_name | default dict }} | ||
{{- range ( $account.protocols | default $.Values.protocols ) }} | ||
- name: octez-baker-{{ lower .command }} | ||
image: "{{ $.Values.images.octez }}" | ||
imagePullPolicy: {{ $.Values.images_pull_policy }} | ||
volumeMounts: | ||
- mountPath: /var/tezos | ||
name: baker-volume | ||
- mountPath: /etc/tezos/baker-config | ||
name: baker-config | ||
command: | ||
- /bin/sh | ||
args: | ||
- "-c" | ||
- | | ||
{{ tpl ($.Files.Get "scripts/rpc-baker.sh") $ | indent 12 }} | ||
env: | ||
- name: NODE_RPC_URL | ||
value: "{{ $v.node_rpc_url }}" | ||
- name: PROTO_COMMAND | ||
value: "{{ .command }}" | ||
- name: BAKER_NAME | ||
value: {{ $baker_name }} | ||
- name: BAKE_USING_ACCOUNTS | ||
value: {{ join " " $v.bake_using_accounts }} | ||
{{- if $v.operations_pool | default false }} | ||
- name: OPERATIONS_POOL | ||
value: "{{ $v.operations_pool }}" | ||
{{- end }} | ||
{{- if $v.dal_node_rpc_url | default false }} | ||
- name: DAL_NODE_RPC_URL | ||
value: "{{ $v.dal_node_rpc_url }}" | ||
{{- end }} | ||
{{- end }} | ||
securityContext: | ||
fsGroup: 1000 | ||
volumes: | ||
- name: baker-config | ||
configMap: | ||
name: baker-config | ||
- name: tezos-accounts | ||
secret: | ||
secretName: tezos-secret | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: baker-volume | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: "1Gi" | ||
--- | ||
{{- end }} |
Oops, something went wrong.