github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/k8s/staging/flow-verification-node-deployment.yml (about) 1 apiVersion: apps/v1 2 kind: StatefulSet 3 metadata: 4 # This is the full name of your deployment. It must be unique 5 name: flow-verification-node-v1 6 namespace: flow 7 8 # Best practice labels: 9 # app: <app-name> (the non-unique version of metadata.name) 10 # kind: [web|worker] 11 # env: [staging|production|test|dev] 12 # owner: who to ask about this service 13 # version: the major version of this service (v1/v2/v1beta1) 14 labels: 15 app: flow-test-net 16 node: verification 17 env: staging 18 owner: Kan 19 version: v1 20 21 spec: 22 replicas: 1 23 serviceName: flow-test-network-v1 24 selector: 25 matchLabels: 26 app: flow-test-net 27 node: verification 28 env: staging 29 version: v1 30 podManagementPolicy: Parallel 31 template: 32 metadata: 33 annotations: 34 # Set to "false" to opt out of prometheus scrapes 35 # Prometheus still needs a port called "metrics" (below) to scrape properly 36 prometheus.io/scrape: 'true' 37 38 # Set the path to the API endpoint that exposes prometheus metrics, or leave blank for `/metrics` 39 # prometheus.io/path: "/metrics" 40 41 labels: 42 app: flow-test-net 43 node: verification 44 env: staging 45 owner: Kan 46 version: v1 47 kind: web 48 49 spec: 50 imagePullSecrets: 51 - name: gcr 52 containers: 53 - name: flow-test-net 54 # No tag, will be attached by teamcity 55 image: gcr.io/dl-flow/verification 56 args: 57 - '--nodename' 58 - '$(POD_NAME)' 59 - '--entries' 60 - '$(NODE_ENTRIES)' 61 - '--datadir' 62 - '/flowdb' 63 64 # Ports exposed can be named so other resources can reference 65 # them by name and not have to hard code numbers 66 ports: 67 - name: grpc 68 containerPort: 3569 69 - name: http 70 containerPort: 8080 71 # Prometheus is looking specifically for a port named 'metrics' 72 # This may be the same as the above port, or different 73 - name: metrics 74 containerPort: 8080 75 76 # Environment variables 77 env: 78 - name: ENV 79 value: STAGING 80 - name: POD_NAME 81 valueFrom: 82 fieldRef: 83 fieldPath: metadata.name 84 - name: NODE_ENTRIES 85 valueFrom: 86 configMapKeyRef: 87 name: flow-node-config-map 88 key: entries 89 # Due to the fact that we're using a headless service, we cannot use the cgo version of net, 90 # which causes an error, instead, force using the pure go version now 91 - name: GODEBUG 92 value: "netdns=go" 93 # Resource requests and constraints 94 resources: 95 requests: 96 cpu: '125m' 97 memory: '256Mi' 98 limits: 99 cpu: '250m' 100 memory: '512Mi' 101 volumeMounts: 102 - name: badger-volume 103 mountPath: /flowdb 104 105 # The current liveness and readiness probes use the /metrics endpoint, which is non-ideal and MVP only 106 # These probes should eventually make use of the gRPC server's Ping function, or should at least 107 # be moved over to a /live endpoint that has some introspection into the gRPC's liveness/readiness 108 109 # Readiness Probe 110 readinessProbe: 111 httpGet: 112 path: /metrics 113 port: http 114 initialDelaySeconds: 5 115 successThreshold: 1 116 117 # Liveness Probe 118 livenessProbe: 119 httpGet: 120 path: /metrics 121 port: http 122 initialDelaySeconds: 30 123 periodSeconds: 30 124 successThreshold: 1 125 126 volumeClaimTemplates: 127 - metadata: 128 name: badger-volume 129 spec: 130 accessModes: 131 - ReadWriteOnce 132 resources: 133 requests: 134 storage: 20Gi 135 storageClassName: standard