apiVersion: v1
kind: ReplicationController
metadata:
  name: solr-controller
  namespace: default
  labels:
    app: solr-controller
spec:
  replicas: 2
  selector:
    app: solr-pod
  template:
    metadata:
      labels:
        app: solr-pod
    spec:
      containers:
      - name: solr-container
        image: mosuka/docker-solr:release-5.5
        ports:
        - name: solr
          containerPort: 8983
          protocol: TCP
        - name: stop
          containerPort: 7983
          protocol: TCP
        - name: rmi
          containerPort: 18983
          protocol: TCP
        env:
        - name: SOLR_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: ZK_HOST
          value: zookeeper-service:2181/solr
        - name: COLLECTION_NAME
          value: collection1
        - name: NUM_SHARDS
          value: "2"
        - name: COLLECTION_CONFIG_NAME
          value: data_driven_schema_configs
