nextcloud over
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
d2828b740b
commit
173ad72188
|
@ -0,0 +1,109 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
name: nextcloud
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: MYSQL_HOST
|
||||||
|
value: nextcloud-mysql-mariadb
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: db-creds
|
||||||
|
key: mariadb-password
|
||||||
|
- name: NEXTCLOUD_ADMIN_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: nextcloud-username
|
||||||
|
name: nextcloud
|
||||||
|
- name: NEXTCLOUD_ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: nextcloud-password
|
||||||
|
name: nextcloud
|
||||||
|
- name: NEXTCLOUD_TRUSTED_DOMAINS
|
||||||
|
value: nextcloud.martyn.berlin
|
||||||
|
- name: NEXTCLOUD_DATA_DIR
|
||||||
|
value: /var/www/html/data
|
||||||
|
image: nextcloud:27-apache
|
||||||
|
imagePullPolicy: Always
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
httpHeaders:
|
||||||
|
- name: Host
|
||||||
|
value: nextcloud.martyn.berlin
|
||||||
|
path: /status.php
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
name: nextcloud
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
httpHeaders:
|
||||||
|
- name: Host
|
||||||
|
value: nextcloud.martyn.berlin
|
||||||
|
path: /status.php
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 5
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/www/
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: root
|
||||||
|
- mountPath: /var/www/html
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: html
|
||||||
|
- mountPath: /var/www/html/data
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: data
|
||||||
|
- mountPath: /var/www/html/config
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: config
|
||||||
|
- mountPath: /var/www/html/custom_apps
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: custom_apps
|
||||||
|
- mountPath: /var/www/tmp
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: tmp
|
||||||
|
- mountPath: /var/www/html/themes
|
||||||
|
name: nextcloud-main
|
||||||
|
subPath: themes
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 33
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-main
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-nextcloud
|
|
@ -0,0 +1,28 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
external-dns.alpha.kubernetes.io/target: armnleg.martyn.berlin
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: 200m
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
name: nextcloud
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: nextcloud.martyn.berlin
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: nextcloud
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- nextcloud.martyn.berlin
|
||||||
|
secretName: nextcloud-tls
|
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
name: nextcloud-nextcloud
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 18Gi
|
||||||
|
storageClassName: rook-ceph-block-ssd
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
name: nextcloud
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
type: LoadBalancer
|
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: nextcloud
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: nextcloud
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
project: apps
|
||||||
|
source:
|
||||||
|
path: apps-kustomized/nextcloud
|
||||||
|
repoURL: https://git.martyn.berlin/martyn/infra4talos
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
Loading…
Reference in New Issue