223 lines
4.8 KiB
YAML
223 lines
4.8 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: wekan
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: wekan-secrets
|
|
namespace: wekan
|
|
type: Opaque
|
|
stringData:
|
|
MONGO_INITDB_ROOT_USERNAME: wekan
|
|
MONGO_INITDB_ROOT_PASSWORD: change-me-now
|
|
MONGO_URL: mongodb://wekan:change-me-now@mongodb:27017/wekan?authSource=admin
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: wekan-data
|
|
namespace: wekan
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: cephfs-hyper
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: mongodb-data
|
|
namespace: wekan
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: cephfs-hyper
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mongodb
|
|
namespace: wekan
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: mongodb
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mongodb
|
|
spec:
|
|
containers:
|
|
- name: mongodb
|
|
image: mongo:6
|
|
imagePullPolicy: Always
|
|
args:
|
|
- --bind_ip_all
|
|
- --ipv6
|
|
ports:
|
|
- containerPort: 27017
|
|
name: mongo
|
|
env:
|
|
- name: MONGO_INITDB_ROOT_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: wekan-secrets
|
|
key: MONGO_INITDB_ROOT_USERNAME
|
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: wekan-secrets
|
|
key: MONGO_INITDB_ROOT_PASSWORD
|
|
volumeMounts:
|
|
- name: mongodb-data
|
|
mountPath: /data/db
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 27017
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 27017
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 20
|
|
volumes:
|
|
- name: mongodb-data
|
|
persistentVolumeClaim:
|
|
claimName: mongodb-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mongodb
|
|
namespace: wekan
|
|
spec:
|
|
selector:
|
|
app: mongodb
|
|
ports:
|
|
- name: mongo
|
|
port: 27017
|
|
targetPort: 27017
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: wekan
|
|
namespace: wekan
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: wekan
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: wekan
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 1000
|
|
initContainers:
|
|
- name: init-wekan-data
|
|
image: busybox:1.36
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
mkdir -p /data/attachments
|
|
chmod -R 0777 /data
|
|
securityContext:
|
|
runAsUser: 0
|
|
volumeMounts:
|
|
- name: wekan-data
|
|
mountPath: /data
|
|
containers:
|
|
- name: wekan
|
|
image: ghcr.io/wekan/wekan:v8.42
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
env:
|
|
- name: BIND_IP
|
|
value: "::"
|
|
- name: ROOT_URL
|
|
value: "https://wekan.apps.undercloud.dev"
|
|
- name: PORT
|
|
value: "8080"
|
|
- name: WITH_API
|
|
value: "true"
|
|
- name: WRITABLE_PATH
|
|
value: "/data"
|
|
- name: MONGO_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: wekan-secrets
|
|
key: MONGO_URL
|
|
volumeMounts:
|
|
- name: wekan-data
|
|
mountPath: /data
|
|
#readinessProbe:
|
|
# httpGet:
|
|
# path: /
|
|
# port: 8080
|
|
# host: 127.0.0.1
|
|
# initialDelaySeconds: 20
|
|
# periodSeconds: 10
|
|
|
|
#livenessProbe:
|
|
# httpGet:
|
|
# path: /
|
|
# port: 8080
|
|
# host: 127.0.0.1
|
|
# initialDelaySeconds: 60
|
|
# periodSeconds: 20
|
|
volumes:
|
|
- name: wekan-data
|
|
persistentVolumeClaim:
|
|
claimName: wekan-data
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: wekan
|
|
namespace: wekan
|
|
spec:
|
|
selector:
|
|
app: wekan
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: wekan
|
|
namespace: wekan
|
|
annotations:
|
|
kubernetes.io/ingress.class: nginx
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- wekan.apps.undercloud.dev
|
|
secretName: wekan-tls
|
|
rules:
|
|
- host: wekan.apps.undercloud.dev
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: wekan
|
|
port:
|
|
number: 80 |