---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: goerli-geth
  namespace: validators
spec:
  selector:
    matchLabels:
      app: goerli-geth
  revisionHistoryLimit: 0
  replicas: 1
  template:
    metadata:
      labels:
        app: goerli-geth
    spec:
      containers:
        - name: goerli-geth
          resources:
            requests:
              memory: 4Gi
              cpu: 3000m
            limits:
              memory: 8Gi
              cpu: 16000m
          args: [
            "--goerli",
            "--port=30303",
            "--ws",
            "--ws.addr=0.0.0.0",
            "--ws.port=8546",
            "--pprof",
            "--pprof.addr=0.0.0.0",
            "--pprof.port=6060"
          ]
          image: ethereum/client-go:v1.10.15
          livenessProbe:
            exec:
              command:
                - wget
                - --no-cache
                - -S
                - -O-
                - "0.0.0.0:6060/debug/metrics/prometheus"
            failureThreshold: 5
            initialDelaySeconds: 30
            periodSeconds: 90
            timeoutSeconds: 30
          ports:
            - containerPort: 30303
            - containerPort: 6060
            - containerPort: 8546
          volumeMounts:
            - mountPath: /root/.ethereum
              name: goerli-geth-data
      restartPolicy: Always
      volumes:
        - name: goerli-geth-data
          ephemeral:
            volumeClaimTemplate:
              spec:
                dataSource:
                  name: goerli-geth-data-snapshot-latest
                  kind: VolumeSnapshot
                  apiGroup: snapshot.storage.k8s.io
                accessModes: ["ReadWriteOnce"]
                resources:
                  requests:
                    storage: 50Gi
