update k8s files with restart policy and probes

This commit is contained in:
Gerrit Gogel 2024-02-14 11:37:13 +01:00
parent 723cc36980
commit 75f6ab4ad6
5 changed files with 51 additions and 26 deletions

View file

@ -1,3 +1,6 @@
# This is a compose file with additional fields for the tool kompose.
# Generate Kubernetes manifests with the following command:
# kompose convert --with-kompose-annotation=false -o k8s -f compose/docker-compose-kompose.yml
version: '3.8'
services:
seafile-server:
@ -10,10 +13,6 @@ services:
- TIME_ZONE=Europe/Berlin
- HTTPS=true
- SEAFILE_URL=seafile.mydomain.com # Mandatory on first deployment!
depends_on:
- db
- memcached
- seafile-caddy
networks:
- seafile-net
expose:
@ -24,6 +23,10 @@ services:
labels:
kompose.volume.size: 1Gi
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.tcp_port: 8082
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.timeout: 10s
restart: always
seahub:
image: ggogel/seahub:11.0.4
@ -34,22 +37,17 @@ services:
environment:
- SEAFILE_ADMIN_EMAIL=me@example.com
- SEAFILE_ADMIN_PASSWORD=asecret
depends_on:
- seafile-server
- seafile-caddy
- seahub-media
networks:
- seafile-net
expose:
- 8000
restart: always
seahub-media:
image: ggogel/seahub-media:11.0.4
volumes:
- seahub-avatars:/usr/share/caddy/media/avatars
- seahub-custom:/usr/share/caddy/media/custom
depends_on:
- seafile-caddy
networks:
- seafile-net
expose:
@ -57,6 +55,7 @@ services:
labels:
kompose.volume.size: 100Mi
kompose.service.expose.storage-class-name: default
restart: always
db:
image: mariadb:10.11.7
@ -73,6 +72,11 @@ services:
labels:
kompose.volume.size: 1Gi
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.test: "healthcheck.sh --su-mysql --connect --innodb_initialized"
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.timeout: 10s
kompose.service.healthcheck.readiness.retries: 3
restart: always
memcached:
image: memcached:1.6.23
@ -81,22 +85,7 @@ services:
- seafile-net
expose:
- 11211
seafile-caddy:
image: ggogel/seafile-caddy:2.7.6
networks:
- seafile-net
- default
labels:
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
expose:
- 80
restart: always
networks:
seafile-net:

View file

@ -3,6 +3,10 @@ kind: Deployment
metadata:
annotations:
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.retries: "3"
kompose.service.healthcheck.readiness.test: healthcheck.sh --su-mysql --connect --innodb_initialized
kompose.service.healthcheck.readiness.timeout: 10s
kompose.volume.size: 1Gi
creationTimestamp: null
labels:
@ -19,6 +23,10 @@ spec:
metadata:
annotations:
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.retries: "3"
kompose.service.healthcheck.readiness.test: healthcheck.sh --su-mysql --connect --innodb_initialized
kompose.service.healthcheck.readiness.timeout: 10s
kompose.volume.size: 1Gi
creationTimestamp: null
labels:
@ -38,6 +46,16 @@ spec:
ports:
- containerPort: 3306
protocol: TCP
readinessProbe:
exec:
command:
- healthcheck.sh
- --su-mysql
- --connect
- --innodb_initialized
failureThreshold: 3
periodSeconds: 10
timeoutSeconds: 10
resources: {}
volumeMounts:
- mountPath: /var/lib/mysql

View file

@ -3,6 +3,10 @@ kind: Service
metadata:
annotations:
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.retries: "3"
kompose.service.healthcheck.readiness.test: healthcheck.sh --su-mysql --connect --innodb_initialized
kompose.service.healthcheck.readiness.timeout: 10s
kompose.volume.size: 1Gi
creationTimestamp: null
labels:

View file

@ -3,6 +3,9 @@ kind: Deployment
metadata:
annotations:
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.tcp_port: "8082"
kompose.service.healthcheck.readiness.timeout: 10s
kompose.volume.size: 1Gi
creationTimestamp: null
labels:
@ -19,6 +22,9 @@ spec:
metadata:
annotations:
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.tcp_port: "8082"
kompose.service.healthcheck.readiness.timeout: 10s
kompose.volume.size: 1Gi
creationTimestamp: null
labels:
@ -48,6 +54,11 @@ spec:
protocol: TCP
- containerPort: 8083
protocol: TCP
readinessProbe:
periodSeconds: 10
tcpSocket:
port: 8082
timeoutSeconds: 10
resources: {}
volumeMounts:
- mountPath: /shared

View file

@ -3,6 +3,9 @@ kind: Service
metadata:
annotations:
kompose.service.expose.storage-class-name: default
kompose.service.healthcheck.readiness.interval: 10s
kompose.service.healthcheck.readiness.tcp_port: "8082"
kompose.service.healthcheck.readiness.timeout: 10s
kompose.volume.size: 1Gi
creationTimestamp: null
labels: