apiVersion: apps/v1
kind: Deployment
metadata:
  name: h2-deployment
spec:
  selector:
    matchLabels:
      app: h2-deployment
  template:
    metadata:
      labels:
        app: h2-deployment
    spec:
      initContainers:
      - name: graph-setup-init
        image: gcr.io/ucdlib-pubreg/casita-krm-graph-setup:v0.0.1
        imagePullPolicy: Always
        command: ["/bin/sh"]
        args: ["-c", "cp -r /setup/* /mnt/setup"]
        volumeMounts:
        - mountPath: /mnt/setup
          name: graph-setup-volume
      containers:
      - name: h2-deployment
        image: gcr.io/ucdlib-pubreg/krm-http2-service:main
        imagePullPolicy: Always
        env:
        - name: KRM_ENV
          value: "gce-prod"
        - name: KAFKA_HOST
          value: "kafka-service"
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
          requests:
            memory: "32Mi"
            cpu: "100m"
        volumeMounts:
        - mountPath: /etc/krm/setup
          name: graph-setup-volume
      volumes:
      - name: graph-setup-volume
        emptyDir: {}
      nodeSelector:
        intendedfor: krm-services
