apiVersion: v1
kind: ReplicationController
metadata:
  namespace: netsil
  name: netsil
spec:
  replicas: 1
  selector:
    app: netsil
    component: netsil
  template:
    metadata:
      name: stream-processor
      labels:
        app: netsil
        component: netsil
        version: stable
    spec:
      containers:
      - name: netsil
        image: netsil/netsil:latest
        command:
        - /root/startup.sh
        ports:
        - containerPort: 80
        - containerPort: 443
        - containerPort: 2000
        - containerPort: 2001
        - containerPort: 2003
        - containerPort: 2003
          protocol: UDP
        volumeMounts:
        - name: alerts
          mountPath: /opt/netsil/alerts/data
        - name: ceph-conf
          mountPath: /etc/ceph
        - name: ceph-data
          mountPath: /var/lib/ceph-data
        - name: druid-index-cache
          mountPath: /var/tmp/druid/indexCache
        - name: druid-realtime-segments
          mountPath: /opt/netsil/druid/realtime-segments
        - name: elasticsearch
          mountPath: /usr/share/elasticsearch/data
        - name: kafka-logs
          mountPath: /opt/netsil/kafka/kafka-log-dir
        - name: licenses
          mountPath: /opt/netsil/lite/license-manager/licenses
        - name: mysql
          mountPath: /var/lib/mysql
        - name: redis
          mountPath: /var/lib/redis
        - name: user-persistence
          mountPath: /opt/netsil/user-persistence/data
        - name: zookeeper
          mountPath: /opt/netsil/zookeeper/data
      volumes:
      - name: alerts
        hostPath:
          path: /opt/netsil/lite/alerts/data
      - name: ceph-conf
        hostPath:
          path: /opt/netsil/lite/ceph/conf
      - name: ceph-data
        hostPath:
          path: /opt/netsil/lite/ceph/data
      - name: druid-index-cache
        hostPath:
          path: /var/tmp/druid/indexCache
      - name: druid-realtime-segments
        hostPath:
          path: /opt/netsil/lite/druid/realtime-segments
      - name: elasticsearch
        hostPath:
          path: /opt/netsil/lite/elasticsearch/data
      - name: licenses
        hostPath:
          path: /opt/netsil/lite/license-manager/licenses
      - name: kafka-logs
        hostPath:
          path: /opt/netsil/lite/kafka/kafka-log-dir
      - name: mysql
        hostPath:
          path: /opt/netsil/lite/mysql/data
      - name: redis
        hostPath:
          path: /opt/netsil/lite/redis
      - name: user-persistence
        hostPath:
          path: /opt/netsil/lite/user-persistence/data
      - name: zookeeper
        hostPath:
          path: /opt/netsil/lite/zookeeper/data
