2020-08-03 10:47:22 -07:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: guardian
|
|
|
|
labels:
|
|
|
|
app: guardian
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 8999
|
|
|
|
name: p2p
|
|
|
|
protocol: UDP
|
|
|
|
clusterIP: None
|
|
|
|
selector:
|
|
|
|
app: guardian
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
|
|
|
name: guardian
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: guardian
|
|
|
|
serviceName: guardian
|
2020-08-03 13:33:35 -07:00
|
|
|
replicas: 10
|
|
|
|
updateStrategy:
|
|
|
|
# The StatefulSet rolling update strategy is rather dumb, and updates one pod after another.
|
|
|
|
# If we want blue-green deployments, we should use a Deployment instead.
|
|
|
|
type: RollingUpdate
|
2020-08-03 10:47:22 -07:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: guardian
|
|
|
|
spec:
|
|
|
|
terminationGracePeriodSeconds: 1
|
|
|
|
containers:
|
|
|
|
- name: guardiand
|
|
|
|
image: guardiand-image
|
2020-08-03 13:33:35 -07:00
|
|
|
command:
|
|
|
|
- /guardiand
|
|
|
|
- -nodeKey
|
|
|
|
- /data/node.key
|
|
|
|
- -bootstrap
|
|
|
|
- /dns4/guardian-0.guardian/udp/8999/quic/p2p/12D3KooWQ1sV2kowPY1iJX1hJcVTysZjKv3sfULTGwhdpUGGZ1VF
|
2020-08-03 10:47:22 -07:00
|
|
|
ports:
|
|
|
|
- containerPort: 8999
|
|
|
|
name: p2p
|
|
|
|
protocol: UDP
|
|
|
|
volumeMounts:
|
|
|
|
- name: guardian-data
|
|
|
|
mountPath: /data
|
2020-08-15 14:54:44 -07:00
|
|
|
- name: agent
|
|
|
|
image: solana-agent
|
|
|
|
command:
|
|
|
|
- /usr/local/bin/agent
|
|
|
|
- '11111111111111111111111111111111' # TODO: program address
|
|
|
|
- 'solana-devnet' # host
|
|
|
|
- '8899' # rpc port
|
|
|
|
- '8999' # pubsub/ws port
|
|
|
|
- '9000' # grpc listen port
|
|
|
|
ports:
|
|
|
|
- containerPort: 9000
|
|
|
|
name: grpc
|
|
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
|
|
- name: guardian-data
|
|
|
|
mountPath: /data
|
2020-08-03 10:47:22 -07:00
|
|
|
volumeClaimTemplates:
|
|
|
|
- metadata:
|
|
|
|
name: guardian-data
|
|
|
|
spec:
|
|
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|