From 964777c21df751c35bf1e96e1a67d08db27963b6 Mon Sep 17 00:00:00 2001 From: Gerrit Gogel Date: Mon, 8 Jan 2024 21:34:04 +0100 Subject: [PATCH] k8s replace seafile-caddy with ingress-nginx --- k8s/seafile-caddy-deployment.yaml | 46 ------------------------ k8s/seafile-caddy-ingress.yaml | 30 ---------------- k8s/seafile-caddy-service.yaml | 24 ------------- k8s/seafile-ingress.yaml | 58 +++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 100 deletions(-) delete mode 100644 k8s/seafile-caddy-deployment.yaml delete mode 100644 k8s/seafile-caddy-ingress.yaml delete mode 100644 k8s/seafile-caddy-service.yaml create mode 100644 k8s/seafile-ingress.yaml diff --git a/k8s/seafile-caddy-deployment.yaml b/k8s/seafile-caddy-deployment.yaml deleted file mode 100644 index 2bbe9e1..0000000 --- a/k8s/seafile-caddy-deployment.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kompose.service.expose: localhost - kompose.service.expose.ingress-class-name: nginx - nginx.ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-read-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-send-timeout: "36000" - nginx.ingress.kubernetes.io/send-timeout: "36000" - creationTimestamp: null - labels: - io.kompose.service: seafile-caddy - name: seafile-caddy -spec: - replicas: 1 - selector: - matchLabels: - io.kompose.service: seafile-caddy - strategy: {} - template: - metadata: - annotations: - kompose.service.expose: localhost - kompose.service.expose.ingress-class-name: nginx - nginx.ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-read-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-send-timeout: "36000" - nginx.ingress.kubernetes.io/send-timeout: "36000" - creationTimestamp: null - labels: - io.kompose.network/compose-default: "true" - io.kompose.network/compose-seafile-net: "true" - io.kompose.service: seafile-caddy - spec: - containers: - - image: ggogel/seafile-caddy:2.7.5 - name: seafile-caddy - ports: - - containerPort: 80 - protocol: TCP - resources: {} - restartPolicy: Always -status: {} diff --git a/k8s/seafile-caddy-ingress.yaml b/k8s/seafile-caddy-ingress.yaml deleted file mode 100644 index 506f2b7..0000000 --- a/k8s/seafile-caddy-ingress.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kompose.service.expose: localhost - kompose.service.expose.ingress-class-name: nginx - nginx.ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-read-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-send-timeout: "36000" - nginx.ingress.kubernetes.io/send-timeout: "36000" - creationTimestamp: null - labels: - io.kompose.service: seafile-caddy - name: seafile-caddy -spec: - ingressClassName: nginx - rules: - - host: localhost - http: - paths: - - backend: - service: - name: seafile-caddy - port: - number: 80 - path: / - pathType: Prefix -status: - loadBalancer: {} diff --git a/k8s/seafile-caddy-service.yaml b/k8s/seafile-caddy-service.yaml deleted file mode 100644 index ff48d5c..0000000 --- a/k8s/seafile-caddy-service.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - kompose.service.expose: localhost - kompose.service.expose.ingress-class-name: nginx - nginx.ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-read-timeout: "36000" - nginx.ingress.kubernetes.io/proxy-send-timeout: "36000" - nginx.ingress.kubernetes.io/send-timeout: "36000" - creationTimestamp: null - labels: - io.kompose.service: seafile-caddy - name: seafile-caddy -spec: - ports: - - name: "80" - port: 80 - targetPort: 80 - selector: - io.kompose.service: seafile-caddy -status: - loadBalancer: {} diff --git a/k8s/seafile-ingress.yaml b/k8s/seafile-ingress.yaml new file mode 100644 index 0000000..2af4c85 --- /dev/null +++ b/k8s/seafile-ingress.yaml @@ -0,0 +1,58 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: seafile-ingress + annotations: + nginx.ingress.kubernetes.io/proxy-body-size: "0" + nginx.ingress.kubernetes.io/proxy-connect-timeout: "36000" + nginx.ingress.kubernetes.io/proxy-read-timeout: "36000" + nginx.ingress.kubernetes.io/proxy-send-timeout: "36000" + nginx.ingress.kubernetes.io/send-timeout: "36000" + nginx.ingress.kubernetes.io/rewrite-target: "/$2" +spec: + rules: + - host: localhost + http: + paths: + - path: /()(.*) + pathType: Prefix + backend: + service: + name: seahub + port: + number: 8000 + - path: /seafhttp(/|$)(.*) + pathType: Prefix + backend: + service: + name: seafile-server + port: + number: 8082 + - path: /seafdav(/|$)(.*) + pathType: Prefix + backend: + service: + name: seafile-server + port: + number: 8080 + - path: /notification/ping(/|$)(.*) + pathType: Prefix + backend: + service: + name: seafile-server + port: + number: 8083 + - path: /notification(/|$)(.*) + pathType: Prefix + backend: + service: + name: seafile-server + port: + number: 8083 + - path: /media + pathType: Prefix + backend: + service: + name: seahub-media + port: + number: 80 \ No newline at end of file