From a51ba5d4857b6ceabf87482948a89667d9b58362 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 15 Jan 2025 16:21:40 +0100 Subject: Add frontend --- yaml/configs/frontend.yaml | 6 ++++++ yaml/deployments/frontend.yaml | 28 ++++++++++++++++++++++++++++ yaml/services/frontend.yaml | 11 +++++++++++ 3 files changed, 45 insertions(+) create mode 100644 yaml/configs/frontend.yaml create mode 100644 yaml/deployments/frontend.yaml create mode 100644 yaml/services/frontend.yaml (limited to 'yaml') diff --git a/yaml/configs/frontend.yaml b/yaml/configs/frontend.yaml new file mode 100644 index 0000000..f80a790 --- /dev/null +++ b/yaml/configs/frontend.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: frontend-config +data: + VITE_API_URL: ${VITE_API_URL} diff --git a/yaml/deployments/frontend.yaml b/yaml/deployments/frontend.yaml new file mode 100644 index 0000000..781bf87 --- /dev/null +++ b/yaml/deployments/frontend.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: frontend-deployment + labels: + app: frontend-app +spec: + selector: + matchLabels: + app: frontend-app + template: + metadata: + labels: + app: frontend-app + spec: + containers: + - name: frontend + image: ghcr.io/cas-4/frontend:latest + imagePullPolicy: Always + ports: + - containerPort: 80 + env: + - name: VITE_API_URL + valueFrom: + configMapKeyRef: + name: frontend-config + key: VITE_API_URL + restartPolicy: Always diff --git a/yaml/services/frontend.yaml b/yaml/services/frontend.yaml new file mode 100644 index 0000000..f5580ae --- /dev/null +++ b/yaml/services/frontend.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: frontend-service +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: frontend-app + type: ClusterIP -- cgit v1.2.3-18-g5258