apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: todo-web-application
  name: todo-web-application
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: todo-web-application
  template:
    metadata:
      labels:
        io.kompose.service: todo-web-application
    spec:
      containers:
        - env:
          - name: RDS_DB_NAME
            value: todos
          - name: RDS_HOSTNAME
            value: mysql
          - name: RDS_PASSWORD
            value: dummytodos
          - name: RDS_PORT
            value: "3306"
          - name: RDS_USERNAME
            value: todos-user
          image: in28min/todo-web-application-mysql:0.0.1-SNAPSHOT
          name: todo-web-application
          ports:
            - containerPort: 8080
          resources:
            limits:
              memory: 512Mi
              cpu: "1"
            requests:
              memory: 256Mi
              cpu: "0.2"
      restartPolicy: Always
