Skip to content

Commit

Permalink
feat(k3): add mainnet example (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
xom4ek authored Nov 19, 2024
2 parents a4932d7 + 49a5b02 commit c93b139
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 11 deletions.
21 changes: 21 additions & 0 deletions charts/k3/templates/register.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ spec:
labels:
{{- include "k3Register.labels" . | nindent 8 }}
spec:

initContainers:
- name: register-init
{{- with .Values.register.initContainer.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.register.initContainer.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.register.initContainer.image.repository }}:{{ .Values.register.initContainer.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.register.initContainer.image.pullPolicy }}
{{- with .Values.register.initContainer.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
{{- toYaml .Values.register.initContainer.env | nindent 12 }}
containers:
- name: register
image: "{{ .Values.register.image.repository }}:{{ .Values.register.image.tag | default .Chart.AppVersion }}"
Expand Down
20 changes: 20 additions & 0 deletions charts/k3/templates/statefulset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ spec:
serviceAccountName: {{ .Values.serviceAccount.name | default (include "k3.fullname" .) }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: node-init
{{- with .Values.node.initContainer.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.node.initContainer.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.node.initContainer.image.repository }}:{{ .Values.node.initContainer.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.node.initContainer.image.pullPolicy }}
{{- with .Values.node.initContainer.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
{{- toYaml .Values.node.initContainer.env | nindent 12 }}
containers:
- name: node
{{- with .Values.node.command }}
Expand Down
2 changes: 2 additions & 0 deletions charts/k3/values.holesky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ node:
value:
- name: OPERATOR_TWITTER
value:
- name: OPERATOR_EMAIL
value:
- name: PRIVATE_KEY
value: ## Your private key

Expand Down
70 changes: 70 additions & 0 deletions charts/k3/values.mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
node:
env:
- name: OPERATOR_NAME
value: ""
- name: OPERATOR_WEBSITE
value: ""
- name: OPERATOR_DESCRIPTION
value: ""
- name: OPERATOR_LOGO
value: ""
- name: OPERATOR_TWITTER
value: ""
- name: OPERATOR_EMAIL
value: ""
- name: PRIVATE_KEY
value: ""
- name: L1_CHAIN
value: "1"
- name: L2_CHAIN
value: "8453"
- name: PINATA_API_KEY
value: "c852ce6f177548614e4f"
- name: PINATA_SECRET_API_KEY
value: "acbbdf0edf2650b9740f0f2bd3807c14661099a375144a160a5f324631b7b3e3"
- name: ATTESTATION_CENTER_ADDRESS
value: "0xdA68305019701D9346E1960b4187E428D1024906"
- name: OTHENTIC_REGISTRY_ADDRESS
value: "0x7e39183cDa5AF65E6A18aF8C3bf0c523127f83bF"
- name: AVS_GOVERNANCE_ADDRESS
value: "0x83742C346E9f305dcA94e20915aB49A483d33f3E"
- name: IPFS_HOST
value: "https://gateway.pinata.cloud/ipfs/"
- name: IPFS_API
value: "https://api.pinata.cloud"
- name: IPFS_JWT
value: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mb3JtYXRpb24iOnsiaWQiOiJjZmYzYmE2Yy1mMGZmLTQ3MGUtOTc5Ni0xYmI5ZjZhNzlmNDAiLCJlbWFpbCI6Iml2YW4ucmVpZkBrMy1sYWJzLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJwaW5fcG9saWN5Ijp7InJlZ2lvbnMiOlt7ImlkIjoiRlJBMSIsImRlc2lyZWRSZXBsaWNhdGlvbkNvdW50IjoxfSx7ImlkIjoiTllDMSIsImRlc2lyZWRSZXBsaWNhdGlvbkNvdW50IjoxfV0sInZlcnNpb24iOjF9LCJtZmFfZW5hYmxlZCI6ZmFsc2UsInN0YXR1cyI6IkFDVElWRSJ9LCJhdXRoZW50aWNhdGlvblR5cGUiOiJzY29wZWRLZXkiLCJzY29wZWRLZXlLZXkiOiJjODUyY2U2ZjE3NzU0ODYxNGU0ZiIsInNjb3BlZEtleVNlY3JldCI6ImFjYmJkZjBlZGYyNjUwYjk3NDBmMGYyYmQzODA3YzE0NjYxMDk5YTM3NTE0NGExNjBhNWYzMjQ2MzFiN2IzZTMiLCJpYXQiOjE3MTc0MzM5MjZ9.z-wkmQoOb4U7VBDmY6mFQztpIYxafhbif8stNJBir5Q"
- name: OTHENTIC_BOOTSTRAP_ID
value: "12D3KooWBNFG1QjuF3UKAKvqhdXcxh9iBmj88cM5eU2EK5Pa91KB"
- name: OTHENTIC_BOOTSTRAP_SEED
value: "97a64de0fb18532d4ce56fb35b730aedec993032b533f783b04c9175d465d9bf"
- name: OTHENTIC_JSON_RPC_PORT
value: "4001"
- name: OTHENTIC_CLIENT_RPC_ADDRESS
value: "https://avs.k3-labs.com"
- name: OTHENTIC_CLIENT_IP
value: "104.197.167.201"
- name: OTHENTIC_AGGREGATOR_P2P_PORT
value: "9876"
- name: AVS_WEBAPI_URL
value: "http://localhost"
- name: AVS_WEBAPI_PORT
value: "4002"
- name: PERFORMER_PORT
value: "3000"

ingress:
annotations: {}
enabled: false
host: example.com

serviceAccount:
create: false
name: k3

volumes: []

configs:
## Need double check after changes
operator.yaml: |
empty
35 changes: 24 additions & 11 deletions charts/k3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,36 @@ configs:
leave empty
register:
initContainer:
image:
repository: ghcr.io/foundry-rs/foundry
pullPolicy: IfNotPresent
tag: "latest"
volumeMounts: []
env: []
command:
- /bin/sh
args:
- date
enabled: true
image:
repository: k3official/k3-labs-avs-operator
pullPolicy: Always
tag: "latest"
args:
- register

node:
initContainer:
image:
repository: ghcr.io/foundry-rs/foundry
pullPolicy: IfNotPresent
tag: "latest"
volumeMounts: []
env: []
command:
- /bin/sh
args:
- date

volumeMounts: []
image:
repository: k3official/k3-labs-avs-operator
Expand All @@ -66,15 +87,7 @@ node:
env: []
args:
- performer
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
successThreshold: 1
readinessProbe: {}
# livenessProbe:
# httpGet:
# path: /metrics
Expand Down

0 comments on commit c93b139

Please sign in to comment.