mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
Merge pull request #2482 from monopole/fixMkdirMinusP
Fix mkdir -p problem in example
This commit is contained in:
@@ -77,6 +77,7 @@ DEMO_HOME=$(mktemp -d)
|
|||||||
<!-- @defineLayout @testAgainstLatestRelease -->
|
<!-- @defineLayout @testAgainstLatestRelease -->
|
||||||
```
|
```
|
||||||
mkdir -p $DEMO_HOME/bases/iam-iap-tunnel
|
mkdir -p $DEMO_HOME/bases/iam-iap-tunnel
|
||||||
|
mkdir -p $DEMO_HOME/transformers/setProject
|
||||||
mkdir -p $DEMO_HOME/projects/cat-111
|
mkdir -p $DEMO_HOME/projects/cat-111
|
||||||
mkdir -p $DEMO_HOME/projects/dog-222
|
mkdir -p $DEMO_HOME/projects/dog-222
|
||||||
mkdir -p $DEMO_HOME/projects/fox-333
|
mkdir -p $DEMO_HOME/projects/fox-333
|
||||||
@@ -84,7 +85,7 @@ mkdir -p $DEMO_HOME/projects/fox-333
|
|||||||
|
|
||||||
To ground this example with a common problem,
|
To ground this example with a common problem,
|
||||||
assume a set of engineers:
|
assume a set of engineers:
|
||||||
|
|
||||||
* red@example.com
|
* red@example.com
|
||||||
* blue@example.com
|
* blue@example.com
|
||||||
* yellow@example.com
|
* yellow@example.com
|
||||||
@@ -177,7 +178,7 @@ The transformer used is called `AddValueTransformer`. It's
|
|||||||
intended to implement the 'add' operation of
|
intended to implement the 'add' operation of
|
||||||
[IETF RFC 6902 JSON]. The add operation is simple declaration
|
[IETF RFC 6902 JSON]. The add operation is simple declaration
|
||||||
of what value to add, and a powerful syntax for specifying where
|
of what value to add, and a powerful syntax for specifying where
|
||||||
to add the value. The value can, for example, be inserted
|
to add the value. The value can, for example, be inserted
|
||||||
into an existing field holding a file path as either a prefix,
|
into an existing field holding a file path as either a prefix,
|
||||||
a postfix, or some change
|
a postfix, or some change
|
||||||
in the middle (e.g. `/volume/data` becomes `/volume/projectId/data`).
|
in the middle (e.g. `/volume/data` becomes `/volume/projectId/data`).
|
||||||
@@ -186,7 +187,7 @@ in the middle (e.g. `/volume/data` becomes `/volume/projectId/data`).
|
|||||||
|
|
||||||
|
|
||||||
At the time of writing, this transformer has no dedicated keyword
|
At the time of writing, this transformer has no dedicated keyword
|
||||||
in the kustomization file to hold it's config. This means
|
in the kustomization file to hold it's config. This means
|
||||||
the config must live in its own file:
|
the config must live in its own file:
|
||||||
|
|
||||||
<!-- @defineSetProjectTransformer @testAgainstLatestRelease -->
|
<!-- @defineSetProjectTransformer @testAgainstLatestRelease -->
|
||||||
@@ -227,12 +228,11 @@ allows any number of transformers to be loaded as a group from a local
|
|||||||
or remote location.
|
or remote location.
|
||||||
|
|
||||||
Here an example of the latter case that uses a kustomization file to
|
Here an example of the latter case that uses a kustomization file to
|
||||||
list pointers to transformer configs, although in this case it
|
list pointers to transformer configs, although in this case it
|
||||||
references only one transformer config.
|
references only one transformer config.
|
||||||
|
|
||||||
<!-- @makeTransformerDir @testAgainstLatestRelease -->
|
<!-- @makeTransformerDir @testAgainstLatestRelease -->
|
||||||
```
|
```
|
||||||
mkdir -p $DEMO_HOME/transformers/setProject
|
|
||||||
cat <<'EOF' >$DEMO_HOME/transformers/setProject/kustomization.yaml
|
cat <<'EOF' >$DEMO_HOME/transformers/setProject/kustomization.yaml
|
||||||
resources:
|
resources:
|
||||||
- setProject.yaml
|
- setProject.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user