-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(WIP): adapt to rollups-node:1.3.0
- Loading branch information
1 parent
8526aca
commit 9f08f4e
Showing
18 changed files
with
178 additions
and
1,718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if contains "NodePort" .Values.graphqlServer.service.type }} | ||
{{- if contains "NodePort" .Values.validator.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "validator.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.graphqlServer.service.type }} | ||
{{- else if contains "LoadBalancer" .Values.validator.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "validator.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "validator.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .Values.graphqlServer.service.port }} | ||
{{- else if contains "ClusterIP" .Values.graphqlServer.service.type }} | ||
echo http://$SERVICE_IP:4000/graphql | ||
{{- else if contains "ClusterIP" .Values.validator.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "validator.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") | ||
echo "Visit http://127.0.0.1:8080/graphql to use your application" | ||
echo "Visit http://127.0.0.1:4000/graphql to use your application" | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 0 additions & 131 deletions
131
charts/rollups-node/templates/authority-claimer-deployment.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{{- /* | ||
(c) Cartesi and individual authors (see AUTHORS) | ||
SPDX-License-Identifier: Apache-2.0 (see LICENSE) | ||
*/}} | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "validator.fullname" . }}-validator | ||
labels: {{- include "validator.labels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "validator.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.validator.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "validator.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "validator.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.validator.podSecurityContext | nindent 8 }} | ||
initContainers: | ||
{{- if .Values.validator.initContainers }} | ||
{{- include "tplvalues.render" ( dict "value" .Values.validator.initContainers "context" $ ) | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: rollups-node | ||
image: {{ include "validator.image" . }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
resources: | ||
{{- toYaml .Values.validator.resources | nindent 12 }} | ||
{{- if .Values.validator.command }} | ||
command: | ||
{{- include "tplvalues.render" (dict "value" .Values.validator.command "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.validator.args }} | ||
args: | ||
{{- include "tplvalues.render" (dict "value" .Values.validator.args "context" $) | nindent 12 }} | ||
{{- range .Values.validator.extraArgs }} | ||
- {{ . | quote}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.validator.healthCheck.enabled }} | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: {{ (default 8081 .Values.validator.healthCheck.port) }} | ||
initialDelaySeconds: 3 | ||
{{- end }} | ||
env: | ||
- name: CARTESI_LOG_LEVEL | ||
value: {{ .Values.validator.logLevel }} | ||
{{- if .Values.dapp.network }} | ||
- name: CARTESI_BLOCKCHAIN_ID | ||
value: {{ print "--chain-id=" (include "dapp.chainID" .) | quote }} | ||
{{- end }} | ||
{{- if .Values.dapp.contractAddress }} | ||
- name: CARTESI_CONTRACTS_DAPP_ADDRESS | ||
value: {{ .Values.dapp.contractAddress | quote }} | ||
{{- end }} | ||
{{- if .Values.dapp.blockNumber }} | ||
- name: CARTESI_CONTRACTS_DAPP_DEPLOYMENT_BLOCK_NUMBER | ||
value: {{ .Values.dapp.blockNumber | quote }} | ||
{{- end }} | ||
{{- if .Values.dapp.httpProvider }} | ||
- name: CARTESI_BLOCKCHAIN_HTTP_ENDPOINT | ||
value: {{ .Values.dapp.httpProvider | quote }} | ||
{{- end }} | ||
{{- if .Values.dapp.wsProvider }} | ||
- name: CARTESI_BLOCKCHAIN_WS_ENDPOINT | ||
value: {{ .Values.dapp.wsProvider | quote }} | ||
{{- end }} | ||
{{- if .Values.validator.extraEnvVars }} | ||
{{- include "tplvalues.render" (dict "value" .Values.validator.extraEnvVars "context" $) | nindent 12 }} | ||
{{- end }} | ||
{{- if or .Values.validator.extraEnvVarsCM .Values.validator.extraEnvVarsSecret }} | ||
envFrom: | ||
{{- if .Values.validator.extraEnvVarsCM }} | ||
- configMapRef: | ||
name: {{ include "tplvalues.render" ( dict "value" .Values.validator.extraEnvVarsCM "context" $ ) }} | ||
{{- end }} | ||
{{- if .Values.validator.extraEnvVarsSecret }} | ||
- secretRef: | ||
name: {{ include "tplvalues.render" ( dict "value" .Values.validator.extraEnvVarsSecret "context" $ ) }} | ||
{{- end }} | ||
{{- end }} | ||
volumeMounts: | ||
{{- if (or .Values.dapp.mnemonic.value .Values.dapp.mnemonic.secretRef) }} | ||
- name: mnemonic | ||
mountPath: /var/run/secrets/mnemonic | ||
readOnly: true | ||
{{- end }} | ||
{{- if .Values.validator.extraVolumeMounts }} | ||
{{- include "tplvalues.render" ( dict "value" .Values.validator.extraVolumeMounts "context" $ ) | nindent 12 }} | ||
{{- end }} | ||
volumes: | ||
{{- if (or .Values.dapp.mnemonic.value .Values.dapp.mnemonic.secretRef) }} | ||
- name: mnemonic | ||
secret: | ||
{{- if .Values.dapp.mnemonic.value }} | ||
secretName: {{ include "validator.fullname" . }}-mnemonic | ||
{{- else }} | ||
secretName: {{ .Values.dapp.mnemonic.secretRef }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.validator.extraVolumes }} | ||
{{- include "tplvalues.render" ( dict "value" .Values.validator.extraVolumes "context" $ ) | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.validator.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.validator.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.validator.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
Oops, something went wrong.