From 4381aaa6b2091e0b44090dffda896eb0733b84ed Mon Sep 17 00:00:00 2001 From: marcsello Date: Mon, 20 Apr 2020 23:08:20 +0200 Subject: [PATCH] added k8s stuff --- k8s/configmap.yaml | 13 +++++++++++++ k8s/deployment.yaml | 29 +++++++++++++++++++++++++++++ k8s/service.yaml | 16 ++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 k8s/configmap.yaml create mode 100644 k8s/deployment.yaml create mode 100644 k8s/service.yaml diff --git a/k8s/configmap.yaml b/k8s/configmap.yaml new file mode 100644 index 0000000..46ae576 --- /dev/null +++ b/k8s/configmap.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: classification-service + labels: + app: classification-service + namespace: birbnetes +data: + SENTRY_DSN: https://c4141698a2be4919a5c04c5b00cb7c34@sentry.kmlabz.com/5 + RELEASE_ID: luna-k8s + RELEASEMODE: release + PIKA_URL: amqp://user:1wZVQnP5vy@birb-rabbitmq:5672/ + PIKA_EXCHANGE: output \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..19d49b7 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: classification-service + namespace: birbnetes + labels: + app: classification-service +spec: + replicas: 1 + selector: + matchLabels: + app: classification-service + strategy: + type: Recreate + template: + metadata: + labels: + app: classification-service + spec: + containers: + - image: registry.kmlabz.com/tormakris/classification-service + name: classification-service + envFrom: + - configMapRef: + name: classification-service + ports: + - containerPort: 8000 + imagePullSecrets: + - name: regcred \ No newline at end of file diff --git a/k8s/service.yaml b/k8s/service.yaml new file mode 100644 index 0000000..27735e5 --- /dev/null +++ b/k8s/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: classification-service + namespace: birbnetes + labels: + app: classification-service +spec: + ports: + - name: classification-service + port: 80 + targetPort: 8000 + protocol: TCP + selector: + app: classification-service + type: ClusterIP \ No newline at end of file