From 84cd414759b0885413593eb8d6dccf4838323c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=8B=D1=82=D0=BA=D0=BE=D0=B2=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD?= Date: Thu, 11 Apr 2024 18:00:03 +0300 Subject: [PATCH] Frontend deployment --- liquid-code-chart/Chart.yaml | 2 +- .../Deployments/backend-deployment.yaml | 2 +- .../Deployments/frontend-deployment.yaml | 25 +++++++++++++++++++ .../templates/Services/frontend-service.yaml | 11 ++++++++ .../templates/default-ingress.yaml | 10 ++++++++ 5 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 liquid-code-chart/templates/Deployments/frontend-deployment.yaml create mode 100644 liquid-code-chart/templates/Services/frontend-service.yaml diff --git a/liquid-code-chart/Chart.yaml b/liquid-code-chart/Chart.yaml index e46583e..5797c45 100644 --- a/liquid-code-chart/Chart.yaml +++ b/liquid-code-chart/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/liquid-code-chart/templates/Deployments/backend-deployment.yaml b/liquid-code-chart/templates/Deployments/backend-deployment.yaml index fe8980b..c02a09e 100644 --- a/liquid-code-chart/templates/Deployments/backend-deployment.yaml +++ b/liquid-code-chart/templates/Deployments/backend-deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: app: {{ .Release.Name }}-backend spec: - replicas: 1 + replicas: 3 selector: matchLabels: app: {{ .Release.Name }}-backend diff --git a/liquid-code-chart/templates/Deployments/frontend-deployment.yaml b/liquid-code-chart/templates/Deployments/frontend-deployment.yaml new file mode 100644 index 0000000..61fa515 --- /dev/null +++ b/liquid-code-chart/templates/Deployments/frontend-deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-frontend-deployment + labels: + app: {{ .Release.Name }}-frontend +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Release.Name }}-frontend + template: + metadata: + labels: + app: {{ .Release.Name }}-frontend + spec: + containers: + - name: {{ .Release.Name }}-frontend + image: ghcr.io/nullptroma/liquid-frontend + imagePullPolicy: Always + ports: + - containerPort: 8000 + + imagePullSecrets: + - name: github-registry diff --git a/liquid-code-chart/templates/Services/frontend-service.yaml b/liquid-code-chart/templates/Services/frontend-service.yaml new file mode 100644 index 0000000..a39afd0 --- /dev/null +++ b/liquid-code-chart/templates/Services/frontend-service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-frontend-service +spec: + selector: + app: {{ .Release.Name }}-frontend + ports: + - protocol: TCP + port: 80 + targetPort: 8000 diff --git a/liquid-code-chart/templates/default-ingress.yaml b/liquid-code-chart/templates/default-ingress.yaml index 9976cc4..2cc26ba 100644 --- a/liquid-code-chart/templates/default-ingress.yaml +++ b/liquid-code-chart/templates/default-ingress.yaml @@ -14,3 +14,13 @@ spec: name: {{ .Release.Name }}-backend-service port: number: 80 + - host: nullptr.top + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-frontend-service + port: + number: 80