wormhole/bridge/k8s/deployment.yaml

61 lines
1.3 KiB
YAML

---
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
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
template:
metadata:
labels:
app: guardian
spec:
terminationGracePeriodSeconds: 1
containers:
- name: guardiand
image: guardiand-image
command:
- /guardiand
- -nodeKey
- /data/node.key
- -bootstrap
- /dns4/guardian-0.guardian/udp/8999/quic/p2p/12D3KooWQ1sV2kowPY1iJX1hJcVTysZjKv3sfULTGwhdpUGGZ1VF
ports:
- containerPort: 8999
name: p2p
protocol: UDP
volumeMounts:
- name: guardian-data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: guardian-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi