apiVersion : apps/v1
kind: Deployment
metadata:
  name: service-data-import-function
  namespace: default
  labels:
    app: service-data-import-function
spec:
  selector:
    matchLabels:
      app: service-data-import-function
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: service-data-import-function
    spec:
      imagePullSecrets:
        - name: imagepullsecret
      containers:
        - name: service-data-import-function
          image: __dockerregistryname__.azurecr.io/servicedataimportfunction:__tag__
          env:
          - name: MONGO_HOST
            value: __mongohost__
          - name: MONGO_PORT
            value: "__mongoport__"
          - name: MONGO_DB
            value: __servicedbmongodb__
          - name: MONGO_USERNAME
            value: __mongousername__
          - name: MONGO_PASSWORD
            value: __mongopassword__
          - name: AzureWebJobsStorage
            value: DefaultEndpointsProtocol=https;AccountName=__azurestorageaccountname__;AccountKey=__azurestorageaccountkey__;EndpointSuffix=core.windows.net
          readinessProbe:
            httpGet:
              path: /
              port: 80
              scheme: HTTP
            timeoutSeconds: 240
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          startupProbe:
            httpGet:
              path: /
              port: 80
              scheme: HTTP
            timeoutSeconds: 240
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      serviceAccountName: default
      serviceAccount: default