apiVersion: apps/v1
kind: Deployment
metadata:
  name: ifs-database
  annotations:
    pullSecrets: pullSecrets
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ifs-database
  template:
    metadata:
      labels:
        app: ifs-database
    spec:
      containers:
        - env:
            - name: MYSQL_ROOT_PASSWORD
              value: password
          image: mysql:5.7.34
          name: mysql
          args: []
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 3306
          volumeMounts:
            - name: mysql-tmp-storage
              mountPath: /var/lib/mysql
            - name: mysql-initdb
              mountPath: /docker-entrypoint-initdb.d
            - name: mysql-initdb
              mountPath: /etc/mysql/my.cnf
              subPath: my.cnf
          resources:
            requests:
              memory: 600M
            limits:
              memory: 1500M
      volumes:
        - name: mysql-tmp-storage
          emptyDir: {}
        - name: mysql-initdb
          configMap:
            name: mysql-initdb-config