ObolNetwork / charon-k8s-distributed-validator-cluster

A set of Kubernetes manifests for deploying Distributed Validator Clusters.
3 stars 0 forks source link

The sh command inside Nimbus and Lodestar VC template does not resolve variables #97

Closed sugh01 closed 1 year ago

sugh01 commented 1 year ago

šŸž Bug Report

Description

The InitContainer step needs to run a command -

init_container:
          - name: init-nimbus
            image: statusim/nimbus-eth2:$NIMBUS_VERSION
            command:
              - sh
              - -ac
              - "tmp=/data/nimbus/nimbus-keystores \n mkdir -p $${tmp}\n for f in /validator_keys/keystore-*.json; do\n  cp $${f} $${tmp}\n  cat $${f%.*}.txt | \\\n  /home/user/nimbus_beacon_node deposits import \\\n  --log-level=debug \\\n --data-dir=/data/nimbus \\\n  /data/nimbus/nimbus-keystores \n  rm $${tmp}/$(basename $${f}) \n done\n"
            volume_mount:
              - name: data
                mount_path: /data/nimbus
              - name: validators
                mount_path: /validator_keys
            security_context:
              run_as_user: 0

However, this does not succeed, the InitContainer crashes.

šŸ”¬ Minimal Reproduction

  1. Set a kubectl namespace, can use a namespace with a running cluster - like canary-goerli-exit-3
  2. Add a Nimbus VC to the .env file VC_TYPES=0,1,2,3 3=nimbus
  3. Upload the file to gcp storage
  4. Run deploy cluster

šŸ”„ Error

The Nimbus VC pod crashes. User kubectl describe pod to check for the error inside the pod Notice that the variables inside the initContainer sh command, are not getting resolved

aly-obol commented 1 year ago

Story Points: 3 See the discussion in Sizing - Platform

Powered by Parabol