apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: newsproducer-rs
spec:
  replicas: 3
  selector:
    matchLabels:
      app: newsproducer
  template:
    metadata:
      name: newsproducer
      labels:
        app: newsproducer
        part-of: backend
        env: develop
    spec:
      containers:
      - name: newsproducer
        image: erhancetin/k8s-news-tracker-job
        imagePullPolicy: Always
        env:
          - name: ACTIVEMQ_ADMIN_LOGIN
            value: "admin"
          - name: NEWSAPI-AUTHORIZATION
            value: "db87162d00af4d1bb4c8031ad1cf22f5"
          - name: ACTIVEMQ_HOST
            value: "activemq"
          - name: ACTIVEMQ_PORT
            value: "61613"
          - name: ACTIVEMQ_QUEUE_NAME
            value: "news-queue"
          - name: ACTIVEMQ_USER_LOGIN
            value: "admin"
          - name: ACTIVEMQ_USER_PASSWORD
            value: "admin"
          - name: ACTIVEMQ_ADMIN_PORT
            value: "8161"
          - name: WAIT_HOSTS
            value:  "activemq:8161"
          - name: WAIT_HOSTS_TIMEOUT
            value: "300"
          - name: WAIT_SLEEP_INTERVAL
            value: "5"
          - name: WAIT_HOST_CONNECT_TIMEOUT
            value: "5"