2
0
This repository has been archived on 2020-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
deploy-kubernetes/xwiki.yml
2020-11-01 18:20:54 +01:00

98 lines
1.7 KiB
YAML

---
apiVersion: v1
kind: ConfigMap
metadata:
name: xwiki-config
labels:
app: xwiki
namespace: xwiki
data:
DB_USER: REDACTED
DB_PASSWORD: REDACTED
DB_DATABASE: REDACTED
DB_HOST: REDACTED
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: xwiki-pv-claim
labels:
app: xwiki
namespace: xwiki
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: xwiki
namespace: xwiki
spec:
replicas: 1
selector:
matchLabels:
app: xwiki
template:
metadata:
labels:
app: xwiki
spec:
containers:
- name: xwiki
image: xwiki:stable-postgres-tomcat
imagePullPolicy: "Always"
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /usr/local/xwiki
name: xwiki-volume
envFrom:
- configMapRef:
name: xwiki-config
volumes:
- name: xwiki-volume
persistentVolumeClaim:
claimName: xwiki-pv-claim
---
apiVersion: v1
kind: Service
metadata:
name: xwiki
namespace: xwiki
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
name: http
protocol: TCP
selector:
app: xwiki
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: xwiki
namespace: xwiki
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- xwiki.kmlabz.com
secretName: xwiki-cert-secret
rules:
- host: xwiki.kmlabz.com
http:
paths:
- path: /
backend:
serviceName: xwiki
servicePort: http