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-application-config
        - name: RDS_HOSTNAME
#         value: mysql
          valueFrom:
           configMapKeyRef:
             key: RDS_HOSTNAME
             name: todo-web-application-config
        - name: RDS_PASSWORD
#         value: admin
          valueFrom:
           secretKeyRef:
             key: RDS_PASSWORD
             name: todo-web-application-secrets
        - name: RDS_PORT
#        value: "3306"
          valueFrom:
           configMapKeyRef:
             key: RDS_PORT
             name: todo-web-application-config
        - name: RDS_USERNAME
#          value: dinesh_root
          valueFrom:
           configMapKeyRef:
             key: RDS_USERNAME
             name: todo-web-application-config
        image: ddineesh/todo-web-application-mysql:0.0.1-SNAPSHOT
        imagePullPolicy: ""
        name: todo-web-application
        ports:
        - containerPort: 8080
      restartPolicy: Always
