apiVersion: apps/v1
kind: Deployment
metadata:
  name: todoapp
  labels:
    app: todoapp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: todoapp
  template:
    metadata:
      labels:
        app: todoapp
    spec:
      containers:
        - name: todoapp
          image: hashidemoregistry.azurecr.io/todoapp:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 80
              protocol: TCP
          env:
            - name: ASPNETCORE_URLS
              value: http://+:80
            - name: GREETING
              valueFrom:
                configMapKeyRef:
                  name: app-config
                  key: GREETING
          envFrom:
          - secretRef:
              name: db-secret
            
          resources:
            limits:
              memory: "512Mi"
              cpu: "500m"
