apiVersion: v1
kind: ReplicationController
metadata:
    name: sensor-gen
    namespace: kube-system
spec:
    replicas: 1
    selector:
      app: sensor-gen
    template:
      metadata:
        name: sensor-gen
        labels:
          app: sensor-gen
      spec:
        containers:
        - name: sensor-gen
          image: huanphan/sensor-simulator:0.2
          volumeMounts:
          - name: sensor-config
            mountPath: /SimulateSensor/config
        volumes:
        - name: sensor-config
          configMap:
            name: sensor-config
            items:
            - key: config.cfg
              path: config.cfg
        restartPolicy: Always
