---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sb2-starter
  labels:
    app: sb2-starter
    type: test
spec:
  selector:
    matchLabels:
      app: sb2-starter
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: sb2-starter
    spec:
      containers:
      - name: sb2-starter
        image: nodevops/sb2-starter
        imagePullPolicy: Always
        ports:
          - name: main
            containerPort: 8080
        resources:
          limits:
            cpu: 300m
            memory: 512Mi
        livenessProbe:
          httpGet:
            path: /actuator/info
            port: main
          initialDelaySeconds: 40
        readinessProbe:
          httpGet:
            path: /actuator/health
            port: main
          initialDelaySeconds: 40
      terminationGracePeriodSeconds: 5
      imagePullSecrets:
        - name: nexus
