---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: havenapi
spec:
  replicas: 1
  template:
    metadata:
      annotations:
        alpha.image.policy.openshift.io/resolve-names: '*'
      labels:
        service: havenapi
    spec:
      containers:
        - name: havenapi
          image: havengrc-docker.jfrog.io/kindlyops/havenapi:0.0.5
          env:
            - name: GO_ENV
              value: "production"
            - name: DATABASE_HOST
              value: "db"
            - name: DATABASE_USERNAME
              valueFrom:
                secretKeyRef:
                  name: haven-database-credentials
                  key: username
            - name: DATABASE_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: haven-database-credentials
                  key: password
            - name: HAVEN_JWK_PATH
              value: "/etc/haven-credentials/jwk.json"
          volumeMounts:
            - name: secret-volume
              mountPath: /etc/haven-credentials/
              readOnly: true
          ports:
            - containerPort: 3000
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: 3000
            initialDelaySeconds: 1
            periodSeconds: 5
      volumes:
        - name: secret-volume
          secret:
            secretName: haven-database-credentials
      restartPolicy: Always
  strategy:
    type: "Recreate"
  paused: false
  revisionHistoryLimit: 2
  minReadySeconds: 0
status: {}

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: havenapi
spec:
  replicas: 1
  template:
    metadata:
      annotations:
        alpha.image.policy.openshift.io/resolve-names: '*'
      labels:
        service: havenapi
    spec:
      containers:
        - name: havenapi
          image: havengrc-docker.jfrog.io/kindlyops/havenapi:latest
          env:
            - name: GO_ENV
              value: "production"
            - name: DATABASE_HOST
              value: "db"
            - name: DATABASE_USERNAME
              valueFrom:
                secretKeyRef:
                  name: haven-database-credentials
                  key: username
            - name: DATABASE_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: haven-database-credentials
                  key: password
            - name: HAVEN_JWK_PATH
              value: "/etc/haven-credentials/jwk.json"
          volumeMounts:
            - name: secret-volume
              mountPath: /etc/haven-credentials/
              readOnly: true
          ports:
            - containerPort: 3000
              protocol: TCP
          resources:
            limits:
              memory: 256Mi
            requests:
              memory: 128Mi
          livenessProbe:
            httpGet:
              path: /healthz
              port: 3000
            initialDelaySeconds: 1
            periodSeconds: 5
      volumes:
        - name: secret-volume
          secret:
            secretName: haven-database-credentials
      restartPolicy: Always
  strategy:
    type: "Recreate"
  paused: false
  revisionHistoryLimit: 2
  minReadySeconds: 0
status: {}

Add resource limits for HavenAPI pods
Add resource limits for HavenAPI pods

Signed-off-by: Elliot Murphy <014ce8fab4ab9f8a957bfe9f974379093994de97@users.noreply.github.com>
