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
              # valueFrom:
              #   configMapKeyRef:
              #     key: RDS_DB_NAME
              #     name: todo-web-app-config
            - name: RDS_HOSTNAME
              value: mysql
            - name: RDS_PASSWORD
              value: dummytodos
              # valueFrom:
              #   secretMapKeyRef:
              #     key: RDS_PASSWORD
              #     name: todo-web-app-secrets
            - 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
      restartPolicy: Always
