apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: processor
    group: linker
  name: processor
spec:
  replicas: 2
  selector:
    matchLabels:
      app: processor
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: processor
        group: linker
    spec:
      containers:
        - name: processor
          image: eu.gcr.io/linker-246119/processor:2.4.0
          imagePullPolicy: Always
          ports:
            - containerPort: 8088
            - containerPort: 8080
          env:
            - name: JAVA_OPTS
              value: -Xms128m -Xmx1024m
            - name: spring.profiles.active
              value: "sandbox"
            - name: server.port
              value: "8080"
            - name: domainName
              value: "domain-01"
            - name: processorName
              value: "processor"
            - name: kafkaHosts
              value: "infra-kafka:29092"
            - name: natsHosts
              value: "nats://nats:4222"
            - name: spring.redis.host
              value: "redis"
            - name: spring.data.mongodb.host
              value: "mongo"
          readinessProbe:
            httpGet:
              scheme: HTTP
              path: /actuator/health
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 30
            timeoutSeconds: 30
            failureThreshold: 3
            successThreshold: 1
          livenessProbe:
            httpGet:
              scheme: HTTP
              path: /actuator/health
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 30
            timeoutSeconds: 30
            failureThreshold: 5
            successThreshold: 1
      restartPolicy: Always
