apiVersion: apps/v1
kind: Deployment
metadata:
  name: guestbook-ui-v2
  labels:
    app: guestbook-ui
    version: "2.0"
    visualize: "true"
spec:
  replicas: 2
  selector:
    matchLabels:
      app: guestbook-ui
      version: "2.0"
      serving: "true"
  template:
    metadata:
      labels:
        app: guestbook-ui
        version: "2.0"
        serving: "true"
        visualize: "true"
      annotations:
        visualizer/uses: helloworld-service,guestbook-service,redis
    spec:
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      containers:
      - name: guestbook-ui
        image: bygui86/guestbook-ui:2.0
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /actuator/health
            port: 8080
          initialDelaySeconds: 60
          periodSeconds: 10
          timeoutSeconds: 3
          successThreshold: 1
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /
            port: 8080
          initialDelaySeconds: 30
          periodSeconds: 10
          timeoutSeconds: 3
          successThreshold: 1
          failureThreshold: 3
        ports:
        - name: http
          containerPort: 8080
        resources:
          requests:
            cpu: 400m
            memory: 500Mi
          limits:
            cpu: 1500m
            memory: 1000Mi

