feat: initial mdBook setup with CI/CD
- mdBook structure - Multi-image Docker build - Deploy to books.softwarehuset.com
This commit is contained in:
parent
98d32b5f16
commit
f8d7067ea0
11 changed files with 231 additions and 0 deletions
38
k8s/base/deployment.yaml
Normal file
38
k8s/base/deployment.yaml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: books
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: books
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: books
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: books
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "100m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 5
|
||||
23
k8s/base/ingress.yaml
Normal file
23
k8s/base/ingress.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: books
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- books.softwarehuset.com
|
||||
secretName: books-tls
|
||||
rules:
|
||||
- host: books.softwarehuset.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: books
|
||||
port:
|
||||
number: 80
|
||||
17
k8s/base/kustomization.yaml
Normal file
17
k8s/base/kustomization.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app: books
|
||||
includeSelectors: true
|
||||
|
||||
images:
|
||||
- name: books
|
||||
newName: code.core.ci/softwarehuset/books
|
||||
newTag: latest
|
||||
10
k8s/base/service.yaml
Normal file
10
k8s/base/service.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: books
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: books
|
||||
Loading…
Add table
Add a link
Reference in a new issue