From 716a7307b2cb044b8c9d94903015f3c7aadb4ef9 Mon Sep 17 00:00:00 2001 From: Karan Sharma Date: Fri, 30 Aug 2019 16:19:10 +0530 Subject: [PATCH] feat: Add instructions for setting key in configmap --- docs/fields.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/fields.md b/docs/fields.md index 20344c798..342fde125 100644 --- a/docs/fields.md +++ b/docs/fields.md @@ -119,6 +119,17 @@ configMapGenerator: - JAVA_TOOL_OPTIONS=-agentlib:hprof ``` +It is also possible to [define a key](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-the-key-to-use-when-creating-a-configmap-from-a-file) to set a name different than the filename. + +The example below creates a ConfigMap with the name of file as `myFileName.ini` while the _actual_ filename from which the configmap is created is `whatever.ini`. + +``` +configMapGenerator: +- name: app-whatever + files: + - myFileName.ini=whatever.ini +``` + ### crds Each entry in this list should be a relative path to