apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 1
  selector:
    matchLabels:
      name: api
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 50%
  template:
    metadata:
      labels:
        name: api
    spec:
      containers:
        - name: api
          image: dmitrymomot/schoolapp-rpc
          imagePullPolicy: IfNotPresent
          envFrom:
            - configMapRef:
                name: api-config
          ports:
            - containerPort: 8080
              name: api-port
