Merge pull request #176 from sirius0xdev/feat/solana-ingester-redis-pvc
feat: add Solana WebSocket ingester + Redis persistent volume
This commit is contained in:
commit
0768af1a31
8 changed files with 134 additions and 1 deletions
|
|
@ -5,4 +5,5 @@ resources:
|
|||
- data-service-config.yaml
|
||||
- execute-service-config.yaml
|
||||
- news-service-config.yaml
|
||||
- solana-ingester-config.yaml
|
||||
- dashboard-config.yaml
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: trading-solana-ingester-config
|
||||
namespace: customer1
|
||||
data:
|
||||
HELIUS_RPC_ENDPOINT: "https://mainnet.helius-rpc.com"
|
||||
JUPITER_API_URL: "https://quote-api.jup.ag/v6"
|
||||
KAFKA_BROKER: "trading-kafka.customer1.svc.cluster.local:9092"
|
||||
KAFKA_TOPIC: "solana-market-data"
|
||||
LOG_LEVEL: "info"
|
||||
|
|
@ -6,6 +6,7 @@ resources:
|
|||
- data-service
|
||||
- execute-service
|
||||
- news-service
|
||||
- solana-ingester
|
||||
- dashboard
|
||||
- configmaps
|
||||
- secrets
|
||||
|
|
|
|||
|
|
@ -1,5 +1,19 @@
|
|||
# Redis single-instance for trading platform caching
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: trading-redis-pvc
|
||||
namespace: customer1
|
||||
labels:
|
||||
app: trading-redis
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: trading-redis
|
||||
|
|
@ -100,4 +114,5 @@ spec:
|
|||
configMap:
|
||||
name: trading-redis-config
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
persistentVolumeClaim:
|
||||
claimName: trading-redis-pvc
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ stringData:
|
|||
market-data-api-key: ENC[AES256_GCM,data:2x2vPbOu/T+4albtkeRrktBffX1i06vXQmnn31685g==,iv:LqfpNmK6d9tt2MeaaozI+PVim8KUK8TflEalSxptfjM=,tag:Tan91JSeh5aUhGiExns4PQ==,type:str]
|
||||
#ENC[AES256_GCM,data:jVRQi+JQNlDUQ+bCe189YrOcsXjYYTGF,iv:SnCbB2w1jnPnXqWGPEivK/b9bWnYA6qL1Xkx6n8XzQ8=,tag:SYJbW0Aea/evPgvGNCqw9Q==,type:comment]
|
||||
service-auth-token: ENC[AES256_GCM,data:Xrqq82eI5obC86s+FJpi4DbX9+hDdTlYdmfL6DlW,iv:lDhfIuT+On7W6Xk36FKw7fE7zBheRPaMZwQBn7DF5qc=,tag:CdE0OWzQ9OLkSsDL8gq9gA==,type:str]
|
||||
# TODO: replace placeholders and run `sops -e --in-place trading-secrets.yaml`
|
||||
helius-api-key: "CHANGE_ME_helius_api_key"
|
||||
jupiter-api-key: "CHANGE_ME_jupiter_api_key"
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1uuxf066xuuqgvjppxfcmqkwfcufnwp3wcwnl9h20g9k4l8nkw9jsaungf7
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: trading-solana-ingester
|
||||
namespace: customer1
|
||||
labels:
|
||||
app: trading-solana-ingester
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: trading-solana-ingester
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: trading-solana-ingester
|
||||
annotations:
|
||||
checksum/config: trading-solana-ingester-config
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 30
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: solana-ingester
|
||||
image: ghcr.io/sirius0xdev/trading-data-service:latest
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- solana-ingester
|
||||
ports:
|
||||
- containerPort: 8002
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: trading-solana-ingester-config
|
||||
env:
|
||||
- name: HELIUS_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: trading-platform-secrets
|
||||
key: helius-api-key
|
||||
- name: JUPITER_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: trading-platform-secrets
|
||||
key: jupiter-api-key
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8002
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
failureThreshold: 30
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8002
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8002
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: trading-solana-ingester
|
||||
namespace: customer1
|
||||
labels:
|
||||
app: trading-solana-ingester
|
||||
spec:
|
||||
selector:
|
||||
app: trading-solana-ingester
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8002
|
||||
name: http
|
||||
type: ClusterIP
|
||||
Loading…
Add table
Reference in a new issue