apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: recommendation
    version: v3
  name: recommendation-v3
spec:
  replicas: 1
  selector:
    matchLabels:
      app: recommendation
      version: v3
  template:
    metadata:
      labels:
        app: recommendation
        version: v3
      annotations:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - env:
        - name: JAVA_OPTIONS
          value: -Xms15m -Xmx15m -Xmn15m
        image: quay.io/rhdevelopers/istio-tutorial-recommendation:v3.1
        imagePullPolicy: IfNotPresent
        livenessProbe:
          exec:
            command:
            - curl
            - localhost:8080/health/live
          initialDelaySeconds: 3
          periodSeconds: 1
          timeoutSeconds: 5
        name: recommendation
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 8778
          name: jolokia
          protocol: TCP
        - containerPort: 9779
          name: prometheus
          protocol: TCP
        readinessProbe:
          exec:
            command:
            - curl
            - localhost:8080/health/ready
          initialDelaySeconds: 3
          periodSeconds: 1
          timeoutSeconds: 5
        securityContext:
          privileged: false
