apiVersion: apps/v1
kind: Deployment
metadata:
  name: books-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: books-app
  template:
    metadata:
      labels:
        app: books-app
    spec:
      containers:
      - name: books-container
        image: faalsh/books:"{{BUILD_ID}}"
        imagePullPolicy: Always
        ports:
        - containerPort: 80
  strategy: 
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0