add config_map support

Change-Id: I84045a29e915af9aeaa51e6bc096f7d87ca75c72
diff --git a/README.rst b/README.rst
index 118efd8..4992bdf 100644
--- a/README.rst
+++ b/README.rst
@@ -480,27 +480,64 @@
 
 .. code-block:: yaml
 
-  container:
+  service:
     memcached:
+      container:
+        memcached:
+          volumes:
+            - name: volume1
+              mountPath: /volume
+              readOnly: True
       ...
-      volumes:
-      - name: /etc/certs
-        mount: /certs
-        type: hostPath
-        path: /etc/certs
+      volume:
+        volume1:
+          name: /etc/certs
+          type: hostPath
+          path: /etc/certs
 
 emptyDir
 ========
 
 .. code-block:: yaml
 
-  container:
+  service:
     memcached:
+      container:
+        memcached:
+          volumes:
+            - name: volume1
+              mountPath: /volume
+              readOnly: True
       ...
-      volumes:
-      - name: /etc/certs
-        mount: /certs
-        type: emptyDir
+      volume:
+        volume1:
+          name: /etc/certs
+          type: emptyDir
+
+configMap
+=========
+
+.. code-block:: yaml
+
+  service:
+    memcached:
+      container:
+        memcached:
+          volumes:
+            - name: volume1
+              mountPath: /volume
+              readOnly: True
+      ...
+      volume:
+        volume1:
+          type: config_map
+          item:
+            configMap1:
+              key: config.conf
+              path: config.conf
+            configMap2:
+              key: policy.json
+              path: policy.json
 
 Documentation and Bugs
 ======================
diff --git a/kubernetes/files/rc.yml b/kubernetes/files/rc.yml
index 1abd02d..be89492 100644
--- a/kubernetes/files/rc.yml
+++ b/kubernetes/files/rc.yml
@@ -113,6 +113,14 @@
             endpoints: {{ volume.endpoints }}
             path: {{ volume.path }}
             readOnly: {{ volume.read_only }}
+          {%- elif volume.type == 'config_map' %}
+          configMap:
+            name: {{ volume_name }}
+            items:
+              {%- for name, item in volume.item.iteritems() %}
+              - key: {{ item.key }}
+                path: {{ item.path }}
+              {%- endfor %}
           {%- endif %}
       {%- endfor %}
       {%- endif %}