kind: Deployment
apiVersion: apps/v1
metadata:
  name: device-simulator
  annotations:
    image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"device-simulator:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"app\")].image"}]'
  labels:
    app.kubernetes.io/name: device-simulator
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: device-simulator
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: device-simulator
    spec:
      containers:
        - name: app
          image: device-simulator
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          livenessProbe:
            httpGet:
              port: http
              scheme: HTTP
              path: /
          readinessProbe:
            httpGet:
              port: http
              scheme: HTTP
              path: /
