Files
Julius von KohoutandGitHub 8575c167f0 mysql fixes (#2597)
* mysql fixes

see also https://github.com/kubeflow/manifests/pull/3307 and the alignment with databases from other components of kubeflow

Signed-off-by: Julius von Kohout <[email protected]>

* Update mysql.yaml

Signed-off-by: Julius von Kohout <[email protected]>

* Update mysql.yaml

Signed-off-by: Julius von Kohout <[email protected]>

* Update mysql.yaml

Signed-off-by: Julius von Kohout <[email protected]>

---------

Signed-off-by: Julius von Kohout <[email protected]>
2025-12-16 01:19:05 +00:00

79 lines
2.1 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: katib-mysql
namespace: kubeflow
labels:
katib.kubeflow.org/component: mysql
spec:
replicas: 1
selector:
matchLabels:
katib.kubeflow.org/component: mysql
strategy:
type: Recreate
template:
metadata:
labels:
katib.kubeflow.org/component: mysql
sidecar.istio.io/inject: "false"
spec:
securityContext:
fsGroup: 999
fsGroupChangePolicy: OnRootMismatch
containers:
- name: katib-mysql
image: mysql:8.0
args:
- --datadir
- /var/lib/mysql/datadir
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: katib-mysql-secrets
key: MYSQL_ROOT_PASSWORD
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "true"
- name: MYSQL_DATABASE
value: "katib"
ports:
- name: dbapi
containerPort: 3306
readinessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "mysql -h 127.0.0.1 -D ${MYSQL_DATABASE} -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT 1'"
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 10
livenessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "mysql -h 127.0.0.1 -D ${MYSQL_DATABASE} -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT 1'"
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 10
volumeMounts:
- name: katib-mysql
mountPath: /var/lib/mysql
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
capabilities:
drop:
- ALL
volumes:
- name: katib-mysql
persistentVolumeClaim:
claimName: katib-mysql