apiVersion: apps/v1
kind: Deployment
metadata:
  name: integration
spec:
  selector:
    matchLabels:
      app: integration
  template:
    metadata:
      labels:
        app: integration
    spec:
      containers:
        - image: interpres/integration
          name: integration
#          change to IfNotPresent
          imagePullPolicy: IfNotPresent
          resources:
            limits:
              cpu: 250m
              ephemeral-storage: 10Mi
              memory: 512Mi
            requests:
              cpu: 250m
              ephemeral-storage: 10Mi
              memory: 512Mi
          ports:
            - containerPort: 8092
              protocol: TCP
          env:
            - name: INTEGRATION_SERVICE_PORT
              valueFrom:
                configMapKeyRef:
                  name: interpres-config
                  key: INTEGRATION_SERVICE_PORT
            - name: GITHUB_APP_ID
              valueFrom:
                secretKeyRef:
                  name: github-client-secret
                  key: github-app-id
            - name: GITHUB_APP_PRIVATE_KEY
              valueFrom:
                secretKeyRef:
                  name: github-client-secret
                  key: github-app-private-key
