apiVersion: v1
kind: ReplicationController
metadata:
  name: stolon-sentinel-rc
spec:
  replicas: 1
  selector:
    name: stolon-sentinel
  template:
    metadata:
      labels:
        name: stolon-sentinel
        stolon-cluster: "kube-stolon"
        stolon-sentinel: "true"
    spec:
      containers:
      - name: stolon-sentinel
        image: sorintlab/stolon:master
        env:
          - name: SENTINEL
            value: "true"
          # Uncomment this if kubernetes discovery doesn't work on your kubernetes cluster (for example no api service certificates configured or https api serving disabled)
          #- name: STSENTINEL_DISCOVERY_TYPE
          #  value: "store"
          - name: STSENTINEL_CLUSTER_NAME
            value: "kube-stolon"
          - name: STSENTINEL_STORE_BACKEND
            value: "etcd" # Or consul
          - name: STSENTINEL_STORE_ENDPOINTS
            value: "10.245.1.1:2379"
          - name: STSENTINEL_KEEPER_KUBE_LABEL_SELECTOR
            value: "stolon-cluster=kube-stolon,stolon-keeper=true"
            # Enable debugging
          - name: STSENTINEL_DEBUG
            value: "true"
          - name: STSENTINEL_KUBERNETES_NAMESPACE
            value: "default"
        ports:
          - containerPort: 6431
