Skip to content

Commit 6ef143b

Browse files
Added sqs as sidecar container and added fastnode configuration
1 parent 267ed57 commit 6ef143b

File tree

10 files changed

+441
-26
lines changed

10 files changed

+441
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Public repository for Osmosis blockchain infrastructure Helm charts.
66

77
| Chart | Description | Version | App Version |
88
|-------|-------------|---------|-------------|
9-
| [osmosis-fullnode](./charts/osmosis-fullnode) | Osmosis blockchain fullnode with monitoring | `0.1.0` | `29.0.2` |
9+
| [osmosis-fullnode](./charts/osmosis-fullnode) | Osmosis blockchain fullnode with monitoring | `0.1.7` | `29.0.2` |
1010

1111
## Quick Start
1212

charts/ingressroute.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

charts/osmosis-fullnode/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: osmosis-fullnode
33
description: A Helm chart for deploying Osmosis fullnode with monitoring and sentinel
44
type: application
5-
version: 0.1.6
5+
version: 0.1.7
66
appVersion: "29.0.2"
77
keywords:
88
- osmosis

charts/osmosis-fullnode/README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,83 @@ monitoring:
8787
enabled: true
8888
```
8989
90+
#### SQS Configuration
91+
92+
The chart supports deploying SQS (Sidecar Query Service) as sidecar containers when enabled. SQS provides additional query capabilities and price monitoring for the Osmosis blockchain.
93+
94+
```yaml
95+
sqs:
96+
enabled: true # Set to true to enable SQS containers
97+
98+
# SQS container configuration
99+
container:
100+
image:
101+
repository: osmolabs/sqs
102+
tag: "28.3.11"
103+
104+
# Resource limits and requests
105+
resources:
106+
limits:
107+
cpu: 4
108+
memory: 31Gi
109+
requests:
110+
cpu: 100m
111+
memory: 1Gi
112+
113+
# Environment variables (customize as needed)
114+
env:
115+
DD_AGENT_HOST: datadog-agent.datadog.svc.cluster.local
116+
LOGGER_LEVEL: debug
117+
OSMOSIS_KEYRING_KEY_NAME: local.info
118+
OSMOSIS_KEYRING_PASSWORD: test
119+
OSMOSIS_KEYRING_PATH: /osmosis/.osmosisd/keyring-test
120+
OSMOSIS_LCD_ENDPOINT: http://osmosis-fullnode-0-node-0-lcd.osmosis-1-prod-fullnodes:1317
121+
OSMOSIS_RPC_ENDPOINT: http://osmosis-fullnode-0-node-0-rpc.osmosis-1-prod-fullnodes:26657
122+
OTEL_EXPORTER_OTLP_ENDPOINT: http://datadog-agent.datadog.svc.cluster.local:4317
123+
SQS_GRPC_GATEWAY_ENDPOINT: osmosis-fullnode-0-node-0-grpc.osmosis-1-prod-fullnodes:9090
124+
SQS_GRPC_INGESTER_MAX_RECEIVE_MSG_SIZE_BYTES: "20971520"
125+
SQS_GRPC_TENDERMINT_RPC_ENDPOINT: http://osmosis-fullnode-0-node-0-rpc.osmosis-1-prod-fullnodes:26657
126+
SQS_ROUTER_ROUTE_CACHE_ENABLED: "false"
127+
SQS_SKIP_CHAIN_AVAILABILITY_CHECK: "true"
128+
129+
# Price monitor container configuration
130+
priceMonitor:
131+
image:
132+
repository: osmolabs/price-monitor
133+
tag: "main-89f39d74"
134+
135+
resources:
136+
limits:
137+
cpu: 500m
138+
memory: 512Mi
139+
requests:
140+
cpu: 100m
141+
memory: 128Mi
142+
143+
# SQS configuration
144+
config:
145+
flightRecord:
146+
enabled: false
147+
otel:
148+
enabled: false
149+
environment: prod
150+
grpcIngester:
151+
plugins:
152+
- name: orderbook-fillbot-plugin
153+
enabled: false
154+
- name: orderbook-claimbot-plugin
155+
enabled: false
156+
- name: orderbook-orders-cache-plugin
157+
enabled: true
158+
```
159+
160+
When SQS is enabled, the following additional resources are created:
161+
- **SQS Container**: Main SQS service container
162+
- **Price Monitor Container**: Price monitoring sidecar
163+
- **ConfigMaps**: Environment variables and configuration
164+
- **Services**: SQS and gRPC ingest services
165+
- **Pod Affinity**: Ensures SQS runs on the same node as the Osmosis fullnode
166+
90167
#### Sentinel Configuration
91168
92169
```yaml
@@ -190,6 +267,18 @@ sentinel:
190267
| `services.lcd.enabled` | Enable LCD service | `true` |
191268
| `services.lcd.port` | LCD service port | `1317` |
192269

270+
### SQS Parameters
271+
272+
| Name | Description | Default |
273+
|------|-------------|---------|
274+
| `sqs.enabled` | Enable SQS sidecar containers | `false` |
275+
| `sqs.container.image.repository` | SQS image repository | `"osmolabs/sqs"` |
276+
| `sqs.container.image.tag` | SQS image tag | `"28.3.11"` |
277+
| `sqs.container.resources.limits.memory` | SQS memory limit | `"31Gi"` |
278+
| `sqs.container.resources.limits.cpu` | SQS CPU limit | `"4"` |
279+
| `sqs.priceMonitor.image.repository` | Price monitor image repository | `"osmolabs/price-monitor"` |
280+
| `sqs.priceMonitor.image.tag` | Price monitor image tag | `"main-89f39d74"` |
281+
193282
## Troubleshooting
194283

195284
### Common Issues

charts/osmosis-fullnode/templates/_helpers.tpl

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,42 @@ ad.datadoghq.com/osmosis.check_names: {{ .Values.monitoring.datadog.annotations.
130130
ad.datadoghq.com/osmosis.init_configs: {{ .Values.monitoring.datadog.annotations.initConfigs | quote }}
131131
ad.datadoghq.com/osmosis.instances: {{ tpl .Values.monitoring.datadog.annotations.instances . | quote }}
132132
{{- end }}
133-
{{- end }}
133+
{{- end }}
134+
135+
{{/*
136+
Create SQS environment variables
137+
*/}}
138+
{{- define "osmosis-fullnode.sqsEnv" -}}
139+
{{- range $key, $value := .Values.sqs.container.env }}
140+
- name: {{ $key }}
141+
value: {{ $value | quote }}
142+
{{- end }}
143+
{{- end }}
144+
145+
{{/*
146+
Create SQS configuration JSON
147+
*/}}
148+
{{- define "osmosis-fullnode.sqsConfig" -}}
149+
{
150+
"flight-record": {
151+
"enabled": {{ .Values.sqs.config.flightRecord.enabled | toString | lower }}
152+
},
153+
"otel": {
154+
"enabled": {{ .Values.sqs.config.otel.enabled | toString | lower }},
155+
"environment": "{{ .Values.sqs.config.otel.environment }}"
156+
},
157+
"grpc-ingester": {
158+
"plugins": [
159+
{{- range $index, $plugin := .Values.sqs.config.grpcIngester.plugins }}
160+
{{- if $index }},{{- end }}
161+
{
162+
"name": "{{ $plugin.name }}",
163+
"enabled": {{ $plugin.enabled | toString | lower }}
164+
}
165+
{{- end }}
166+
]
167+
}
168+
}
169+
{{- end }}
170+
171+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.sqs.enabled }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "osmosis-fullnode.fullname" . }}-sqs-config
6+
namespace: {{ .Values.namespace }}
7+
labels:
8+
{{- include "osmosis-fullnode.labels" . | nindent 4 }}
9+
data:
10+
config.json: |
11+
{{ include "osmosis-fullnode.sqsConfig" . | indent 4 }}
12+
{{- end }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{{- if .Values.sqs.enabled }}
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: {{ include "osmosis-fullnode.fullname" . }}-grpc-ingest
6+
namespace: {{ .Values.namespace }}
7+
labels:
8+
{{- include "osmosis-fullnode.labels" . | nindent 4 }}
9+
spec:
10+
ports:
11+
- name: grpc-ingest
12+
port: 50051
13+
protocol: TCP
14+
targetPort: 50051
15+
publishNotReadyAddresses: true
16+
selector:
17+
role: sqs-node-stable
18+
sqs: {{ include "osmosis-fullnode.fullname" . }}
19+
---
20+
apiVersion: v1
21+
kind: Service
22+
metadata:
23+
name: {{ include "osmosis-fullnode.fullname" . }}-sqs
24+
namespace: {{ .Values.namespace }}
25+
labels:
26+
{{- include "osmosis-fullnode.labels" . | nindent 4 }}
27+
spec:
28+
ports:
29+
- name: sqs
30+
port: 9092
31+
protocol: TCP
32+
targetPort: 9092
33+
- name: price-monitor
34+
port: 8080
35+
protocol: TCP
36+
targetPort: 8080
37+
selector:
38+
app: sqs-node
39+
sqs: {{ include "osmosis-fullnode.fullname" . }}
40+
{{- end }}

charts/osmosis-fullnode/templates/statefulset.yaml

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,22 @@ spec:
1818
{{- range $key, $value := .Values.statefulset.labels }}
1919
{{ $key }}: {{ $value | quote }}
2020
{{- end }}
21+
{{- with .Values.statefulset.annotations }}
2122
annotations:
22-
{{- if .Values.monitoring.datadog.enabled }}
23-
{{- include "osmosis-fullnode.monitoringAnnotations" . | nindent 8 }}
24-
{{- end }}
25-
{{- with .Values.statefulset.annotations }}
2623
{{- toYaml . | nindent 8 }}
27-
{{- end }}
24+
{{- end }}
2825
spec:
2926
serviceAccountName: {{ include "osmosis-fullnode.serviceAccountName" . }}
3027
{{- with .Values.statefulset.tolerations }}
3128
tolerations:
3229
{{- toYaml . | nindent 8 }}
3330
{{- end }}
34-
{{- with .Values.statefulset.affinity }}
31+
{{- if .Values.statefulset.affinity }}
3532
affinity:
33+
{{- with .Values.statefulset.affinity }}
3634
{{- toYaml . | nindent 8 }}
3735
{{- end }}
36+
{{- end }}
3837
{{- with .Values.statefulset.nodeSelector }}
3938
nodeSelector:
4039
{{- toYaml . | nindent 8 }}
@@ -102,6 +101,49 @@ spec:
102101
mountPath: /etc/osmosis/config/
103102
- name: osmosis-scripts
104103
mountPath: /etc/osmosis/scripts/
104+
{{- if .Values.sqs.enabled }}
105+
- name: sqs
106+
image: {{ .Values.sqs.container.image.repository }}:{{ .Values.sqs.container.image.tag }}
107+
imagePullPolicy: {{ .Values.sqs.container.image.pullPolicy }}
108+
args:
109+
- --host
110+
- {{ include "osmosis-fullnode.fullname" . }}
111+
- --config
112+
- /etc/sqs/config.json
113+
{{- if .Values.sqs.container.env }}
114+
env:
115+
{{- range $key, $value := .Values.sqs.container.env }}
116+
- name: {{ $key }}
117+
value: {{ $value | quote }}
118+
{{- end }}
119+
{{- end }}
120+
{{- with .Values.sqs.container.resources }}
121+
resources:
122+
{{- toYaml . | nindent 10 }}
123+
{{- end }}
124+
ports:
125+
- containerPort: 9092
126+
name: sqs
127+
protocol: TCP
128+
- containerPort: 50051
129+
name: grpc-ingest
130+
protocol: TCP
131+
{{- with .Values.sqs.container.livenessProbe }}
132+
livenessProbe:
133+
{{- toYaml . | nindent 10 }}
134+
{{- end }}
135+
{{- with .Values.sqs.container.readinessProbe }}
136+
readinessProbe:
137+
{{- toYaml . | nindent 10 }}
138+
{{- end }}
139+
{{- with .Values.sqs.container.startupProbe }}
140+
startupProbe:
141+
{{- toYaml . | nindent 10 }}
142+
{{- end }}
143+
volumeMounts:
144+
- mountPath: /etc/sqs/
145+
name: sqs-config
146+
{{- end }}
105147
volumes:
106148
- name: osmosis-data
107149
hostPath:
@@ -113,4 +155,9 @@ spec:
113155
- name: osmosis-scripts
114156
configMap:
115157
name: {{ include "osmosis-fullnode.fullname" . }}-scripts
116-
defaultMode: 0755
158+
defaultMode: 0755
159+
{{- if .Values.sqs.enabled }}
160+
- name: sqs-config
161+
configMap:
162+
name: {{ include "osmosis-fullnode.fullname" . }}-sqs-config
163+
{{- end }}

0 commit comments

Comments
 (0)