Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RPC chart to use additional zero downtime mechanisms #84

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions charts/soroban-rpc/templates/soroban-rpc-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
# Currently Soroban RPC doesn't support HA deployments.
# For that reason we hardcode replicas value at 1
replicas: 1
# Currently Soroban RPC doesn't support HA deployments over a single shared data store
# but, each replica pod in a statefulset will have it's own data store on it's PVC.
# This statefulset creates two replicas which will be monitored by the readiness probe.
# Having two replicas also ensures zero downtime during upgrades as at least one replica is
# gauranteed to be running while the other one is upgraded and catching backup to network
# after restart
replicas: 2
serviceName: {{ template "common.fullname" . }}
selector:
matchLabels:
Expand Down Expand Up @@ -73,7 +77,11 @@ spec:
"jsonrpc": "2.0",
"id": 10235,
"method": "getHealth"
}' | grep "healthy"
}' | jq -es 'if (. | length) == 0 then null else .[0] end | .result | .status == "healthy" and (.latestLedger - .oldestLedger >= (.ledgerRetentionWindow - 10))' > /dev/null;
failureThreshold: 2
periodSeconds: 10
successThreshold: 2
timeoutSeconds: 5
{{- if (.Values.sorobanRpc).resources}}
resources:
{{ toYaml .Values.sorobanRpc.resources | indent 10 }}
Expand Down