---
apiVersion: v1
kind: ReplicationController
metadata:
  name: ycsb-load
  labels:
    group: nuodb
spec:
  replicas: 1
  selector:
    app: ycsb-load
  template:
    metadata:
      name: ycsb-load
      labels:
        app: ycsb-load
        database: testdb
    spec:
      containers:
      - name: ycsb-load
        image: nuodb/ycsb:latest
        imagePullPolicy: IfNotPresent
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - { name: DB_NAME, value: "nuodb"}
        - { name: DB_USER, value: "dba"}
        - { name: DB_PASSWORD, value: "goalie"}
        - { name: PEER_ADDRESS,        value: "admin.testns.svc" }
        - { name: User1,               value: "User1" }
        - { name: YCSB_WORKLOAD,       value: "b" }
        - { name: LB_POLICY,           value: "" }
        - { name: NO_OF_PROCESSES,     value: "2" }
        - { name: NO_OF_ROWS,          value: "10000" }
        - { name: NO_OF_ITERATIONS,    value: "0" }
        - { name: OPS_PER_ITERATION,    value: "10000" }
        - { name: MAX_DELAY,           value: "240000" }

