apiVersion: v1
kind: ReplicationController
metadata:
  name: drinker
spec:
  replicas: 1
  template:
    metadata:
      name: drinker
      labels:
        name: drinker
    spec:
      containers:
      - name: drinker
        image: gcr.io/code-archive/drinker
        volumeMounts:
        - name: drinker-cache
          mountPath: /cache
        env:
        - name: INFLUX_ADDR
          value: "http://influx:8086"
        - name: DB_ADDR
          value: "root:toor@tcp(queue:3306)/gitarchive"
        - name: CACHE_PATH
          value: "/cache/cache.db"
        - name: GITHUB_TOKEN
          valueFrom:
            secretKeyRef:
              name: github-token
              key: token
        resources:
          requests:
            cpu: "100m"
          limits:
            memory: "1Gi"
      volumes:
      - name: drinker-cache
        gcePersistentDisk:
          pdName: drinker-cache
          fsType: ext4
