apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    project: mesh-arena
    app: ball
    version: v2
  name: ball-v2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ball
      version: v2
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/scheme: "http"
      labels:
        project: mesh-arena
        app: ball
        version: v2
    spec:
      containers:
      - image: jotak/demo-mesh-arena-ball:1.1.7
        imagePullPolicy: IfNotPresent
        name: ball
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        env:
        - name: METRICS_ENABLED
          value: "0"
        - name: TRACING_ENABLED
          value: "0"
        - name: AB_OFF
          value: "1"
        - name: JAVA_OPTIONS
          value: "-Dvertx.disableDnsResolver=true"
        - name: MESHARENA_UI_PORT
          value: "8080"
        - name: MESHARENA_UI_HOST
          value: ui
        - name: MESHARENA_BALL_PORT
          value: "8080"
        - name: MESHARENA_STADIUM_PORT
          value: "8080"
        - name: MESHARENA_STADIUM_HOST
          value: stadium
        - name: PCT_ERRORS
          value: "20"
        - name: RESISTANCE
          value: "120"
        - name: JAEGER_SERVICE_NAME
          value: ball
        - name: JAEGER_SAMPLER_TYPE
          value: const
        - name: JAEGER_SAMPLER_PARAM
          value: "1"
        - name: JAEGER_PROPAGATION
          value: b3
        - name: JAEGER_ENDPOINT
          value: http://jaeger-collector.istio-system.svc:14268/api/traces
        securityContext:
          privileged: false
        readinessProbe:
          exec:
            command:
            - curl
            - localhost:8080/health
          initialDelaySeconds: 10
          periodSeconds: 5
          timeoutSeconds: 1
        livenessProbe:
          exec:
            command:
            - curl
            - localhost:8080/health
          initialDelaySeconds: 10
          periodSeconds: 5
          timeoutSeconds: 1
