78 lines
1.6 KiB
YAML
78 lines
1.6 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
namespace: woj
|
|
name: server-config
|
|
labels:
|
|
app: server
|
|
data:
|
|
DATABASE_HOST: "db-service.woj.svc.cluster.local"
|
|
DATABASE_USER: "woj"
|
|
DATABASE_PASSWORD: "A_VeRy-S3cUr3^PaSsWoRd"
|
|
DATABASE_NAME: "woj"
|
|
|
|
REDIS_ADDRESS: "cache-service.woj.svc.cluster.local"
|
|
REDIS_PASSWORD: "YeT_An0tHeR_VeRy-S3cUr3^PaSsWoRd"
|
|
|
|
STORAGE_ENDPOINT: "storage-service.woj.svc.cluster.local:9000"
|
|
STORAGE_ACCESS_KEY: "A_VeRy_CoMpLeX_AcCeSs_KeY"
|
|
STORAGE_SECRET_KEY: "A_VeRy_CoMpLeX_ScReT_KeY"
|
|
STORAGE_BUCKET: "woj"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
namespace: woj
|
|
name: server-deployment
|
|
labels:
|
|
app: server
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: server
|
|
template:
|
|
metadata:
|
|
namespace: woj
|
|
name: server-pod
|
|
labels:
|
|
app: server
|
|
spec:
|
|
initContainers:
|
|
- name: init-server
|
|
image: git.0x7f.app/woj/woj-server:1.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- init
|
|
envFrom:
|
|
- configMapRef:
|
|
name: server-config
|
|
containers:
|
|
- name: server
|
|
image: git.0x7f.app/woj/woj-server:1.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- server
|
|
envFrom:
|
|
- configMapRef:
|
|
name: server-config
|
|
ports:
|
|
- containerPort: 8000
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
namespace: woj
|
|
name: server-service
|
|
labels:
|
|
app: server
|
|
spec:
|
|
type: LoadBalancer
|
|
selector:
|
|
app: server
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8000
|
|
targetPort: 8000
|