wormhole-explorer/deploy/contract-watcher/contract-watcher-service.yaml

168 lines
5.4 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .NAME }}
namespace: {{ .NAMESPACE }}
spec:
replicas: {{ .REPLICAS }}
selector:
matchLabels:
app: {{ .NAME }}
template:
metadata:
labels:
app: {{ .NAME }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 40
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }}
imagePullPolicy: Always
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
httpGet:
path: /api/ready
port: 8000
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 3
failureThreshold: 3
httpGet:
path: /api/health
port: 8000
env:
- name: ENVIRONMENT
value: {{ .ENVIRONMENT }}
- name: PORT
value: "8000"
- name: LOG_LEVEL
value: "INFO"
- name: MONGODB_URI
valueFrom:
secretKeyRef:
name: mongodb
key: mongo-uri
- name: MONGODB_DATABASE
valueFrom:
configMapKeyRef:
name: config
key: mongo-database
- name: PPROF_ENABLED
value: "{{ .PPROF_ENABLED }}"
- name: P2P_NETWORK
value: {{ .P2P_NETWORK }}
- name: ANKR_URL
valueFrom:
secretKeyRef:
name: blockchain
key: ankr-url
- name: ANKR_REQUESTS_PER_SECOND
value: "{{ .ANKR_REQUESTS_PER_SECOND }}"
- name: SOLANA_URL
valueFrom:
secretKeyRef:
name: blockchain
key: solana-url
- name: SOLANA_REQUESTS_PER_SECOND
value: "{{ .SOLANA_REQUESTS_PER_SECOND }}"
- name: TERRA_URL
valueFrom:
secretKeyRef:
name: blockchain
key: terra-url
- name: TERRA_REQUESTS_PER_SECOND
value: "{{ .TERRA_REQUESTS_PER_SECOND }}"
- name: APTOS_URL
valueFrom:
secretKeyRef:
name: blockchain
key: aptos-url
- name: APTOS_REQUESTS_PER_SECOND
value: "{{ .APTOS_REQUESTS_PER_SECOND }}"
- name: OASIS_URL
valueFrom:
secretKeyRef:
name: blockchain
key: oasis-url
- name: OASIS_REQUESTS_PER_SECOND
value: "{{ .OASIS_REQUESTS_PER_SECOND }}"
- name: MOONBEAM_URL
valueFrom:
secretKeyRef:
name: blockchain
key: moonbeam-url
- name: MOONBEAM_REQUESTS_PER_SECOND
value: "{{ .MOONBEAM_REQUESTS_PER_SECOND }}"
- name: CELO_URL
valueFrom:
secretKeyRef:
name: blockchain
key: celo-url
- name: CELO_REQUESTS_PER_SECOND
value: "{{ .CELO_REQUESTS_PER_SECOND }}"
- name: OPTIMISM_URL
valueFrom:
secretKeyRef:
name: blockchain
key: optimism-url
- name: OPTIMISM_REQUESTS_PER_SECOND
value: "{{ .OPTIMISM_REQUESTS_PER_SECOND }}"
- name: ARBITRUM_URL
valueFrom:
secretKeyRef:
name: blockchain
key: arbitrum-url
- name: ARBITRUM_REQUESTS_PER_SECOND
value: "{{ .ARBITRUM_REQUESTS_PER_SECOND }}"
- name: BASE_URL
valueFrom:
secretKeyRef:
name: blockchain
key: base-url
- name: BASE_REQUESTS_PER_SECOND
value: "{{ .BASE_REQUESTS_PER_SECOND }}"
- name: ETHEREUM_URL
valueFrom:
secretKeyRef:
name: blockchain
key: ethereum-url
- name: ETHEREUM_REQUESTS_PER_SECOND
value: "{{ .ETHEREUM_REQUESTS_PER_SECOND }}"
- name: AVALANCHE_URL
valueFrom:
secretKeyRef:
name: blockchain
key: avalanche-url
- name: AVALANCHE_REQUESTS_PER_SECOND
value: "{{ .AVALANCHE_REQUESTS_PER_SECOND }}"
- name: POLYGON_URL
valueFrom:
secretKeyRef:
name: blockchain
key: polygon-url
- name: POLYGON_REQUESTS_PER_SECOND
value: "{{ .POLYGON_REQUESTS_PER_SECOND }}"
- name: ALERT_API_KEY
valueFrom:
secretKeyRef:
name: opsgenie
key: api-key
- name: ALERT_ENABLED
value: "{{ .ALERT_ENABLED }}"
resources:
limits:
memory: {{ .RESOURCES_LIMITS_MEMORY }}
cpu: {{ .RESOURCES_LIMITS_CPU }}
requests:
memory: {{ .RESOURCES_REQUESTS_MEMORY }}
cpu: {{ .RESOURCES_REQUESTS_CPU }}