apiVersion: apps/v1
kind: Deployment
metadata:
  name: edusoho-db
  namespace: edusoho
spec:
  selector:
    matchLabels:
      app: edusoho-db
  template:
    metadata:
      labels:
        app: edusoho-db
    spec:
      containers:
        - name: edusoho-db
          image: mysql/mysql-server:8.0.23-1.1.19
          args:
            - --default-authentication-plugin=mysql_native_password
          env:
            - name: MYSQL_ROOT_PASSWORD
              value: edusoho
            - name: MYSQL_DATABASE
              value: edusoho
            - name: MYSQL_USER
              value: edusoho
            - name: MYSQL_PASSWORD
              value: edusoho
          resources:
            limits:
              memory: "512Mi"
              cpu: "500m"
          ports:
            - containerPort: 3306
              name: db-port
          volumeMounts:
            - mountPath: /var/lib/mysql
              name: db-pvc
      volumes:
        - name: db-pvc
          emptyDir: {}
