From e6f706a0aedfc5aecb77d155b14ed81931d06c4b Mon Sep 17 00:00:00 2001 From: Abhishek Jaisingh Date: Tue, 16 Apr 2019 02:33:32 +0530 Subject: [PATCH] Fix Invalid DNS ConfigMap Name --- .../app_customization/bases_and_variants.md | 8 ++++---- .../app_management/secrets_and_configmaps.md | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/book/pages/app_customization/bases_and_variants.md b/docs/book/pages/app_customization/bases_and_variants.md index 955f9f301..bf37e8f96 100644 --- a/docs/book/pages/app_customization/bases_and_variants.md +++ b/docs/book/pages/app_customization/bases_and_variants.md @@ -80,7 +80,7 @@ bases: ```yaml # ../base/kustomization.yaml configMapGenerator: -- name: myJavaServerEnvVars +- name: my-java-server-env-vars literals: - JAVA_HOME=/opt/java/jdk - JAVA_TOOL_OPTIONS=-agentlib:hprof @@ -113,7 +113,7 @@ spec: name: config-volume volumes: - configMap: - name: myJavaServerEnvVars + name: my-java-server-env-vars name: config-volume ``` @@ -124,7 +124,7 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: myJavaServerEnvVars-k44mhd6h5f + name: my-java-server-env-vars-k44mhd6h5f data: JAVA_HOME: /opt/java/jdk JAVA_TOOL_OPTIONS: -agentlib:hprof @@ -153,7 +153,7 @@ spec: name: config-volume volumes: - configMap: - name: myJavaServerEnvVars-k44mhd6h5f + name: my-java-server-env-vars-k44mhd6h5f name: config-volume ``` {% endmethod %} diff --git a/docs/book/pages/app_management/secrets_and_configmaps.md b/docs/book/pages/app_management/secrets_and_configmaps.md index 86bc672fc..a3df90130 100644 --- a/docs/book/pages/app_management/secrets_and_configmaps.md +++ b/docs/book/pages/app_management/secrets_and_configmaps.md @@ -44,7 +44,7 @@ appear as a single data item in the ConfigMap keyed by the filename. apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization configMapGenerator: -- name: myApplicationProperties +- name: my-application-properties files: - application.properties ``` @@ -61,7 +61,7 @@ apiVersion: v1 kind: ConfigMap metadata: # The name has had a suffix applied - name: myApplicationProperties-c79528k426 + name: my-application-properties-c79528k426 # The data has been populated from each file's contents data: application.properties: | @@ -91,7 +91,7 @@ list of `literals`. apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization configMapGenerator: -- name: myJavaServerEnvVars +- name: my-java-server-env-vars literals: - JAVA_HOME=/opt/java/jdk - JAVA_TOOL_OPTIONS=-agentlib:hprof @@ -104,7 +104,7 @@ apiVersion: v1 kind: ConfigMap metadata: # The name has had a suffix applied - name: myJavaServerEnvVars-k44mhd6h5f + name: my-java-server-env-vars-k44mhd6h5f # The data has been populated from each literal pair data: JAVA_HOME: /opt/java/jdk @@ -196,7 +196,7 @@ Workloads that reference the ConfigMap or Secret will need to know the name of t including the suffix, however Apply takes care of this automatically for users. Apply will identify references to generated ConfigMaps and Secrets, and update them. -The generated ConfigMap name will be `myJavaServerEnvVars` with a suffix unique to its contents. +The generated ConfigMap name will be `my-java-server-env-vars` with a suffix unique to its contents. Changes to the contents will change the name suffix, resulting in the creation of a new ConfigMap, and transform Workloads to point to this one. @@ -211,7 +211,7 @@ Apply will update the name to include the suffix applied to the ConfigMap name. apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization configMapGenerator: -- name: myJavaServerEnvVars +- name: my-java-server-env-vars literals: - JAVA_HOME=/opt/java/jdk - JAVA_TOOL_OPTIONS=-agentlib:hprof @@ -246,7 +246,7 @@ spec: volumes: - name: config-volume configMap: - name: myJavaServerEnvVars + name: my-java-server-env-vars ``` **Applied:** The Resources that are Applied to the cluster. @@ -256,7 +256,7 @@ apiVersion: v1 kind: ConfigMap metadata: # The name has been updated to include the suffix - name: myJavaServerEnvVars-k44mhd6h5f + name: my-java-server-env-vars-k44mhd6h5f data: JAVA_HOME: /opt/java/jdk JAVA_TOOL_OPTIONS: -agentlib:hprof @@ -290,7 +290,7 @@ spec: - configMap: # The name has been updated to include the # suffix matching the ConfigMap - name: myJavaServerEnvVars-k44mhd6h5f + name: my-java-server-env-vars-k44mhd6h5f name: config-volume ``` {% endmethod %}