apiVersion: v1
kind: ReplicationController
metadata:
  name: webapp-1.0
spec:
  replicas: 5
  selector:
    app: webapp
    version: "1.0"
  template:
    metadata:
      labels:
        app: webapp
        version: "1.0"
    spec:
      containers:
        - name: webapp
          image: master:5000/webapp:1.0
          env:
            - name: POSTGRES_USER
              value: stolon
            - name: POSTGRES_HOST_ENV_NAME
              value: STOLON_PROXY_SERVICE_SERVICE_HOST
          ports:
            - containerPort: 80
          resources:
            requests:
              memory: "50Mi"
              cpu: "50m"
            limits:
              memory: "100Mi"
              cpu: "100m"
          livenessProbe:
            httpGet:
              path: /health
              port: 80
            timeoutSeconds: 5
          readinessProbe:
            httpGet:
              path: /health
              port: 80
            timeoutSeconds: 5