aboutsummaryrefslogtreecommitdiff
path: root/deploy/www.yaml
diff options
context:
space:
mode:
authorJulien Dessaux2021-11-13 18:42:52 +0100
committerJulien Dessaux2021-11-13 18:42:52 +0100
commit2a6536ad1ef62facc90567c43f3d4f9f1dd5d9cd (patch)
tree1c042cd1c58796bc571a381bcf316b41e3c8ae9c /deploy/www.yaml
parentMigrated gitea to dalinar and updated other pages to reflect that. Updated ww... (diff)
downloadwww-2a6536ad1ef62facc90567c43f3d4f9f1dd5d9cd.tar.gz
www-2a6536ad1ef62facc90567c43f3d4f9f1dd5d9cd.tar.bz2
www-2a6536ad1ef62facc90567c43f3d4f9f1dd5d9cd.zip
Added container building script and kubernetes manifest
Diffstat (limited to 'deploy/www.yaml')
-rw-r--r--deploy/www.yaml131
1 files changed, 131 insertions, 0 deletions
diff --git a/deploy/www.yaml b/deploy/www.yaml
new file mode 100644
index 0000000..70abe42
--- /dev/null
+++ b/deploy/www.yaml
@@ -0,0 +1,131 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: www
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ namespace: www
+ name: www
+ labels:
+ app: www
+spec:
+ replicas: 1
+ strategy:
+ rollingUpdate:
+ maxSurge: 1
+ maxUnavailable: 0
+ type: RollingUpdate
+ selector:
+ matchLabels:
+ app: www
+ template:
+ metadata:
+ labels:
+ app: www
+ spec:
+ containers:
+ - name: www
+ image: quay.io/adyxax/www:2021111202
+ ports:
+ - containerPort: 80
+ readinessProbe:
+ httpGet:
+ path: '/'
+ port: 80
+ initialDelaySeconds: 1
+ timeoutSeconds: 1
+ livenessProbe:
+ httpGet:
+ path: '/'
+ port: 80
+ initialDelaySeconds: 1
+ timeoutSeconds: 1
+ lifecycle:
+ preStop:
+ exec:
+ command: ["/bin/sh", "-c", "sleep 10"]
+ - name: search
+ image: quay.io/adyxax/www-search:2021111202
+ ports:
+ - containerPort: 8080
+ readinessProbe:
+ httpGet:
+ path: '/search/'
+ port: 8080
+ initialDelaySeconds: 1
+ timeoutSeconds: 1
+ livenessProbe:
+ httpGet:
+ path: '/search/'
+ port: 8080
+ initialDelaySeconds: 1
+ timeoutSeconds: 1
+ lifecycle:
+ preStop:
+ exec:
+ command: ["/bin/sh", "-c", "sleep 10"]
+---
+apiVersion: v1
+kind: Service
+metadata:
+ namespace: www
+ name: www
+spec:
+ type: ClusterIP
+ selector:
+ app: www
+ ports:
+ - protocol: TCP
+ port: 80
+ targetPort: 80
+ name: www
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+ name: search
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ namespace: www
+ name: www
+spec:
+ ingressClassName: nginx
+ tls:
+ - secretName: wildcard-adyxax-org
+ rules:
+ - host: www.adyxax.org
+ http:
+ paths:
+ - path: '/'
+ pathType: Prefix
+ backend:
+ service:
+ name: www
+ port:
+ number: 80
+ - path: '/search'
+ pathType: Prefix
+ backend:
+ service:
+ name: www
+ port:
+ number: 8080
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ namespace: www
+ name: redirects
+ annotations:
+ nginx.ingress.kubernetes.io/permanent-redirect: https://www.adyxax.org/
+ nginx.ingress.kubernetes.io/permanent-redirect-code: "308"
+spec:
+ ingressClassName: nginx
+ tls:
+ - secretName: wildcard-adyxax-org
+ rules:
+ - host: adyxax.org
+ - host: wiki.adyxax.org