feat: add migration script and update Helm values for various services with readiness and liveness probes

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-03-22 01:03:59 +08:00
parent bf34f4cd90
commit 6e7417ae00
11 changed files with 244 additions and 22 deletions

View File

@ -1,6 +1,6 @@
global:
defaultStorageClass: "freeleaps-node-local"
storageClass: "freeleaps-node-local"
defaultStorageClass: "azure-disk-std-lrs"
storageClass: "azure-disk-std-lrs"
security:
allowInsecureImages: false
image:
@ -224,7 +224,7 @@ persistence:
accessModes:
- ReadWriteOnce
mountPath: /opt/bitnami/rabbitmq/.rabbitmq/mnesia
size: 8Gi
size: 5Gi
service:
type: ClusterIP
portEnabled: true
@ -328,7 +328,7 @@ metrics:
ingress:
enabled: true
path: /
pathType: ImplementationSpecific
pathType: Prefix
hostname: alpha.rabbitmq.freeleaps.mathmast.com
tls: true
existingSecret: "alpha.rabbitmq.freeleaps.mathmast.com-cert"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
authentication:
replicas: 1
image:
@ -19,14 +21,37 @@ authentication:
cpu: '50m'
memory: 64Mi
limits:
cpu: '100m'
cpu: '200m'
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8004
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8004
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: authentication-service
type: ClusterIP
port: 8004
targetPort: 8004
serviceMonitor:
enabled: false
ingresses:
- name: authentication-ingress
host: alpha.authentication.freeleaps.mathmast.com
@ -57,3 +82,5 @@ authentication:
mongodbName: freeleaps2
mongodbPort: 27017
mongodbUri: mongodb://freeleaps-alpha-mongo-mongodb.freeleaps-alpha.svc.freeleaps.cluster:27017/
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
centralStorage:
replicas: 1
image:
@ -19,14 +21,37 @@ centralStorage:
cpu: '50m'
memory: 64Mi
limits:
cpu: '100m'
cpu: '200m'
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8005
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8005
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: central-storage-service
type: ClusterIP
port: 8005
targetPort: 8005
serviceMonitor:
enabled: false
ingresses:
- name: central-storage-ingress
host: alpha.central-storage.freeleaps.mathmast.com
@ -55,3 +80,5 @@ centralStorage:
mongodbUri: mongodb://freeleaps-alpha-mongo-mongodb.freeleaps-alpha.svc.freeleaps.cluster:27017/
azureStorageDocumentApiKey: xbiFtFeQ6v5dozgVM99fZ9huUomL7QcLu6s0y8zYHtIXZ8XdneKDMcg4liQr/9oNlVoRFcZhWjLY+ASt9cjICQ==
azureStorageDocumentApiEndpoint: https://freeleaps1document.blob.core.windows.net/
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashbaord:
enabled: false
chat:
replicas: 1
image:
@ -21,12 +23,35 @@ chat:
limits:
cpu: '200m'
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8012
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8012
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: chat-service
type: ClusterIP
port: 8012
targetPort: 8012
serviceMonitor:
enabled: false
ingresses:
- name: chat-ingress
host: alpha.chat.freeleaps.mathmast.com
@ -64,13 +89,15 @@ chat:
rabbitmqPort: 5672
rabbitmqUsername: user
rabbitmqPassword: 9dPrkjD8KENevfjT
freeleapsDevsvcEndpoint: https://alpha.devsvc.freeleaps.mathmast.com
freeleapsContentEndpoint: https://alpha.content.freeleaps.mathmast.com
freeleapsCentralStorageEndpoint: https://alpha.central-storage.freeleaps.mathmast.com
freeleapsChatEndpoint: https://alpha.chat.freeleaps.mathmast.com
freeleapsPaymentEndpoint: https://alpha.payment.freeleaps.mathmast.com
freeleapsDevsvcEndpoint: http://devsvc-service.freeleaps-alpha.svc.freeleaps.cluster:8007/api/devsvc/
freeleapsContentEndpoint: http://content-service.freeleaps-alpha.svc.freeleaps.cluster:8013/api/content/
freeleapsCentralStorageEndpoint: http://central-storage-service.freeleaps-alpha.svc.freeleaps.cluster:8005/api/central_storage/
freeleapsChatEndpoint: http://chat-service.freeleaps-alpha.svc.freeleaps.cluster:8012/api/chat/
freeleapsPaymentEndpoint: http://payment-service.freeleaps-alpha.svc.freeleaps.cluster:8006/api/payment/
freeleapsAilabEndpoint: ''
freeleapsEnv: alpha
certPath: ''
redisUrl: redis://:4sTqfZvUwR@freeleaps-alpha-redis-headless.freeleaps-alpha.svc.freeleaps.cluster:6379/0
redisIsCluster: "false"
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
content:
replicas: 1
image:
@ -19,14 +21,37 @@ content:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
cpu: 200m
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8013
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8013
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: content-service
type: ClusterIP
port: 8013
targetPort: 8013
serviceMonitor:
enabled: false
ingresses:
- name: content-ingress
host: alpha.content.freeleaps.mathmast.com
@ -55,3 +80,5 @@ content:
mongodbUri: mongodb://freeleaps-alpha-mongo-mongodb.freeleaps-alpha.svc.freeleaps.cluster:27017/
freeleapsWwwAsAzureClientSecret: jTu8Q~WceiK-5dfZB44Ww-K4fVGi3_5tHNWYYbdX
centralStorageWebapiUrlBase: http://central-storage-service.freeleaps-alpha.svc.freeleaps.cluster:8005/api/central_storage
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
devsvc:
replicas: 1
image:
@ -19,14 +21,37 @@ devsvc:
cpu: '50m'
memory: 64Mi
limits:
cpu: '100m'
cpu: '200m'
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8007
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8007
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: devsvc-service
type: ClusterIP
port: 8007
targetPort: 8007
serviceMonitor:
enabled: false
ingresses:
- name: devsvc-ingress
host: alpha.devsvc.freeleaps.mathmast.com
@ -52,9 +77,11 @@ devsvc:
serviceApiAccessPort: 8007
mongodbName: freeleaps2
mongodbUri: mongodb://freeleaps-alpha-mongo-mongodb.freeleaps-alpha.svc.freeleaps.cluster:27017/
giteaToken: 96eec0225f0b505a6ef04c14c4d03aea26f6364a
giteaToken: 65bc8b16705414abbdaf8e6262ad698015ce49d9
giteaUrl: http://freeleaps-alpha-gitea-http.freeleaps-alpha.svc.freeleaps.cluster:3000
giteaDepotOrganization: products
codeDepotHttpPort: 443
codeDepotSshPort: 22
codeDepotDomainName: 'https://alpha.freeleaps.mathmast.com'
codeDepotDomainName: alpha.gitea.freeleaps.mathmast.com
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
freeleaps:
replicas: 1
image:
@ -27,6 +29,8 @@ freeleaps:
type: ClusterIP
port: 8001
targetPort: 8001
serviceMonitor:
enabled: false
ingresses:
- name: freeleaps-ingress
host: alpha.api.freeleaps.mathmast.com
@ -75,3 +79,5 @@ freeleaps:
certPath: ''
redisUrl: "redis://r6Y@QTb*7BQN@hDGsN@freeleaps-prod-redis-redis-cluster-headless.freeleaps-prod.svc.freeleaps.cluster:6379/0"
redisIsCluster: "true"
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -45,6 +45,20 @@ frontend:
name: mathmast-dot-com
kind: ClusterIssuer
name: alpha.freeleaps.mathmast.com-cert
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: '3600'
nginx.ingress.kubernetes.io/proxy-send-timeout: '3600'
nginx.ingress.kubernetes.io/server-snippets: |-
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
configs:
tz: UTC
frontendPort: 8080

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
notification:
replicas: 1
image:
@ -21,12 +23,35 @@ notification:
limits:
cpu: 100m
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8003
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8003
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: notification-service
type: ClusterIP
port: 8003
targetPort: 8003
serviceMonitor:
enabled: false
ingresses:
- name: notification-ingress
host: alpha.notification.freeleaps.mathmast.com
@ -62,3 +87,5 @@ notification:
sendgridApiKey: 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
twilioAccountSid: ACf8c9283a6acda060258eadb29be58bc8
twilioAuthToken: ef160748cc22c8b7195b49df4b8eca7e
metricsEnabled: "false"
probesEnabled: "true"

View File

@ -2,6 +2,8 @@ global:
registry: docker.io
repository: freeleaps
nodeSelector: {}
dashboard:
enabled: false
payment:
replicas: 1
image:
@ -21,12 +23,35 @@ payment:
limits:
cpu: 100m
memory: 128Mi
probes: {}
probes:
readiness:
type: httpGet
config:
path: /api/_/readyz
port: 8006
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
liveness:
type: httpGet
config:
path: /api/_/livez
port: 8006
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
terminationGracePeriodSeconds: 30
services:
- name: payment-service
type: ClusterIP
port: 8006
targetPort: 8006
serviceMonitor:
enabled: false
ingresses:
- name: payment-ingress
host: alpha.payment.freeleaps.mathmast.com
@ -54,3 +79,6 @@ payment:
mongodbPort: 27017
mongodbUri: mongodb://freeleaps-alpha-mongo-mongodb.freeleaps-alpha.svc.freeleaps.cluster:27017/
stripeApiKey: sk_test_51Ogsw5B0IyqaSJBrwczlr820jnmvA1qQQGoLZ2XxOsIzikpmXo4pRLjw4XVMTEBR8DdVTYySiAv1XX53Zv5xqynF00GfMqttFd
siteUrlRoot: https://alpha.freeleaps.mathmast.com
metricsEnabled: "false"
probesEnabled: "true"

12
migrate.dsl Normal file
View File

@ -0,0 +1,12 @@
LOAD DATABASE
FROM '/tmp/gitea-alpha.db'
INTO postgresql://gitea:r8sA8CPHD9!bt6d@localhost:5432/gitea
WITH data only,
include no drop,
create no tables,
create no indexes,
no truncate,
batch rows = 1
excluding table names like 'app_state','oauth2_application','oauth2_authorization_code','oauth2_grant','system_setting','version';