Fix Invalid DNS ConfigMap Name
This commit is contained in:
parent
4142c2478e
commit
e6f706a0ae
|
|
@ -80,7 +80,7 @@ bases:
|
||||||
```yaml
|
```yaml
|
||||||
# ../base/kustomization.yaml
|
# ../base/kustomization.yaml
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: myJavaServerEnvVars
|
- name: my-java-server-env-vars
|
||||||
literals:
|
literals:
|
||||||
- JAVA_HOME=/opt/java/jdk
|
- JAVA_HOME=/opt/java/jdk
|
||||||
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
||||||
|
|
@ -113,7 +113,7 @@ spec:
|
||||||
name: config-volume
|
name: config-volume
|
||||||
volumes:
|
volumes:
|
||||||
- configMap:
|
- configMap:
|
||||||
name: myJavaServerEnvVars
|
name: my-java-server-env-vars
|
||||||
name: config-volume
|
name: config-volume
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -124,7 +124,7 @@ spec:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: myJavaServerEnvVars-k44mhd6h5f
|
name: my-java-server-env-vars-k44mhd6h5f
|
||||||
data:
|
data:
|
||||||
JAVA_HOME: /opt/java/jdk
|
JAVA_HOME: /opt/java/jdk
|
||||||
JAVA_TOOL_OPTIONS: -agentlib:hprof
|
JAVA_TOOL_OPTIONS: -agentlib:hprof
|
||||||
|
|
@ -153,7 +153,7 @@ spec:
|
||||||
name: config-volume
|
name: config-volume
|
||||||
volumes:
|
volumes:
|
||||||
- configMap:
|
- configMap:
|
||||||
name: myJavaServerEnvVars-k44mhd6h5f
|
name: my-java-server-env-vars-k44mhd6h5f
|
||||||
name: config-volume
|
name: config-volume
|
||||||
```
|
```
|
||||||
{% endmethod %}
|
{% endmethod %}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ appear as a single data item in the ConfigMap keyed by the filename.
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: myApplicationProperties
|
- name: my-application-properties
|
||||||
files:
|
files:
|
||||||
- application.properties
|
- application.properties
|
||||||
```
|
```
|
||||||
|
|
@ -61,7 +61,7 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
# The name has had a suffix applied
|
# 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
|
# The data has been populated from each file's contents
|
||||||
data:
|
data:
|
||||||
application.properties: |
|
application.properties: |
|
||||||
|
|
@ -91,7 +91,7 @@ list of `literals`.
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: myJavaServerEnvVars
|
- name: my-java-server-env-vars
|
||||||
literals:
|
literals:
|
||||||
- JAVA_HOME=/opt/java/jdk
|
- JAVA_HOME=/opt/java/jdk
|
||||||
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
||||||
|
|
@ -104,7 +104,7 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
# The name has had a suffix applied
|
# 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
|
# The data has been populated from each literal pair
|
||||||
data:
|
data:
|
||||||
JAVA_HOME: /opt/java/jdk
|
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
|
including the suffix, however Apply takes care of this automatically for users. Apply will identify
|
||||||
references to generated ConfigMaps and Secrets, and update them.
|
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,
|
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.
|
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
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: myJavaServerEnvVars
|
- name: my-java-server-env-vars
|
||||||
literals:
|
literals:
|
||||||
- JAVA_HOME=/opt/java/jdk
|
- JAVA_HOME=/opt/java/jdk
|
||||||
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
- JAVA_TOOL_OPTIONS=-agentlib:hprof
|
||||||
|
|
@ -246,7 +246,7 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: myJavaServerEnvVars
|
name: my-java-server-env-vars
|
||||||
```
|
```
|
||||||
|
|
||||||
**Applied:** The Resources that are Applied to the cluster.
|
**Applied:** The Resources that are Applied to the cluster.
|
||||||
|
|
@ -256,7 +256,7 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
# The name has been updated to include the suffix
|
# The name has been updated to include the suffix
|
||||||
name: myJavaServerEnvVars-k44mhd6h5f
|
name: my-java-server-env-vars-k44mhd6h5f
|
||||||
data:
|
data:
|
||||||
JAVA_HOME: /opt/java/jdk
|
JAVA_HOME: /opt/java/jdk
|
||||||
JAVA_TOOL_OPTIONS: -agentlib:hprof
|
JAVA_TOOL_OPTIONS: -agentlib:hprof
|
||||||
|
|
@ -290,7 +290,7 @@ spec:
|
||||||
- configMap:
|
- configMap:
|
||||||
# The name has been updated to include the
|
# The name has been updated to include the
|
||||||
# suffix matching the ConfigMap
|
# suffix matching the ConfigMap
|
||||||
name: myJavaServerEnvVars-k44mhd6h5f
|
name: my-java-server-env-vars-k44mhd6h5f
|
||||||
name: config-volume
|
name: config-volume
|
||||||
```
|
```
|
||||||
{% endmethod %}
|
{% endmethod %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue