apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: pgbench
  name: pgbench
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pgbench
  template:
    metadata:
      labels:
        app: pgbench
    spec:
      #nodeSelector:
      #  lifecycle: Ec2Spot
      containers:
        - name: pgbench
          envFrom:
            - secretRef:
                name: db-creds
          env:
            - name: DURATION
              value: "100000"
            - name: CLIENTS
              value: "5"
            - name: DBHOST
              #value: "db.czk5ni6ofaxj.us-west-2.rds.amazonaws.com"
              value: "aa501bb12bde3437a87c195a9ed5edd7-8393eef865b22115.elb.us-west-2.amazonaws.com"
          image: 448389607377.dkr.ecr.us-west-2.amazonaws.com/simu-app-load:0.3
          imagePullPolicy: Always
          command: ["/start-pgbench.sh"]
          resources:
            requests:
              cpu: 512m
              memory: 512Mi
      hostNetwork: true
