Skip to content

Commit

Permalink
Merge branch 'main' into feat/linting-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
h5law committed Jan 16, 2024
2 parents 0574b25 + 8ae2494 commit 38e4df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion localnet/kubernetes/celestia-rollkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
# TODO(@okdas): Very scary line. Basically, waits until the node key (NJ3XILLTMVRXEZLUFZVHO5A) exists, signs the JWT and pushes it to k8s secret.
args:
[
'while true; do if [ -f /home/celestia/bridge/keys/NJ3XILLTMVRXEZLUFZVHO5A ]; then OUTPUT=$(celestia bridge --node.store /home/celestia/bridge auth admin); BASE64_OUTPUT=$(echo -n $OUTPUT | base64 -w 0); TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token); PAYLOAD=$(echo -n ''{"apiVersion":"v1","kind":"Secret","metadata":{"name":"celestia-secret"},"data":{"auth_token":"''${BASE64_OUTPUT}''"}}''); RESPONSE=$(curl -k -H "Authorization: Bearer $TOKEN" -H ''Content-Type: application/json'' -X PUT -d "$PAYLOAD" https://kubernetes.default.svc/api/v1/namespaces/default/secrets/celestia-secret); echo $RESPONSE | grep ''"code": 404'' >/dev/null && curl -k -H "Authorization: Bearer $TOKEN" -H ''Content-Type: application/json'' -X POST -d "$PAYLOAD" https://kubernetes.default.svc/api/v1/namespaces/default/secrets; while true; do sleep 86400; done; fi; sleep 2; done;',
'while true; do if [ -f /home/celestia/bridge/keys/NJ3XILLTMVRXEZLUFZVHO5A ]; then OUTPUT=$(celestia bridge --node.store /home/celestia/bridge auth admin); BASE64_OUTPUT=$(echo -n $OUTPUT | base64 -w 0); TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token); PAYLOAD=$(echo -n ''{"apiVersion":"v1","kind":"Secret","metadata":{"name":"celestia-secret"},"data":{"auth_token":"''${BASE64_OUTPUT}''"}}''); RESPONSE=$(curl -k -H "Authorization: Bearer $TOKEN" -H ''Content-Type: application/json'' -X PUT -d "$PAYLOAD" https://kubernetes.default.svc.cluster.local/api/v1/namespaces/default/secrets/celestia-secret); echo $RESPONSE | grep ''"code": 404'' >/dev/null && curl -k -H "Authorization: Bearer $TOKEN" -H ''Content-Type: application/json'' -X POST -d "$PAYLOAD" https://kubernetes.default.svc.cluster.local/api/v1/namespaces/default/secrets; while true; do sleep 86400; done; fi; sleep 2; done;',
]
volumeMounts:
- name: bridge-volume
Expand Down

0 comments on commit 38e4df2

Please sign in to comment.