apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: gateway
  name: gateway
spec:
  replicas: 1
  selector:
    name: gateway
  template:
    metadata:
      labels:
         name: gateway
    spec:
      imagePullSecrets:
        - name: rioxregistrykey
      containers:
      - name: gateway
        image: riox/nginx:1.1.1
        resources:
          requests:
            memory: "128Mi"
            cpu: "250m"
          limits:
            memory: "512Mi"
            cpu: "500m"
        env:
          - name: OUR_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: "REDIS_HOST"
            value: "'redis.$(OUR_NAMESPACE).svc.cluster.local'"
          - name: "REDIS_PORT"
            value: "'6379'"
          - name: "REDIS_SENTINEL_HOST"
            value: "'redis-sentinel.$(OUR_NAMESPACE).svc.cluster.local'"
          - name: "REDIS_SENTINEL_PORT"
            value: "'26379'"
          - name: "MAX_PATH_LENGTH"
            value: "3"
        ports:
        - name: api
          containerPort: 8082
        - name: http
          containerPort: 8080
        - name: https
          containerPort: 8443
