Skip to content

Commit 4548f2b

Browse files
committed
Clarify "kustomization" wording
1 parent c1a9a6e commit 4548f2b

File tree

1 file changed

+21
-25
lines changed
  • site/content/en/references/kustomize/cmd/localize

1 file changed

+21
-25
lines changed

site/content/en/references/kustomize/cmd/localize/_index.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ for full capabilities.
1212

1313
### Description
1414

15-
The `kustomize localize` command makes a recursive copy of a kustomization
15+
The `kustomize localize` command makes a copy of a [kustomization root](https://kubectl.docs.kubernetes.io/references/kustomize/glossary/#kustomization-root),
1616
in which referenced urls are replaced by local paths to their downloaded content.
17-
The command copies files referenced under kustomization [fields](#fields).
18-
The copy contains files referenced both by the kustomization in question
19-
and by recursively referenced kustomizations.
17+
The command copies files referenced under kustomization [fields](#fields)
18+
in the source kustomization, and all base kustomizations under it.
2019

21-
The purpose of this command is to create a copy on which
20+
The purpose of this command is to create a copied root on which
2221
`kustomize build`<sup>[[build]](#notes)</sup> produces the same output
2322
without a network connection. The original motivation for this command
2423
is documented [here](https://github.com/kubernetes-sigs/kustomize/issues/3980).
@@ -35,11 +34,11 @@ The command takes the following form:
3534

3635
where
3736

38-
* `target` is the [kustomization directory](https://kubectl.docs.kubernetes.io/references/kustomize/glossary/#kustomization-root)
39-
to localize. This value can be a local path or a [remote root](https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md).
37+
* `target` is the kustomization root to localize.
38+
This value can be a local path or a [remote root](https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md).
4039
The default value is the current working directory.
4140
* `newDir` is the destination of the "localized" copy that the command creates.
42-
The destination cannot already exist.
41+
The destination directory cannot already exist.
4342
The command creates the destination directory, but not any of its parents.
4443
The default destination is a directory in the current working directory named:
4544
* `localized-{target}` for local `target`
@@ -57,8 +56,9 @@ of `scope`, excluding files that `target` does not reference and
5756
with the addition of downloaded remote content.
5857

5958
Downloaded files are copied to a directory named `localized-files` located in
60-
the same directory as the referencing kustomization. Inside `localized-files`,
61-
the content of remote
59+
the same directory as the referencing kustomization file.
60+
Inside `localized-files`, the content of remote
61+
6262
* roots are written to path<sup>[[localized root]](#notes)</sup>:
6363

6464
<pre>
@@ -76,27 +76,22 @@ the content of remote
7676

7777
Running the following command:
7878

79-
<!--
80-
TODO(annasong): Replace ref with kustomize/v5.0 after release.
81-
The kustomize/v4.5.7 version is very slow to execute because it fetches
82-
submodules.
83-
-->
8479
```shell
85-
$ kustomize localize https://github.com/kubernetes-sigs/kustomize//api/krusty/testdata/localize/remote?ref=kustomize/v4.5.7&submodules=0&timeout=300
80+
$ kustomize localize "https://github.com/kubernetes-sigs/kustomize//api/krusty/testdata/localize/remote?submodules=0&ref=kustomize/v5.0.0&timeout=300"
8681
```
8782

8883
in an empty directory named `example` creates the localized destination
8984
with the following contents:
9085

9186
```shell
9287
example
93-
└── localized-remote-kustomize-v4.5.7
88+
└── localized-remote-kustomize-v5.0.0
9489
├── localized-files
9590
│ └── github.com
9691
│ └── kubernetes-sigs
9792
│ └── kustomize
9893
│ └── kustomize
99-
│ └── v4.5.7
94+
│ └── v5.0.0
10095
│ └── api
10196
│ └── krusty
10297
│ └── testdata
@@ -108,17 +103,17 @@ example
108103
└── hpa.yaml
109104
```
110105
```shell
111-
# example/localized-remote-kustomize-v4.5.7/kustomization.yaml
106+
# example/localized-remote-kustomize-v5.0.0/kustomization.yaml
112107
apiVersion: kustomize.config.k8s.io/v1beta1
113108
commonLabels:
114109
purpose: remoteReference
115110
kind: Kustomization
116111
resources:
117-
- localized-files/github.com/kubernetes-sigs/kustomize/kustomize/v4.5.7/api/krusty/testdata/localize/simple
112+
- localized-files/github.com/kubernetes-sigs/kustomize/kustomize/v5.0.0/api/krusty/testdata/localize/simple
118113
- hpa.yaml
119114
```
120115
```shell
121-
# example/localized-remote-kustomize-v4.5.7/localized-files/github.com/kubernetes-sigs/kustomize/kustomize/v4.5.7/api/krusty/testdata/localize/simple/kustomization.yaml
116+
# example/localized-remote-kustomize-v5.0.0/localized-files/github.com/kubernetes-sigs/kustomize/kustomize/v5.0.0/api/krusty/testdata/localize/simple/kustomization.yaml
122117
apiVersion: kustomize.config.k8s.io/v1beta1
123118
kind: Kustomization
124119
namePrefix: localize-
@@ -237,8 +232,8 @@ if omitting these url components affects the correctness of your localized copy.
237232
<br></br>
238233

239234
* [plugin]: The alpha version of this command handles plugin files, but not
240-
kustomization directories producing plugins. The command throws an error upon
241-
encountering kustomizations under the plugin fields.
235+
kustomization roots producing plugins. The command throws an error upon
236+
encountering such roots under the plugin fields.
242237
<br></br>
243238

244239
* [ref]: This command requires [remote roots](https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md)
@@ -247,8 +242,9 @@ the content of the remote root is always the same.
247242
See [[localized root]](#notes) for more on remote roots.
248243
<br></br>
249244

250-
* [resource]: As a byproduct of processing yaml files such as kustomizations,
251-
this command writes their keys in alphabetical order to the destination.
245+
* [resource]: As a byproduct of processing yaml files
246+
such as the kustomization file, this command writes their keys
247+
in alphabetical order to the destination.
252248
<br></br>
253249

254250
* [symlink]: To avoid `kustomize build` load restriction errors on the

0 commit comments

Comments
 (0)