apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
      app: mongodb
      version: v1
  name: mongodb-v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongodb
      version: v1
  template:
    metadata:
      annotations: 
        'cni.projectcalico.org/ipv4pools': "[\"office-net\"]"
      labels:
        app: mongodb
        version: v1
    spec:
      imagePullSecrets:
        - name: gianthub-registry-key
      containers:
        - image: docker-registry.ztgame.com.cn/im/mediasoup-signal:1.0.2
          args: ["--mongodb"]
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              memory: "64Mi"
              cpu: "250m"
            limits:
              memory: "128Mi"
              cpu: "500m"
          name: mongodb
          ports:
            - containerPort: 27017
              protocol: TCP
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
          - mountPath: /opt/mediasoup-signal/build/db
            name: mongo-data
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30

      volumes:
      - name: mongo-data
        hostPath:
          path: /tmp/mongo
