|
|
@@ -0,0 +1,115 @@
|
|
|
+---
|
|
|
+apiVersion: apps/v1
|
|
|
+kind: Deployment
|
|
|
+metadata:
|
|
|
+ name: webdav-deployment
|
|
|
+ namespace: default
|
|
|
+ labels:
|
|
|
+ app: webdav
|
|
|
+spec:
|
|
|
+ replicas: 1
|
|
|
+ selector:
|
|
|
+ matchLabels:
|
|
|
+ app: webdav
|
|
|
+ template:
|
|
|
+ metadata:
|
|
|
+ labels:
|
|
|
+ app: webdav
|
|
|
+ spec:
|
|
|
+ containers:
|
|
|
+ - image: rclone/rclone
|
|
|
+ name: rclone
|
|
|
+ imagePullPolicy: IfNotPresent
|
|
|
+ ports:
|
|
|
+ - containerPort: 80
|
|
|
+ volumeMounts:
|
|
|
+ - name: webdav-data-vol
|
|
|
+ mountPath: /data
|
|
|
+ - name: webdav-config-vol
|
|
|
+ mountPath: /config
|
|
|
+ args: ["serve", "webdav", "/data", "--addr", ":80", "--htpasswd", "/config/htpasswd"]
|
|
|
+ volumes:
|
|
|
+ - name: webdav-data-vol
|
|
|
+ hostPath:
|
|
|
+ path: /mnt/webdav/data
|
|
|
+ type: Directory
|
|
|
+ - name: webdav-config-vol
|
|
|
+ hostPath:
|
|
|
+ path: /mnt/webdav/config
|
|
|
+ type: Directory
|
|
|
+---
|
|
|
+apiVersion: v1
|
|
|
+kind: Service
|
|
|
+metadata:
|
|
|
+ name: webdav
|
|
|
+ namespace: default
|
|
|
+ labels:
|
|
|
+ app: webdav
|
|
|
+spec:
|
|
|
+ type: ClusterIP
|
|
|
+ selector:
|
|
|
+ app: webdav
|
|
|
+ ports:
|
|
|
+ - port: 80
|
|
|
+ targetPort: 80
|
|
|
+---
|
|
|
+apiVersion: cert-manager.io/v1
|
|
|
+kind: Certificate
|
|
|
+metadata:
|
|
|
+ name: webdav.bodicsek.host
|
|
|
+spec:
|
|
|
+ secretName: webdav.bodicsek.host
|
|
|
+ issuerRef:
|
|
|
+ name: letsencrypt-prod
|
|
|
+ kind: ClusterIssuer
|
|
|
+ dnsNames:
|
|
|
+ - webdav.bodicsek.host
|
|
|
+---
|
|
|
+apiVersion: traefik.containo.us/v1alpha1
|
|
|
+kind: Middleware
|
|
|
+metadata:
|
|
|
+ name: webdav-options-support
|
|
|
+spec:
|
|
|
+ headers:
|
|
|
+ accessControlAllowMethods:
|
|
|
+ - "GET"
|
|
|
+ - "HEAD"
|
|
|
+ - "POST"
|
|
|
+ - "PUT"
|
|
|
+ - "DELETE"
|
|
|
+ - "PATCH"
|
|
|
+ - "COPY"
|
|
|
+ - "LOCK"
|
|
|
+ - "UNLOCK"
|
|
|
+ - "MKCOL"
|
|
|
+ - "MOVE"
|
|
|
+ - "PROPFIND"
|
|
|
+ - "PROPPATCH"
|
|
|
+ - "OPTIONS"
|
|
|
+ accessControlAllowHeaders:
|
|
|
+ - "*"
|
|
|
+ accessControlAllowOriginList:
|
|
|
+ - "*"
|
|
|
+ accessControlMaxAge: 100
|
|
|
+---
|
|
|
+apiVersion: traefik.containo.us/v1alpha1
|
|
|
+kind: IngressRoute
|
|
|
+metadata:
|
|
|
+ name: webdav
|
|
|
+ namespace: default
|
|
|
+spec:
|
|
|
+ entryPoints:
|
|
|
+ - websecure
|
|
|
+ routes:
|
|
|
+ - kind: Rule
|
|
|
+ match: Host(`webdav.bodicsek.host`)
|
|
|
+ middlewares:
|
|
|
+ - name: webdav-options-support
|
|
|
+ services:
|
|
|
+ - kind: Service
|
|
|
+ name: webdav
|
|
|
+ namespace: default
|
|
|
+ passHostHeader: true
|
|
|
+ port: 80
|
|
|
+ tls:
|
|
|
+ secretName: webdav.bodicsek.host
|