apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: awhere
  name: awhere
  namespace: awhere
spec:
  replicas: 2
  selector:
    matchLabels:
      app: awhere
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: awhere
    spec:
      containers:
        - env:
            - name: ConnectionStrings__Awhere
              valueFrom:
                secretKeyRef:
                  key: connectionString
                  name: awhere
          image: chaos.azurecr.io/awhere:0.1
          imagePullPolicy: Always
          name: awhere
          ports:
            - containerPort: 5000
              name: web
              protocol: TCP
          resources:
            limits:
              cpu: 500m
              memory: 300m
            requests:
              cpu: 50m
              memory: 100m
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      restartPolicy: Always
