apiVersion: v1
kind: ReplicationController
metadata:
  name: deis-nsqd
  namespace: deis
  labels:
    heritage: deis
spec:
  replicas: 1
  selector:
    app: deis-nsqd
  template:
    metadata:
      labels:
        app: deis-nsqd
    spec:
      serviceAccount: deis-nsqd
      containers:
        - name: deis-nsqd
          image: quay.io/deisci/nsq:canary
          imagePullPolicy: Always
          command:
          - /opt/nsq/bin/start-nsqd
          ports:
          - containerPort: 4151
            name: http
            protocol: TCP
          - containerPort: 4150
            name: transport
            protocol: TCP
          livenessProbe:
            httpGet:
              path: /ping
              port: 4151
            initialDelaySeconds: 5
            timeoutSeconds: 1
          readinessProbe:
            httpGet:
              path: /ping
              port: 4151
            initialDelaySeconds: 5
            timeoutSeconds: 1
          env:
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
