apiVersion: apps/v1
kind: Deployment
metadata:
  name: data-api
  namespace: hackfest
  labels:
    app: data-api
        
spec:
  replicas: 1
  selector:
    matchLabels: 
      app: data-api
  minReadySeconds: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1 
  template:
    metadata:
      labels:
        app: data-api
      namespace: hackfest
    spec:
      containers:
      - name: data-api
        image: canarysacr.azurecr.io/data:latest 
        env:
        - name: MONGODB_USER
          value: cosmohack
        - name: MONGODB_PASSWORD
          value: Dm68WpyinmMeEkYhagOrHmLiwfQM4gWkjf85PbIMzx2fQFOc0SzLdliRI57lhDgcq2NVzZ30CNELPqzJ4b6HNQ==
        - name: APPINSIGHTS_INSTRUMENTATIONKEY
          value: 5dc30b4d-87f0-408c-bb14-4efe41409271
        ports:
        - containerPort: 3009
        imagePullPolicy: Always   

