apiVersion: v1
kind: ReplicationController
metadata:
    name: openhab
spec:
    replicas: 1
    selector:
      app: openhab
    template:
      metadata:
        name: openhab
        labels:
          app: openhab
      spec:
        containers:
        - name: openhab
          image: ngocluanbka/openhab-kube
          ports:
          - containerPort: 8080
          volumeMounts:
          - name: openhab-cfg
            mountPath: /openhab/configurations/openhab.cfg
            subPath: openhab.cfg
          - name: openhab-hpcc-sitemap
            mountPath: /openhab/configurations/sitemap
          - name: openhab-hpcc-items
            mountPath: /openhab/configurations/items
        volumes:
        - name: openhab-hpcc-items
          configMap:
            name: openhab-hpcc-items
        - name: openhab-cfg
          configMap:
            name: openhab-cfg
        - name: openhab-hpcc-sitemap
          configMap:
            name: openhab-hpcc-sitemap
        restartPolicy: Always
