Add Kubernetes manifests for Flux CD deployment
This commit is contained in:
43
k8s/deployment.yaml
Normal file
43
k8s/deployment.yaml
Normal file
@@ -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"
|
||||
17
k8s/ingress.yaml
Normal file
17
k8s/ingress.yaml
Normal file
@@ -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
|
||||
6
k8s/kustomization.yaml
Normal file
6
k8s/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
12
k8s/service.yaml
Normal file
12
k8s/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: storefront
|
||||
namespace: manoonoils
|
||||
spec:
|
||||
selector:
|
||||
app: storefront
|
||||
ports:
|
||||
- port: 3000
|
||||
targetPort: 3000
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user