Skip to content

Commit bcb1e41

Browse files
authored
Merge pull request #20827 from jai/patch-1
docs: tweak grammar, tenses, punctuation
2 parents 9e28ced + e381dc7 commit bcb1e41

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

content/en/docs/tasks/manage-kubernetes-objects/kustomization.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ Kustomize is a tool for customizing Kubernetes configurations. It has the follow
4646

4747
### Generating Resources
4848

49-
ConfigMap and Secret hold config or sensitive data that are used by other Kubernetes objects, such as Pods. The source
50-
of truth of ConfigMap or Secret are usually from somewhere else, such as a `.properties` file or a ssh key file.
49+
ConfigMaps and Secrets hold configuration or sensitive data that are used by other Kubernetes objects, such as Pods. The source of truth of ConfigMaps or Secrets are usually external to a cluster, such as a `.properties` file or an SSH keyfile.
5150
Kustomize has `secretGenerator` and `configMapGenerator`, which generate Secret and ConfigMap from files or literals.
5251

5352
#### configMapGenerator
5453

55-
To generate a ConfigMap from a file, add an entry to `files` list in `configMapGenerator`. Here is an example of generating a ConfigMap with a data item from a file content.
54+
To generate a ConfigMap from a file, add an entry to the `files` list in `configMapGenerator`. Here is an example of generating a ConfigMap with a data item from a `.properties` file:
5655

5756
```shell
5857
# Create a application.properties file
@@ -68,7 +67,7 @@ configMapGenerator:
6867
EOF
6968
```
7069

71-
The generated ConfigMap can be checked by the following command:
70+
The generated ConfigMap can be examined with the following command:
7271

7372
```shell
7473
kubectl kustomize ./
@@ -86,7 +85,7 @@ metadata:
8685
name: example-configmap-1-8mbdf7882g
8786
```
8887
89-
ConfigMap can also be generated from literal key-value pairs. To generate a ConfigMap from a literal key-value pair, add an entry to `literals` list in configMapGenerator. Here is an example of generating a ConfigMap with a data item from a key-value pair.
88+
ConfigMaps can also be generated from literal key-value pairs. To generate a ConfigMap from a literal key-value pair, add an entry to the `literals` list in configMapGenerator. Here is an example of generating a ConfigMap with a data item from a key-value pair:
9089

9190
```shell
9291
cat <<EOF >./kustomization.yaml
@@ -103,7 +102,7 @@ The generated ConfigMap can be checked by the following command:
103102
kubectl kustomize ./
104103
```
105104

106-
The generated ConfigMap is
105+
The generated ConfigMap is:
107106

108107
```yaml
109108
apiVersion: v1
@@ -116,7 +115,7 @@ metadata:
116115

117116
#### secretGenerator
118117

119-
You can generate Secrets from files or literal key-value pairs. To generate a Secret from a file, add an entry to `files` list in `secretGenerator`. Here is an example of generating a Secret with a data item from a file.
118+
You can generate Secrets from files or literal key-value pairs. To generate a Secret from a file, add an entry to the `files` list in `secretGenerator`. Here is an example of generating a Secret with a data item from a file:
120119

121120
```shell
122121
# Create a password.txt file
@@ -145,7 +144,7 @@ metadata:
145144
type: Opaque
146145
```
147146

148-
To generate a Secret from a literal key-value pair, add an entry to `literals` list in `secretGenerator`. Here is an example of generating a Secret with a data item from a key-value pair.
147+
To generate a Secret from a literal key-value pair, add an entry to `literals` list in `secretGenerator`. Here is an example of generating a Secret with a data item from a key-value pair:
149148

150149
```shell
151150
cat <<EOF >./kustomization.yaml
@@ -172,7 +171,7 @@ type: Opaque
172171

173172
#### generatorOptions
174173

175-
The generated ConfigMaps and Secrets have a suffix appended by hashing the contents. This ensures that a new ConfigMap or Secret is generated when the content is changed. To disable the behavior of appending a suffix, one can use `generatorOptions`. Besides that, it is also possible to specify cross-cutting options for generated ConfigMaps and Secrets.
174+
The generated ConfigMaps and Secrets have a content hash suffix appended. This ensures that a new ConfigMap or Secret is generated when the contents are changed. To disable the behavior of appending a suffix, one can use `generatorOptions`. Besides that, it is also possible to specify cross-cutting options for generated ConfigMaps and Secrets.
176175

177176
```shell
178177
cat <<EOF >./kustomization.yaml
@@ -209,7 +208,7 @@ metadata:
209208
It is quite common to set cross-cutting fields for all Kubernetes resources in a project.
210209
Some use cases for setting cross-cutting fields:
211210

212-
* setting the same namespace for all Resource
211+
* setting the same namespace for all Resources
213212
* adding the same name prefix or suffix
214213
* adding the same set of labels
215214
* adding the same set of annotations
@@ -289,7 +288,7 @@ Kustomize offers composing Resources from different files and applying patches o
289288
#### Composing
290289

291290
Kustomize supports composition of different resources. The `resources` field, in the `kustomization.yaml` file, defines the list of resources to include in a configuration. Set the path to a resource's configuration file in the `resources` list.
292-
Here is an example for an nginx application with a Deployment and a Service.
291+
Here is an example of an NGINX application comprised of a Deployment and a Service:
293292

294293
```shell
295294
# Create a deployment.yaml file
@@ -339,11 +338,11 @@ resources:
339338
EOF
340339
```
341340

342-
The Resources from `kubectl kustomize ./` contains both the Deployment and the Service objects.
341+
The Resources from `kubectl kustomize ./` contain both the Deployment and the Service objects.
343342

344343
#### Customizing
345344

346-
On top of Resources, one can apply different customizations by applying patches. Kustomize supports different patching
345+
Patches can be used to apply different customizations to Resources. Kustomize supports different patching
347346
mechanisms through `patchesStrategicMerge` and `patchesJson6902`. `patchesStrategicMerge` is a list of file paths. Each file should be resolved to a [strategic merge patch](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md). The names inside the patches must match Resource names that are already loaded. Small patches that do one thing are recommended. For example, create one patch for increasing the deployment replica number and another patch for setting the memory limit.
348347

349348
```shell

0 commit comments

Comments
 (0)