add k8s config
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Torma Kristóf 2020-04-06 01:02:17 +02:00
parent 8cc30d35d2
commit 45ab875da1
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
3 changed files with 58 additions and 0 deletions

15
k8s/configmap.yml Normal file
View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: output-service-rdb-config
labels:
app: output-service-rdb
namespace: birbnetes
data:
PORT: 8080
DB_URL: jdbc:postgresql://output-service-postgres:5432/output-service-rdb
DB_USER: output-service-rdb
DB_PASSWORD: output-service-rdb-supersecret
MQ_HOST: rabbitmq
MQ_USERNAME: rabbitmq
MQ_PASSWORD: rabbitmq

27
k8s/deployment.yml Normal file
View File

@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: output-service-rdb
namespace: birbnetes
labels:
app: output-service-rdb
spec:
replicas: 1
selector:
matchLabels:
app: output-service-rdb
strategy:
type: Recreate
template:
metadata:
labels:
app: output-service-rdb
spec:
containers:
- image: registry.kmlabz.com/tormakris/output-service-rdb
name: output-service-rdb
envFrom:
- configMapRef:
name: output-service-rdb-config
ports:
- containerPort: 8080

16
k8s/service.yml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: output-service-rdb
namespace: birbnetes
labels:
app: output-service-rdb
spec:
ports:
- name: output-service-rdb
port: 80
targetPort: 8080
protocol: TCP
selector:
app: output-service-rdb
type: ClusterIP