apiVersion: apps/v1
kind: Deployment
metadata:
  name: search
spec:
  replicas: 2
  selector:
    matchLabels:
      app: search
  minReadySeconds: 15
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  template:
    metadata:
      labels:
        app: search
    spec:
      containers:
        - name: search
          imagePullPolicy: Always
          image: asia.gcr.io/kavinvin-211411/search-service
          env:
            - name: ELASTIC_URI
              value: "http://elasticsearch-master"
            - name: AUTH_PUBLIC_KEY
              value: >-
                MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmzb9FAZrG3A2fW1q40RL
                TaiJipCoxPiW3gWSwi0nyQbN5hnKJo4QfESOyL9eTWpu1lXCuRFaiiztOs4UJ6Hu
                NmOmFVZEb9p9GmBgh/d1ORZTTS7EsgB911ai9uzThN9Je+Iz0BflqZitWq43DwmF
                G34wTx9ltjBi/CCBWNSY+4I0M2wdqxIhukIDgFMITiTgXeNwDgZlYKDc/B0KxEV1
                rS6q3XMcz7nrpyFj36E0/M7ciMglOZ0g4dhFGoW4IC+S1H5ullemq+jDxjMa3Dn3
                btCm8zuNZdtLYhhso/D8CKmwvMKcyGRLcW6mpTG2wlnc9fQw9aMHSgwRvt/TxmSe
                OQIDAQAB
          ports:
            - containerPort: 3000
