apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ppx-ui
    component: ppx-ui-dev
    tier: frontend
  name: ppx-ui-dev
  namespace: teamwork
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  selector:
    matchLabels:
      app: ppx-ui
      component: ppx-ui-dev
      tier: frontend
  template:
    metadata:
      labels:
        app: ppx-ui
        component: ppx-ui-dev
        tier: frontend
    spec:
      containers:
        - image: localhost/ppx-ui:SNAPSHOT-$BUILD_NUMBER
          imagePullPolicy: IfNotPresent
          name: ppx-ui
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            timeoutSeconds: 10
            initialDelaySeconds: 20
            failureThreshold: 30
            periodSeconds: 5
          ports:
            - name: http-1
              containerPort: 8080
              protocol: TCP
            - name: http-2
              containerPort: 8002
              protocol: TCP
          resources:
            limits:
              cpu: "2"
              memory: 1000Mi
            requests:
              cpu: 100m
              memory: 200Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
