# mysql-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql
  namespace: dad-group-x
spec:
  selector:
    matchLabels:
      app: mysql
  template:
    metadata:
      labels:
        app: mysql
    spec:
      priorityClassName: high-priority
      containers:
        - name: mysql
          image: mysql:8.0
          env:
            - name: MYSQL_ALLOW_EMPTY_PASSWORD
              value: "yes"
            - name: MYSQL_DATABASE
              value: "project"
          ports:
            - containerPort: 3306
          resources:
            requests:
              memory: "384Mi"
              cpu: "200m"
            limits:
              memory: "1Gi"
              cpu: "500m"

---
apiVersion: v1
kind: Service
metadata:
  name: mysql
  namespace: dad-group-x
spec:
  ports:
    - port: 3306
  selector:
    app: mysql
