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

soroban rpc deployment manifest #470

Closed
wants to merge 6 commits into from
Closed
Changes from 5 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
130 changes: 130 additions & 0 deletions cmd/soroban-rpc/docker/k8s_deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# running captive core with on-disk mode limits RAM to around 2G usage, but
# requires some dedicated disk storage space that has at least 3k IOPS for read/write.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: soroban-rpc-futurenet-core-storage
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Gi
storageClassName: default
volumeMode: Filesystem
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
fluxcd.io/ignore: "true"
labels:
app: soroban-rpc-futurenet
name: soroban-rpc-futurenet
spec:
replicas: 1
selector:
matchLabels:
app: soroban-rpc-futurenet
template:
metadata:
annotations:
fluxcd.io/ignore: "true"
creationTimestamp: null
labels:
app: soroban-rpc-futurenet
spec:
initContainers:
- name: clean-volume
image: busybox:1.28
command: ["rm", "-rf", "/opt/stellar/soroban-rpc/captive-core"]
volumeMounts:
- mountPath: /opt/stellar/soroban-rpc
name: captive-core-data
containers:
- name: rpc-server
image: stellar/quickstart:soroban-dev@sha256:81c23da078c90d0ba220f8fc93414d0ea44608adc616988930529c58df278739
args: ["--futurenet", "--enable-soroban-rpc", "--logs"]
sreuland marked this conversation as resolved.
Show resolved Hide resolved
imagePullPolicy: Always
ports:
- containerPort: 8000
name: web
protocol: TCP
readinessProbe:
exec:
command:
- /bin/sh
- -c
- |
curl --location --request POST 'http://localhost:8000/soroban/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": 10235,
"method": "getHealth"
}' | jq --exit-status 'has("jsonrpc")'
sreuland marked this conversation as resolved.
Show resolved Hide resolved
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 5

resources:
limits:
cpu: 2
memory: 4Gi
requests:
cpu: 500m
memory: 1Gi
volumeMounts:
- mountPath: /opt/stellar/soroban-rpc
name: captive-core-data
volumes:
- name: captive-core-data
persistentVolumeClaim:
claimName: soroban-rpc-futurenet-core-storage
---
apiVersion: v1
kind: Service
metadata:
labels:
app: soroban-rpc-futurenet
name: soroban-rpc-futurenet
spec:
ports:
- name: http
port: 8000
protocol: TCP
targetPort: 8000
selector:
app: soroban-rpc-futurenet
sessionAffinity: None
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/cluster-issuer: default
ingress.kubernetes.io/ssl-redirect: "true"
kubernetes.io/ingress.class: public
nginx.ingress.kubernetes.io/rewrite-target: /soroban/rpc
name: soroban-rpc-futurenet
spec:
rules:
- host: rpc-futurenet.prototypes.kube001.services.stellar-ops.com
sreuland marked this conversation as resolved.
Show resolved Hide resolved
http: &rpc-backend
paths:
- backend:
service:
name: soroban-rpc-futurenet
port:
number: 8000
path: /
pathType: Prefix
- host: rpc-futurenet.stellar.org
http: *rpc-backend
tls:
- hosts:
- rpc-futurenet.prototypes.kube001.services.stellar-ops.com
secretName: soroban-rpc-futurenet-cert