Added k8s stuff

This commit is contained in:
Pünkösd Marcell 2020-04-14 13:01:10 +02:00
parent ff93395ce0
commit e343469c6c
3 changed files with 61 additions and 0 deletions

16
k8s/configmap.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: model-service
labels:
app: model-service
namespace: birbnetes
data:
SENTRY_DSN: https://d424be7f1a4a4c6aa408e15f96b5d665@sentry.kmlabz.com/13
RELEASE_ID: luna-k8s
RELEASEMODE: release
MINIO_ENDPOINT: "model-minio:9000"
MINIO_ACCESS_KEY: birbnetes-minio-access
MINIO_SECRET_KEY: birbnetes-supersecret
MINIO_BUCKET_NAME: noise_models
DATABASE_URI: "postgresql://kecske:kekecske@photodatabase/photowave"

29
k8s/deployment.yaml Normal file
View File

@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: model-service
namespace: birbnetes
labels:
app: model-service
spec:
replicas: 1
selector:
matchLabels:
app: model-service
strategy:
type: Recreate
template:
metadata:
labels:
app: model-service
spec:
containers:
- image: registry.kmlabz.com/tormakris/model-service
name: model-service
envFrom:
- configMapRef:
name: model-service
ports:
- containerPort: 8000
imagePullSecrets:
- name: regcred

16
k8s/service.yaml Normal file
View File

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