78 lines
1.5 KiB
YAML
78 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: codex-test-namespace
|
|
labels:
|
|
name: codex-test-namespace
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: codex-demo
|
|
namespace: codex-test-namespace
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
codex-node: dist-test
|
|
template:
|
|
metadata:
|
|
labels:
|
|
codex-node: dist-test
|
|
spec:
|
|
containers:
|
|
- name: codex-node1
|
|
image: thatbenbierens/nim-codex:sha-b204837
|
|
ports:
|
|
- containerPort: 8080
|
|
name: api-1
|
|
env:
|
|
- name: API_PORT
|
|
value: "8080"
|
|
- name: DATA_DIR
|
|
value: datadir1
|
|
- name: DISC_PORT
|
|
value: "8081"
|
|
- name: LISTEN_ADDRS
|
|
value: "/ip4/0.0.0.0/tcp/8082"
|
|
- name: codex-node2
|
|
image: thatbenbierens/nim-codex:sha-b204837
|
|
ports:
|
|
- containerPort: 8083
|
|
name: api-2
|
|
env:
|
|
- name: API_PORT
|
|
value: "8083"
|
|
- name: DATA_DIR
|
|
value: datadir2
|
|
- name: DISC_PORT
|
|
value: "8084"
|
|
- name: LISTEN_ADDRS
|
|
value: "/ip4/0.0.0.0/tcp/8085"
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: codex-entrypoint
|
|
namespace: codex-test-namespace
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
codex-node: dist-test
|
|
ports:
|
|
- name: "node1"
|
|
protocol: TCP
|
|
port: 8080
|
|
targetPort: api-1
|
|
nodePort: 30001
|
|
- name: "node2"
|
|
protocol: TCP
|
|
port: 8083
|
|
targetPort: api-2
|
|
nodePort: 30002
|
|
|