apiVersion: v1
kind: ReplicationController
metadata:
    name: onem2m-2
    namespace: kube-system
spec:
    replicas: 1
    selector:
      app: onem2m-2
    template:
      metadata:
        name: onem2m-2
        labels:
          app: onem2m-2
      spec:
        containers:
        - name: onem2m-2
          image: huanphan/onem2m:1.0
          ports:
          - containerPort: 8080
          volumeMounts:
          - name: onem2m-config
            mountPath: /usr/src/ipe_config/config.cfg
            subPath: config.cfg
          - name: onem2m-items
            mountPath: /usr/src/ipe_config/items.cfg
            subPath: items.cfg
        volumes:
        - name: onem2m-config
          configMap:
            name: onem2m-config-2
            items:
            - key: config.2.cfg
              path: config.cfg
        - name: onem2m-items
          configMap:
            name: onem2m-items-2
            items:
            - key: items.2.cfg
              path: items.cfg
        restartPolicy: Always
#        nodeSelector:
#          fog-node: worker_2