wormhole-explorer/deploy/api/api-service.yaml

165 lines
5.3 KiB
YAML
Raw Normal View History

2023-02-02 11:01:05 -08:00
---
apiVersion: v1
kind: Service
metadata:
name: {{ .NAME }}
namespace: {{ .NAMESPACE }}
labels:
app: {{ .NAME }}
spec:
type: NodePort
selector:
app: {{ .NAME }}
ports:
- port: 80
targetPort: {{ .PORT }}
name: {{ .NAME }}
protocol: TCP
---
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: "{{ .PORT }}"
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 40
containers:
- name: {{ .NAME }}
image: {{ .IMAGE_NAME }}
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
httpGet:
path: /api/v1/ready
port: {{ .PORT }}
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 3
failureThreshold: 3
httpGet:
path: /api/v1/health
port: {{ .PORT }}
env:
- name: WORMSCAN_ENVIRONMENT
value: "{{ .ENVIRONMENT }}"
- name: WORMSCAN_PORT
value: "{{ .PORT }}"
- name: WORMSCAN_LOGLEVEL
value: {{ .WORMSCAN_LOGLEVEL }}
- name: WORMSCAN_RUNMODE
value: {{ .WORMSCAN_RUNMODE }}
- name: WORMSCAN_P2PNETWORK
value: {{ .WORMSCAN_P2PNETWORK }}
- name: WORMSCAN_RATELIMIT_ENABLED
value: "{{ .WORMSCAN_RATELIMIT_ENABLED }}"
- name: WORMSCAN_RATELIMIT_MAX
value: "{{ .WORMSCAN_RATELIMIT_MAX }}"
- name: WORMSCAN_RATELIMIT_PREFIX
valueFrom:
configMapKeyRef:
name: config
[Issue:1052] Create job for fetching contributor stats and storing in db (#1144) * [Issue:1052] Create job for fetching contributor stats and storing in db revert unnecessary changes on api/handlers/stats revert changes in go.mod and go.sum revert change in go.work add schedule for contributors stats job change response parsing order changes due to draft-pr review move on with contributors activity implementation change to every hour fix typo change contributor stats implementation to do a single write transaction normalize to UTC contributors activity timestamp add cronjob schedule for contributors [Issue:1052][Part 2] Create endpoint to expose contributors stats and activities (#1123) * add endpoint for retrieving stats and activity * remove model.go file and move types to service file * add unit tests to contributors service * integrate new contributors controller * fix more stuff fix unit-tests changes due to pr review fix query fix unit-tests fix total_value_secure move constantes to common pkg remove extra changes rename contributor to protocols finish renames Changes for deployment adjust different response types from different protocols contributors fix controller test big refactor in activty job and stats job since protocols are returning different formats api responding fine remove uneccessary generics target dbconsts fix Delete deploy/common/env/staging-mainnet.env undo unwanted changes readd staging-mainnet.env fix unit-tests add missing protocols_stats/activity_version remove property protocols_json fix JOB_ID env var in protocols-activity.yaml fix typos in env vars configs change tu numbers changes due to own review add new line * add swagger docs
2024-02-22 09:58:45 -08:00
key: redis-prefix
- name: WORMSCAN_DB_URL
valueFrom:
secretKeyRef:
name: mongodb
key: mongo-uri
- name: WORMSCAN_DB_NAME
valueFrom:
configMapKeyRef:
name: config
key: mongo-database
- name: WORMSCAN_CACHE_URL
valueFrom:
configMapKeyRef:
name: config
key: redis-uri
- name: WORMSCAN_CACHE_PREFIX
valueFrom:
configMapKeyRef:
name: config
[Issue:1052] Create job for fetching contributor stats and storing in db (#1144) * [Issue:1052] Create job for fetching contributor stats and storing in db revert unnecessary changes on api/handlers/stats revert changes in go.mod and go.sum revert change in go.work add schedule for contributors stats job change response parsing order changes due to draft-pr review move on with contributors activity implementation change to every hour fix typo change contributor stats implementation to do a single write transaction normalize to UTC contributors activity timestamp add cronjob schedule for contributors [Issue:1052][Part 2] Create endpoint to expose contributors stats and activities (#1123) * add endpoint for retrieving stats and activity * remove model.go file and move types to service file * add unit tests to contributors service * integrate new contributors controller * fix more stuff fix unit-tests changes due to pr review fix query fix unit-tests fix total_value_secure move constantes to common pkg remove extra changes rename contributor to protocols finish renames Changes for deployment adjust different response types from different protocols contributors fix controller test big refactor in activty job and stats job since protocols are returning different formats api responding fine remove uneccessary generics target dbconsts fix Delete deploy/common/env/staging-mainnet.env undo unwanted changes readd staging-mainnet.env fix unit-tests add missing protocols_stats/activity_version remove property protocols_json fix JOB_ID env var in protocols-activity.yaml fix typos in env vars configs change tu numbers changes due to own review add new line * add swagger docs
2024-02-22 09:58:45 -08:00
key: redis-prefix
- name: WORMSCAN_CACHE_ENABLED
value: "true"
2023-05-18 13:07:00 -07:00
- name: WORMSCAN_CACHE_TVLKEY
value: "WORMSCAN:TVL"
- name: WORMSCAN_CACHE_TVLEXPIRATION
value: "60"
2023-02-13 05:17:19 -08:00
- name: WORMSCAN_PPROF_ENABLED
value: "{{ .WORMSCAN_PPROF_ENABLED }}"
- name: WORMSCAN_VAAPAYLOADPARSER_URL
value: {{ .WORMSCAN_VAAPAYLOADPARSER_URL }}
- name: WORMSCAN_VAAPAYLOADPARSER_TIMEOUT
value: "{{ .WORMSCAN_VAAPAYLOADPARSER_TIMEOUT }}"
- name: WORMSCAN_VAAPAYLOADPARSER_ENABLED
value: "{{ .WORMSCAN_VAAPAYLOADPARSER_ENABLED }}"
- name: WORMSCAN_INFLUX_URL
valueFrom:
configMapKeyRef:
name: config
key: influxdb-url
- name: WORMSCAN_INFLUX_TOKEN
valueFrom:
secretKeyRef:
name: influxdb
key: token
- name: WORMSCAN_INFLUX_ORGANIZATION
valueFrom:
configMapKeyRef:
name: config
key: influxdb-organization
2023-05-11 08:16:12 -07:00
- name: WORMSCAN_INFLUX_BUCKETINFINITE
valueFrom:
configMapKeyRef:
name: config
key: influxdb-bucket-infinite
2023-05-11 08:16:12 -07:00
- name: WORMSCAN_INFLUX_BUCKET30DAYS
valueFrom:
configMapKeyRef:
name: config
key: influxdb-bucket-30-days
2023-05-11 08:16:12 -07:00
- name: WORMSCAN_INFLUX_BUCKET24HOURS
valueFrom:
configMapKeyRef:
name: config
key: influxdb-bucket-24-hours
[Issue:1052] Create job for fetching contributor stats and storing in db (#1144) * [Issue:1052] Create job for fetching contributor stats and storing in db revert unnecessary changes on api/handlers/stats revert changes in go.mod and go.sum revert change in go.work add schedule for contributors stats job change response parsing order changes due to draft-pr review move on with contributors activity implementation change to every hour fix typo change contributor stats implementation to do a single write transaction normalize to UTC contributors activity timestamp add cronjob schedule for contributors [Issue:1052][Part 2] Create endpoint to expose contributors stats and activities (#1123) * add endpoint for retrieving stats and activity * remove model.go file and move types to service file * add unit tests to contributors service * integrate new contributors controller * fix more stuff fix unit-tests changes due to pr review fix query fix unit-tests fix total_value_secure move constantes to common pkg remove extra changes rename contributor to protocols finish renames Changes for deployment adjust different response types from different protocols contributors fix controller test big refactor in activty job and stats job since protocols are returning different formats api responding fine remove uneccessary generics target dbconsts fix Delete deploy/common/env/staging-mainnet.env undo unwanted changes readd staging-mainnet.env fix unit-tests add missing protocols_stats/activity_version remove property protocols_json fix JOB_ID env var in protocols-activity.yaml fix typos in env vars configs change tu numbers changes due to own review add new line * add swagger docs
2024-02-22 09:58:45 -08:00
- name: WORMSCAN_PROTOCOLSSTATSVERSION
valueFrom:
configMapKeyRef:
name: config
key: protocols-stats-version
- name: WORMSCAN_PROTOCOLSACTIVITYVERSION
valueFrom:
configMapKeyRef:
name: config
key: protocols-activity-version
- name: WORMSCAN_PROTOCOLS
value: {{ .WORMSCAN_PROTOCOLS }}
- name: WORMSCAN_CACHE_PROTOCOLSSTATSEXPIRATION
value: "{{ .WORMSCAN_CACHE_PROTOCOLSSTATSEXPIRATION }}"
- name: WORMSCAN_CACHE_PROTOCOLSSTATSKEY
value: "WORMSCAN:PROTOCOLS_STATS"
resources:
limits:
memory: {{ .RESOURCES_LIMITS_MEMORY }}
cpu: {{ .RESOURCES_LIMITS_CPU }}
requests:
memory: {{ .RESOURCES_REQUESTS_MEMORY }}
cpu: {{ .RESOURCES_REQUESTS_CPU }}