From 8a720f5335489879a3f221b12d2507e7ac3c8ce8 Mon Sep 17 00:00:00 2001 From: Unchained Date: Fri, 6 Mar 2026 14:25:28 +0200 Subject: [PATCH] Add Kubernetes manifests for Flux CD deployment --- k8s/deployment.yaml | 43 ++++++++++++++++++++++++++++++++++++++++++ k8s/ingress.yaml | 17 +++++++++++++++++ k8s/kustomization.yaml | 6 ++++++ k8s/service.yaml | 12 ++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 k8s/deployment.yaml create mode 100644 k8s/ingress.yaml create mode 100644 k8s/kustomization.yaml create mode 100644 k8s/service.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 0000000..a6dcd97 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: storefront + namespace: manoonoils + labels: + app: storefront +spec: + replicas: 1 + selector: + matchLabels: + app: storefront + template: + metadata: + labels: + app: storefront + spec: + containers: + - name: storefront + image: manoonoils-store:repo + imagePullPolicy: Never + ports: + - containerPort: 3000 + env: + - name: NODE_ENV + value: production + - name: PORT + value: "3000" + - name: HOSTNAME + value: 0.0.0.0 + startupProbe: + httpGet: + path: / + port: 3000 + periodSeconds: 10 + failureThreshold: 30 + resources: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "500m" diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml new file mode 100644 index 0000000..52fb6a2 --- /dev/null +++ b/k8s/ingress.yaml @@ -0,0 +1,17 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: storefront + namespace: manoonoils +spec: + entryPoints: + - web + - websecure + routes: + - match: Host(\`dev.manoonoils.com\`) + kind: Rule + services: + - name: storefront + port: 3000 + tls: + certResolver: letsencrypt diff --git a/k8s/kustomization.yaml b/k8s/kustomization.yaml new file mode 100644 index 0000000..6421176 --- /dev/null +++ b/k8s/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- deployment.yaml +- service.yaml +- ingress.yaml diff --git a/k8s/service.yaml b/k8s/service.yaml new file mode 100644 index 0000000..57362c1 --- /dev/null +++ b/k8s/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: storefront + namespace: manoonoils +spec: + selector: + app: storefront + ports: + - port: 3000 + targetPort: 3000 + type: ClusterIP