You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace urls with local paths to downloaded content
8
8
---
9
9
10
10
Disclaimer: This is an alpha command. Please see the [command proposal](https://github.com/kubernetes-sigs/kustomize/blob/master/proposals/22-04-localize-command.md)
11
11
for full capabilities.
12
12
13
-
### Feedback
14
-
15
-
Please leave your feedback for this command under [the following issue](https://github.com/kubernetes-sigs/kustomize/issues/4996).
16
-
17
-
### Man
13
+
### Description
18
14
19
15
The `kustomize localize` command makes a recursive copy of a kustomization
20
16
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.
21
20
22
21
The purpose of this command is to create a copy on which
23
22
`kustomize build`<sup>[[build]](#notes)</sup> produces the same output
24
-
without a network connection.
23
+
without a network connection. The original motivation for this command
24
+
is documented [here](https://github.com/kubernetes-sigs/kustomize/issues/3980).
25
+
A `kustomize build` use case precluding network use could be a CI/CD pipeline
26
+
that only has access to the internal network.
27
+
28
+
### Usage
25
29
26
30
The command takes the following form:
27
31
@@ -34,71 +38,35 @@ where
34
38
*`target` is the [kustomization directory](https://kubectl.docs.kubernetes.io/references/kustomize/glossary/#kustomization-root)
35
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).
36
40
The default value is the current working directory.
37
-
*`newDir` is the destination of the "localized" copy that the command
38
-
will create. The destination must reside in an existing directory.
41
+
*`newDir` is the destination of the "localized" copy that the command creates.
42
+
The destination cannot already exist.
43
+
The command creates the destination directory, but not any of its parents.
39
44
The default destination is a directory in the current working directory named:
40
45
*`localized-{target}` for local `target`
41
-
*`localized-{target}-{ref}`<sup>[[ref]](#notes)</sup> for remote `target`
42
-
*`scope` is the bounding directory. The command can only copy files inside
43
-
this directory. The default is `target`. This flag cannot be specified for
44
-
remote `target`, as its value is implicitly the repo containing `target`.
45
-
46
-
### Fields
47
-
48
-
The command "localizes", copying or downloading, files under
49
-
the following kustomization fields<sup>[[resource]](#notes)</sup>:
0 commit comments