From 738d3a026910ac554e89dc0828240185076ae811 Mon Sep 17 00:00:00 2001 From: slaventius Date: Wed, 8 Feb 2023 19:35:56 +0300 Subject: [PATCH] * --- deploy/auth-config.yaml | 8 ++++++++ deploy/auth-deployment.yaml | 25 +++++++++++++++++++++++++ deploy/auth-ingress.yaml | 16 ++++++++++++++++ deploy/auth-service.yaml | 14 ++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 deploy/auth-config.yaml create mode 100644 deploy/auth-deployment.yaml create mode 100644 deploy/auth-ingress.yaml create mode 100644 deploy/auth-service.yaml diff --git a/deploy/auth-config.yaml b/deploy/auth-config.yaml new file mode 100644 index 0000000..8783684 --- /dev/null +++ b/deploy/auth-config.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: auth-config +data: + DB_HOST: "auth-db-service" + DB_PORT: "9995" + APP_PORT: "9994" diff --git a/deploy/auth-deployment.yaml b/deploy/auth-deployment.yaml new file mode 100644 index 0000000..28221ad --- /dev/null +++ b/deploy/auth-deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: auth-application + labels: + app: auth-application +spec: + replicas: 3 + selector: + matchLabels: + app: auth-application + template: + metadata: + labels: + app: auth-application + spec: + containers: + - name: auth-application + image: slaventius/test3k_auth:latest + imagePullPolicy: Always + ports: + - containerPort: 9994 + envFrom: + - configMapRef: + name: auth-config diff --git a/deploy/auth-ingress.yaml b/deploy/auth-ingress.yaml new file mode 100644 index 0000000..ca5e449 --- /dev/null +++ b/deploy/auth-ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: auth-ingress +spec: + rules: + - host: www.test3k.com + http: + paths: + - path: /api + pathType: ImplementationSpecific + backend: + service: + name: auth-service + port: + number: 9993 diff --git a/deploy/auth-service.yaml b/deploy/auth-service.yaml new file mode 100644 index 0000000..447dd85 --- /dev/null +++ b/deploy/auth-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: auth-service + labels: + app: auth-application +spec: + type: NodePort + selector: + app: auth-application + ports: + - protocol: TCP + port: 9993 + targetPort: 9994