Skip to content

Commit

Permalink
feat(aethos+arpa): add registration and some instruction (#3)
Browse files Browse the repository at this point in the history
- add affinity for jobs with registration
- add some readme with registration
  • Loading branch information
vkuzenkov authored Jun 18, 2024
2 parents 5ee1e3a + 6eabb8b commit df92c54
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 16 deletions.
2 changes: 1 addition & 1 deletion charts/aethos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
10 changes: 7 additions & 3 deletions charts/aethos/templates/register.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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 }}
Expand Down
3 changes: 0 additions & 3 deletions charts/aethos/templates/statefulset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions charts/aethos/values.holesky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions charts/aethos/values.mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion charts/arpa/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
13 changes: 13 additions & 0 deletions charts/arpa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
38 changes: 38 additions & 0 deletions charts/arpa/templates/register.tpl
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions charts/arpa/values.mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 16 additions & 8 deletions charts/arpa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df92c54

Please sign in to comment.