kind: ReplicationController
apiVersion: v1
metadata:
  name: eventstore-cluster
spec:
  replicas: 3
  selector:
    name: eventstore-node
  template:
    metadata:
      labels:
        name: eventstore-node
        app: eventstore-cluster
    spec:
      containers:
      - name: eventstore-node
        image: your.private.registry/eventstore
        livenessProbe:
          httpGet:
            path: /
            port: 2114
          initialDelaySeconds: 30
          timeoutSeconds: 1
        ports:
        - containerPort: 2113
        - containerPort: 2114
        - containerPort: 1113
        - containerPort: 1112
        env:
        - name: EVENTSTORE_CLUSTER_SIZE
          value: "3"
        - name: EVENTSTORE_CLUSTER_GOSSIP_PORT
          value: "2113"
        - name: EVENTSTORE_CLUSTER_DNS
          value: "eventstore-service.default.svc.cluster.local"
        - name: EVENTSTORE_INT_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: EVENTSTORE_EXT_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: EVENTSTORE_INT_HTTP_PORT
          value: "2113"
        - name: EVENTSTORE_EXT_HTTP_PORT
          value: "2114"
        - name: EVENTSTORE_EXT_HTTP_PREFIXES
          value: "http://*:2114/"
        - name: EVENTSTORE_INT_HTTP_PREFIXES
          value: "http://*:2113/"
        - name: EVENTSTORE_GOSSIP_ALLOWED_DIFFERENCE_MS
          value: "600000"
        volumeMounts:
        - mountPath: /var/lib/eventstore
          name: data
      volumes:
        - name: data
          emptyDir: {}
