From 6eabb8b9234cf2244db808e078859bdee187e132 Mon Sep 17 00:00:00 2001 From: Aleksey Lazarev Date: Tue, 18 Jun 2024 13:50:17 +0400 Subject: [PATCH] feat(aethos+arpa): add registration and some instruction --- charts/aethos/Chart.yaml | 2 +- charts/aethos/templates/register.tpl | 10 +++++-- charts/aethos/templates/statefulset.tpl | 3 -- charts/aethos/values.holesky.yaml | 3 ++ charts/aethos/values.mainnet.yaml | 3 ++ charts/arpa/Chart.yaml | 2 +- charts/arpa/README.md | 13 +++++++++ charts/arpa/templates/register.tpl | 38 +++++++++++++++++++++++++ charts/arpa/values.mainnet.yaml | 3 ++ charts/arpa/values.yaml | 24 ++++++++++------ 10 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 charts/arpa/templates/register.tpl diff --git a/charts/aethos/Chart.yaml b/charts/aethos/Chart.yaml index bb9eca0..8c38c50 100644 --- a/charts/aethos/Chart.yaml +++ b/charts/aethos/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 0.1.0 description: A Helm chart for Kubernetes name: aethos type: application -version: 0.1.1 +version: 0.1.2 maintainers: - name: xom4ek email: aleksei.lazarev@p2p.org diff --git a/charts/aethos/templates/register.tpl b/charts/aethos/templates/register.tpl index 397488a..72bd677 100644 --- a/charts/aethos/templates/register.tpl +++ b/charts/aethos/templates/register.tpl @@ -12,6 +12,13 @@ spec: labels: {{- include "aethosRegister.labels" . | nindent 8 }} spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app: {{ include "aethos.fullname" . }} + topologyKey: "kubernetes.io/hostname" containers: - name: register image: "{{ .Values.register.image.repository }}:{{ .Values.register.image.tag | default .Chart.AppVersion }}" @@ -22,9 +29,6 @@ spec: {{- toYaml .Values.node.env | nindent 12 }} volumeMounts: {{- toYaml .Values.node.volumeMounts | nindent 12 }} - - name: config - mountPath: /app/config/operator.yaml - subPath: operator.yaml restartPolicy: Never volumes: {{- toYaml .Values.volumes | nindent 8 }} diff --git a/charts/aethos/templates/statefulset.tpl b/charts/aethos/templates/statefulset.tpl index 26954f7..bfddfef 100644 --- a/charts/aethos/templates/statefulset.tpl +++ b/charts/aethos/templates/statefulset.tpl @@ -69,9 +69,6 @@ spec: {{- with .Values.node.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} - - name: config - mountPath: /app/config/operator.yaml - subPath: operator.yaml env: {{- toYaml .Values.node.env | nindent 12 }} volumes: diff --git a/charts/aethos/values.holesky.yaml b/charts/aethos/values.holesky.yaml index 1469565..d4ef91c 100644 --- a/charts/aethos/values.holesky.yaml +++ b/charts/aethos/values.holesky.yaml @@ -6,6 +6,9 @@ node: readOnly: true - name: aethos mountPath: /app/data/ + - name: config + mountPath: /app/config/operator.yaml + subPath: operator.yaml env: - name: AETHOS_SIGNING_PRIVATE_KEY_STORE_PATH value: "/app/operator_keys/ecdsa_key.json" diff --git a/charts/aethos/values.mainnet.yaml b/charts/aethos/values.mainnet.yaml index ee62a2c..871cc8d 100644 --- a/charts/aethos/values.mainnet.yaml +++ b/charts/aethos/values.mainnet.yaml @@ -6,6 +6,9 @@ node: readOnly: true - name: aethos mountPath: /app/data/ + - name: config + mountPath: /app/config/operator.yaml + subPath: operator.yaml env: - name: AETHOS_SIGNING_PRIVATE_KEY_STORE_PATH value: "/app/operator_keys/ecdsa_key.json" diff --git a/charts/arpa/Chart.yaml b/charts/arpa/Chart.yaml index ac33fa9..e8da075 100644 --- a/charts/arpa/Chart.yaml +++ b/charts/arpa/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 0.1.0 description: A Helm chart for Kubernetes name: arpa type: application -version: 0.1.0 +version: 0.1.1 maintainers: - name: xom4ek email: aleksei.lazarev@p2p.org diff --git a/charts/arpa/README.md b/charts/arpa/README.md index 183eb38..f8283de 100644 --- a/charts/arpa/README.md +++ b/charts/arpa/README.md @@ -26,6 +26,19 @@ helm repo add p2p-avs https://p2p-org.github.io/avs-helm-charts/ helm upgrade -i arpa p2p-avs/arpa -f values.$NETWORK.yaml ``` +### Registration + +When you install + +## Need login to job and make that + +```sh +kubectl get pods #Find job for registration +kubectl exec -it $POD_JOB_NAME -- sh +node-shell --config-path=/app/config/operator.yaml +egister-as-eigenlayer-operator /app/operator_keys/ecdsa_key.json $ARPA_NODE_ACCOUNT_KEYSTORE_PASSWORD +``` + ## Configuration The following table lists the configurable parameters of the ARPA Network Node chart and their default values. diff --git a/charts/arpa/templates/register.tpl b/charts/arpa/templates/register.tpl new file mode 100644 index 0000000..0f678bd --- /dev/null +++ b/charts/arpa/templates/register.tpl @@ -0,0 +1,38 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "arpa.fullname" . }}-register-job + labels: + {{- include "arpaRegister.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": "post-install" +spec: + template: + metadata: + labels: + {{- include "arpaRegister.labels" . | nindent 8 }} + spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app: {{ include "arpa.fullname" . }} + topologyKey: "kubernetes.io/hostname" + containers: + - name: register + image: "{{ .Values.register.image.repository }}:{{ .Values.register.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.register.image.pullPolicy }} + args: + {{- toYaml .Values.register.args | nindent 12 }} + env: + {{- toYaml .Values.node.env | nindent 12 }} + volumeMounts: + {{- toYaml .Values.node.volumeMounts | nindent 12 }} + restartPolicy: Never + volumes: + {{- toYaml .Values.volumes | nindent 8 }} + - name: config + configMap: + name: {{ include "arpa.fullname" . }}-config + backoffLimit: 2 diff --git a/charts/arpa/values.mainnet.yaml b/charts/arpa/values.mainnet.yaml index a90ad0c..8b1d1e6 100644 --- a/charts/arpa/values.mainnet.yaml +++ b/charts/arpa/values.mainnet.yaml @@ -8,6 +8,9 @@ node: readOnly: true - name: arpa mountPath: /app/data/ + - name: config + mountPath: /app/config/operator.yaml + subPath: operator.yaml env: - name: ARPA_NODE_ACCOUNT_KEYSTORE_PASSWORD valueFrom: diff --git a/charts/arpa/values.yaml b/charts/arpa/values.yaml index c1a49d4..4217162 100644 --- a/charts/arpa/values.yaml +++ b/charts/arpa/values.yaml @@ -152,14 +152,22 @@ configs: use_jitter: false -# register: -# image: -# repository: ghcr.io/arpa-network/node-client -# pullPolicy: Always -# tag: "eigenlayer" -# args: -# - --config=/app/config/operator.yaml -# - register-operator-with-avs +register: + image: + repository: ghcr.io/arpa-network/node-shell + pullPolicy: Always + tag: "latest" + command: + - sleep + args: + - "360000" + + +## Need login to job and make that + +# node-shell --config-path=/app/config/operator.yaml + +# egister-as-eigenlayer-operator /app/operator_keys/ecdsa_key.json $ARPA_NODE_ACCOUNT_KEYSTORE_PASSWORD cloudwatch: enabled: false