Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@
**/.Trashes
**/ehthumbs.db
**/Thumbs.db

# K8s secrets
secret.yaml
2 changes: 1 addition & 1 deletion k8s/certificates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ spec:
- pay.ksox.finance
- dashboard.ksox.finance
issuerRef:
name: ksox-finance-letsencrypt-http01
name: ksox-finance-selfsigned
8 changes: 8 additions & 0 deletions k8s/issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ spec:
selector:
dnsZones:
- ksox.finance

apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: ksox-finance-selfsigned
namespace: ksox-finance
spec:
selfSigned: {}
49 changes: 0 additions & 49 deletions k8s/ksox-exchange.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions k8s/pvcs.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions postgres/k8s/postgres.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pv-claim
namespace: ksox-finance
spec:
storageClassName: rook-ceph-ec-block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1024Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
13 changes: 13 additions & 0 deletions redis/k8s/redis.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: redis-pv-claim
namespace: ksox-finance
spec:
storageClassName: rook-ceph-ec-block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 32Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
7 changes: 7 additions & 0 deletions server/k8s/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: server-config
namespace: ksox-finance
data:
contract-address: "0x7a51979FD280B0A3210E115c0810298A7Bff98D3"
33 changes: 29 additions & 4 deletions server/k8s/engagement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,35 @@ spec:
memory: 400Mi
cpu: 400m
env:
- name: DATABASE_URL
value: postgresql://ksoxuser:ksoxuserp4ssword@postgres-service/ksox
- name: ENGINE_FRACTION_ACCURACY
value: 1/10000
- name: KSOX_SERVER_BLOCKCHAIN_URL
value: "http://ksox-server-blockchain/"
- name: KSOX_WS_BLOCKCHAIN_URL
valueFrom:
secretKeyRef:
name: ws-blockchain-url
key: url
- name: KSOX_POSTGRES_URL
value: "postgresql://ksoxuser:ksoxuserp4ssword@ksox-postgres/ksox"
- name: KSOX_REDIS_URL
value: "redis://ksox-redis/"
- name: KSOX_SERVER_ENGINE_URL
value: "http://ksox-server-engine/"
- name: CONTRACT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: contract-private-key
key: key
- name: CONTRACT_ADDRESS
valueFrom:
configMapKeyRef:
name: server-config
key: contract-address
- name: DEPOSIT_CONFIRMATIONS
value: "5"
- name: TESTS_CASES
value: "10000"
- name: TESTS_FRACTION_BYTES
value: "2"
initContainers:
- name: wait-for-postgres
image: busybox
Expand Down
33 changes: 29 additions & 4 deletions server/k8s/engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,35 @@ spec:
memory: 500Mi
cpu: 500m
env:
- name: DATABASE_URL
value: postgresql://ksoxuser:ksoxuserp4ssword@postgres-service/ksox
- name: ENGINE_FRACTION_ACCURACY
value: 1/10000
- name: KSOX_SERVER_BLOCKCHAIN_URL
value: "http://ksox-server-blockchain/"
- name: KSOX_WS_BLOCKCHAIN_URL
valueFrom:
secretKeyRef:
name: ws-blockchain-url
key: url
- name: KSOX_POSTGRES_URL
value: "postgresql://ksoxuser:ksoxuserp4ssword@ksox-postgres/ksox"
- name: KSOX_REDIS_URL
value: "redis://ksox-redis/"
- name: KSOX_SERVER_ENGINE_URL
value: "http://ksox-server-engine/"
- name: CONTRACT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: contract-private-key
key: key
- name: CONTRACT_ADDRESS
valueFrom:
configMapKeyRef:
name: server-config
key: contract-address
- name: DEPOSIT_CONFIRMATIONS
value: "5"
- name: TESTS_CASES
value: "10000"
- name: TESTS_FRACTION_BYTES
value: "2"
initContainers:
- name: wait-for-postgres
image: busybox
Expand Down
43 changes: 32 additions & 11 deletions server/k8s/worker.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
name: server-worker-deployment
name: server-worker-daemonset
namespace: ksox-finance
labels:
app: server-worker
Expand All @@ -27,14 +27,35 @@ spec:
memory: 500Mi
cpu: 500m
env:
- name: DATABASE_URL
value: postgresql://ksoxuser:ksoxuserp4ssword@postgres-service/ksox
- name: ENGINE_URL
value: http://server-engine-service/
- name: REDIS_URL
value: redis://redis-service/
- name: WORKER_FRACTION_ACCURACY
value: 1/10000
- name: KSOX_SERVER_BLOCKCHAIN_URL
value: "http://ksox-server-blockchain/"
- name: KSOX_WS_BLOCKCHAIN_URL
valueFrom:
secretKeyRef:
name: ws-blockchain-url
key: url
- name: KSOX_POSTGRES_URL
value: "postgresql://ksoxuser:ksoxuserp4ssword@ksox-postgres/ksox"
- name: KSOX_REDIS_URL
value: "redis://ksox-redis/"
- name: KSOX_SERVER_ENGINE_URL
value: "http://ksox-server-engine/"
- name: CONTRACT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: contract-private-key
key: key
- name: CONTRACT_ADDRESS
valueFrom:
configMapKeyRef:
name: server-config
key: contract-address
- name: DEPOSIT_CONFIRMATIONS
value: "5"
- name: TESTS_CASES
value: "10000"
- name: TESTS_FRACTION_BYTES
value: "2"
initContainers:
- name: wait-for-postgres
image: busybox
Expand Down Expand Up @@ -91,7 +112,7 @@ metadata:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
ingressClassName: ingress-nginx
ingressClassName: ingress-nginx-prod
tls:
- hosts:
- app.ksox.finance
Expand Down
6 changes: 3 additions & 3 deletions web/k8s/dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
name: web-dashboard-deployment
name: web-dashboard-daemonset
namespace: ksox-finance
labels:
app: web-dashboard
Expand Down Expand Up @@ -49,7 +49,7 @@ metadata:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
ingressClassName: ingress-nginx
ingressClassName: ingress-nginx-prod
tls:
- hosts:
- dashboard.ksox.finance
Expand Down
6 changes: 3 additions & 3 deletions web/k8s/exchange-landing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
name: web-exchange-landing-deployment
name: web-exchange-landing-daemonset
namespace: ksox-finance
labels:
app: web-exchange-landing
Expand Down Expand Up @@ -50,7 +50,7 @@ metadata:
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
spec:
ingressClassName: ingress-nginx
ingressClassName: ingress-nginx-prod
tls:
- hosts:
- ksox.finance
Expand Down
6 changes: 3 additions & 3 deletions web/k8s/exchange.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
name: web-exchange-deployment
name: web-exchange-daemonset
namespace: ksox-finance
labels:
app: web-exchange
Expand Down Expand Up @@ -49,7 +49,7 @@ metadata:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
ingressClassName: ingress-nginx
ingressClassName: ingress-nginx-prod
tls:
- hosts:
- app.ksox.finance
Expand Down
6 changes: 3 additions & 3 deletions web/k8s/processor.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
name: web-processor-deployment
name: web-processor-daemonset
namespace: ksox-finance
labels:
app: web-processor
Expand Down Expand Up @@ -49,7 +49,7 @@ metadata:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
ingressClassName: ingress-nginx
ingressClassName: ingress-nginx-prod
tls:
- hosts:
- pay.ksox.finance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
createResource,
createSignal,
JSX,
onMount,
useContext,
} from "solid-js";
import { ContractResponse } from "@packages/types/contract";
Expand Down