Skip to content

Commit

Permalink
Kustomize for deploying the website container.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynforthewyn committed Mar 10, 2024
1 parent 1bfebf4 commit 3ff0f3a
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 0 deletions.
3 changes: 3 additions & 0 deletions website-deployment/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.PHONY: pre-prod
pre-prod:
kubectl kustomize k8s-manifests/overlays/pre-prod/
24 changes: 24 additions & 0 deletions website-deployment/k8s-manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: playtechnique-website
labels:
app: playtechnique-website
spec:
replicas: 1
selector:
matchLabels:
app: playtechnique-website
template:
metadata:
labels:
app: playtechnique-website
spec:
containers:
- name: website
image: docker.io/playtechnique/website
ports:
- containerPort: 8080
name: pt-port


23 changes: 23 additions & 0 deletions website-deployment/k8s-manifests/base/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pt-website-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
rules:
- host:
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: pt-service
port:
number: 8080
tls:
- hosts:
-

4 changes: 4 additions & 0 deletions website-deployment/k8s-manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- ingress.yaml
- deployment.yaml
- service.yaml
12 changes: 12 additions & 0 deletions website-deployment/k8s-manifests/base/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: pt-service
spec:
selector:
app: playtechnique-website
ports:
- protocol: TCP
port: 8080
targetPort: pt-port

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: playtechnique-website

spec:
template:
spec:
containers:
- name: website
image: docker.io/playtechnique/website:1

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pt-website-ingress
spec:
rules:
- host: preprod.playtechnique.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: pt-service
port:
number: 8080
tls:
- hosts:
- preprod.playtechnique.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace: pt-website-pre-prod
resources:
- ../../base
- namespace.yaml
patchesStrategicMerge:
- ingress-patch.yaml
- deployment-container-version-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: pt-website-pre-prod

0 comments on commit 3ff0f3a

Please sign in to comment.