166 lines
5.4 KiB
YAML
166 lines
5.4 KiB
YAML
---
|
|
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:
|
|
containers:
|
|
- name: {{ .NAME }}
|
|
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_TOKENS
|
|
value: "{{ .WORMSCAN_RATELIMIT_TOKENS }}"
|
|
- name: WORMSCAN_RATELIMIT_PREFIX
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: config
|
|
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
|
|
key: redis-prefix
|
|
- name: WORMSCAN_CACHE_ENABLED
|
|
value: "true"
|
|
- name: WORMSCAN_CACHE_TVLKEY
|
|
value: "WORMSCAN:TVL"
|
|
- name: WORMSCAN_CACHE_TVLEXPIRATION
|
|
value: "60"
|
|
- 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
|
|
- name: WORMSCAN_INFLUX_BUCKETINFINITE
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: config
|
|
key: influxdb-bucket-infinite
|
|
- name: WORMSCAN_INFLUX_BUCKET30DAYS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: config
|
|
key: influxdb-bucket-30-days
|
|
- name: WORMSCAN_INFLUX_BUCKET24HOURS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: config
|
|
key: influxdb-bucket-24-hours
|
|
- 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"
|
|
image: {{ .IMAGE_NAME }}
|
|
livenessProbe:
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 2
|
|
failureThreshold: 4
|
|
httpGet:
|
|
path: /api/v1/health
|
|
port: {{ .PORT }}
|
|
readinessProbe:
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 2
|
|
httpGet:
|
|
path: /api/v1/ready
|
|
port: {{ .PORT }}
|
|
resources:
|
|
limits:
|
|
cpu: {{ .RESOURCES_LIMITS_CPU }}
|
|
memory: {{ .RESOURCES_LIMITS_MEMORY }}
|
|
requests:
|
|
cpu: {{ .RESOURCES_REQUESTS_CPU }}
|
|
memory: {{ .RESOURCES_REQUESTS_MEMORY }}
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 45 |