-
Notifications
You must be signed in to change notification settings - Fork 0
/
v1-explorer-dev.yaml
165 lines (164 loc) · 4.44 KB
/
v1-explorer-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
apiVersion: apps/v1
kind: Deployment
metadata:
name: explorer-dev
labels:
app: explorer-dev
{{ with .Values.global.labels }}
{{ toYaml . | nindent 4 }}
{{ end }}
spec:
replicas: 1
selector:
matchLabels:
app: explorer-dev
template:
metadata:
labels:
app: explorer-dev
{{ with .Values.global.labels }}
{{ toYaml . | nindent 8 }}
{{ end }}
annotations:
argocd.argoproj.io/sync-options: Replace=true # This is needed to force the redeployment of the validator in volatile (development) environments
spec:
serviceAccountName: explorer-dev
containers:
- name: explorer
image: "ghcr.io/pokt-network/v1-explorer-dev:main"
imagePullPolicy: Always
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "1"
env:
- name: NODE_ENV
value: "production"
- name: POSTGRES_USER
value: mock
- name: POSTGRES_PASSWORD
value: mock
- name: POSTGRES_HOST
value: main-database-primary
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_DB
value: "validators"
- name: POCKET_PERSISTENCE_NODE_SCHEMA
value: validator001
- name: DATABASE_URL
value: "postgres://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@$(POSTGRES_HOST):$(POSTGRES_PORT)/$(POSTGRES_DB)?schema=$(POCKET_PERSISTENCE_NODE_SCHEMA)"
# Any host that is visible and connected to the cluster can be arbitrarily selected as the RPC host
- name: NETWORK_NAME
value: {{ .Values.networkName }}
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POCKET_RPC_ENDPOINT
value: http://pocket-validators:50832
- name: CLI_CLIENT_POD_SELECTOR
value: app=dev-cli-client
- name: NETWORK_PARAMETERS_CM_NAME
value: network-configuration
ports:
- containerPort: 3000
name: http
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
path: /api/health
port: http
scheme: HTTP
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: explorer-dev
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: explorer-dev
subjects:
- kind: ServiceAccount
name: explorer-dev
apiGroup: ""
roleRef:
kind: Role
name: explorer-dev
apiGroup: ""
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: explorer-dev
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["pods", "pods/log"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["create"]
- apiGroups: [""]
resources: ["configmaps"]
# resourceNames: ["network-configuration"]
verbs: ["get", "update", "create", "patch"]
---
apiVersion: v1
kind: Service
metadata:
name: explorer-dev
spec:
selector:
app: explorer-dev
ports:
- name: http
port: 3000
protocol: TCP
targetPort: 3000
---
kind: Mapping
apiVersion: getambassador.io/v3alpha1
metadata:
name: explorer-dev
namespace: {{ .Release.Namespace }}
spec:
hostname: {{ .Release.Namespace }}-dashboard.dev-us-east4-1.poktnodes.network
prefix: /
service: explorer-dev.{{ .Release.Namespace }}:3000
timeout_ms: 0
idle_timeout_ms: 3600000
connect_timeout_ms: 10000
---
kind: Host
apiVersion: getambassador.io/v3alpha1
metadata:
name: explorer-dev
annotations:
external-dns.ambassador-service: emissary-ingress.emissary-ingress
spec:
hostname: "{{ .Release.Namespace }}-dashboard.dev-us-east4-1.poktnodes.network"
tlsSecret:
name: "wildcard-dev-us-east4-1--poktnodes--network-tls"
namespace: emissary-ingress
---
kind: Mapping
apiVersion: getambassador.io/v3alpha1
metadata:
name: network-parameters-to-explorer-dev
spec:
hostname: v1-networks-parameters.dev-us-east4-1.poktnodes.network
prefix: /{{ .Release.Namespace }}
rewrite: /api/network-parameters-yaml
service: explorer-dev.{{ .Release.Namespace }}:3000
timeout_ms: 0
idle_timeout_ms: 3600000
connect_timeout_ms: 10000