apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: recommendation
    version: v2
  name: recommendation-v2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: recommendation
      version: v2
  template:
    metadata:
      labels:
        app: recommendation
        version: v2
      annotations:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - env:
        - name: JAVA_OPTIONS
          value: -Xms15m -Xmx15m -Xmn15m -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n
        image: quay.io/rhdevelopers/istio-tutorial-recommendation:v2
        imagePullPolicy: IfNotPresent
        # livenessProbe:
        #   exec:
        #     command:
        #     - curl
        #     - localhost:8080/health          
        #   initialDelaySeconds: 3
        #   periodSeconds: 5
        #   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          
        #   initialDelaySeconds: 3
        #   periodSeconds: 5
        #   timeoutSeconds: 5
        securityContext:
          privileged: false
