apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: instance-manager
  name: instance-manager
  namespace: instance-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: instance-manager
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: instance-manager
    spec:
      containers:
      - image: keikoproj/instance-manager:latest
        imagePullPolicy: Always
        name: instance-manager
        resources:
          limits:
            cpu: 100m
            memory: 300Mi
          requests:
            cpu: 100m
            memory: 300Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - name: ssl-certs
          mountPath: /etc/ssl/certs/ca-certificates.crt
          readOnly: true
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      serviceAccount: instance-manager
      serviceAccountName: instance-manager
      volumes:
        - name: ssl-certs
          hostPath:
            path: /etc/ssl/certs/ca-bundle.crt