apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: customer
    version: v1
    app.kubernetes.io/part-of: Customer
  name: customer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: customer
      version: v1
  template:
    metadata:
      labels:
        app: customer
        version: v1
      annotations:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - name: customer
        image: quay.io/mhildenb/sm-demo-customer:v2
        # image: quay.io/rhdevelopers/istio-tutorial-customer:v1
        imagePullPolicy: Always
        env:
        - name: JAVA_OPTIONS
          value: -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n
        - name: DESTINATION_SERVICE
          value: PreferenceService
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 8778
          name: jolokia
          protocol: TCP
        - containerPort: 9779
          name: prometheus
          protocol: TCP
        livenessProbe:
          exec:
            command:
            - curl
            - localhost:8080/health          
          initialDelaySeconds: 3
          periodSeconds: 5
          timeoutSeconds: 5
        readinessProbe:
          exec:
            command:
            - curl
            - localhost:8080/health          
          initialDelaySeconds: 3
          periodSeconds: 5
          timeoutSeconds: 5
        securityContext:
          privileged: false
