mysql helm chart issue fixed

This commit is contained in:
Vaibhav Pathak 2026-01-29 15:45:07 +05:30
parent e9b48d31f3
commit 8981f2de52
4 changed files with 19 additions and 7 deletions

View File

@ -15,8 +15,7 @@ metadata:
helm.cnoe.io/chart-path: "helm/schedulerservice" helm.cnoe.io/chart-path: "helm/schedulerservice"
helm.cnoe.io/values-file: "values-local.yaml" helm.cnoe.io/values-file: "values-local.yaml"
helm.cnoe.io/available-values-files: '["values.yaml", "values-local.yaml"]' helm.cnoe.io/available-values-files: '["values.yaml", "values-local.yaml"]'
helm.cnoe.io/dependencies: '{"scheduling-mysql": {"name": "Scheduling MySQL Database", "required": true, "default": false, "shared": true, "sharedKey": "os-scheduling-db", "externalParams": [{"param": "externalDatabase.host", "label": "Database Host", "placeholder": "scheduling-mysql"}, {"param": "externalDatabase.port", "label": "Database Port", "placeholder": "3306"}, {"param": "externalDatabase.database", "label": "Database Name", "placeholder": "os_scheduling_db"}, {"param": "externalDatabase.username", "label": "Username", "placeholder": "scheduler_user"}, {"param": "externalDatabase.password", "label": "Password", "placeholder": "", "secret": true}]}}' helm.cnoe.io/dependencies: '{}'
helm.cnoe.io/dependency-urls: '{}'
tags: tags:
- java - java
- kubernetes - kubernetes

View File

@ -16,5 +16,3 @@ maintainers:
home: https://github.com/onlinesales-ai/schedulerService home: https://github.com/onlinesales-ai/schedulerService
sources: sources:
- https://github.com/onlinesales-ai/schedulerService - https://github.com/onlinesales-ai/schedulerService
# MySQL is deployed as a shared dependency, not as a subchart
# Configure externalDatabase values to connect to the shared MySQL instance

View File

@ -30,6 +30,21 @@ spec:
serviceAccountName: {{ include "schedulerservice.serviceAccountName" . }} serviceAccountName: {{ include "schedulerservice.serviceAccountName" . }}
securityContext: securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.externalDatabase.host }}
initContainers:
- name: wait-for-mysql
image: busybox:1.36
command:
- sh
- -c
- |
echo "Waiting for MySQL at {{ .Values.externalDatabase.host }}:{{ .Values.externalDatabase.port }}..."
until nc -z {{ .Values.externalDatabase.host }} {{ .Values.externalDatabase.port }}; do
echo "MySQL not ready, waiting..."
sleep 5
done
echo "MySQL is available!"
{{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:

View File

@ -102,10 +102,10 @@ env:
value: "DEBUG" value: "DEBUG"
# External Database configuration for local development # External Database configuration for local development
# MySQL is deployed as a shared dependency (scheduling-mysql) # MySQL is deployed as a separate shared-mysql component
# The shared MySQL service is deployed separately and shared with osSchedulesArgoSyncer # Service name uses release name: shared-mysql
externalDatabase: externalDatabase:
host: "scheduling-mysql" host: "shared-mysql"
port: "3306" port: "3306"
database: "os_scheduling_db" database: "os_scheduling_db"
username: "scheduler_user" username: "scheduler_user"