Skip to content

Commit d573d2f

Browse files
Merge branch 'main' into test/e2e-set-namespace-latest
2 parents c770085 + 712ada1 commit d573d2f

File tree

11 files changed

+116
-121
lines changed

11 files changed

+116
-121
lines changed

documentation/content/en/book/02-concepts/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Instead of consuming an existing package, you can also create a package from scr
191191

192192
![img](/images/lifecycle/flow5.svg)
193193

194-
- **Create**: Initialize a directory using `kpt pkg init`.
194+
- **Create**: Initialize a package using `kpt pkg init`. The command creates the directory if it doesn't exist.
195195

196196
Now, let's say you have rendered the package, and want to deploy it to a cluster. The workflow
197197
may look like this:

documentation/content/en/book/03-packages/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,13 @@ git add .; git commit -m "Updated wordpress to main"
314314
```
315315
## Creating a package
316316

317-
Creating a new package is simple. Use the `pkg init` command to create a package directory with a minimal `Kptfile` and `README` files:
317+
Creating a new package is simple. Use the `pkg init` command to initialize a directory as a kpt package with a minimal `Kptfile` and `README` files:
318318

319319
```shell
320320
kpt pkg init awesomeapp
321321
```
322322

323-
This will create the `awesomeapp` directory if it doesn't exist, and initialize it with the necessary files.
323+
The command will automatically create the `awesomeapp` directory if it doesn't exist, eliminating the need to manually create the directory beforehand.
324324

325325
Refer to the [init command reference](../../reference/cli/pkg/init/) for usage.
326326

documentation/content/en/book/08-ci-user-guide/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ availableSecrets:
281281
This section highlights practices that commonly lead to CI failures, drift, or unintended cluster changes. Avoid the
282282
following:
283283

284-
- Running `kpt pkg init` in CI. Packages and `Kptfile` metadata should be authored by developers, not created during
285-
CI runs.
284+
- Running `kpt pkg init` in CI to create package metadata. The `Kptfile` and package structure should be authored by developers
285+
and committed to Git, not generated during CI runs.
286286
- Mutating packages in CI. CI should validate and render the declared intent, not change the source of truth.
287287
- Storing secrets in configuration. Secrets must not appear in YAML files, the `Kptfile`, or `functionConfig`.
288288
- Applying on pull requests. PRs should validate only; deployment belongs in gated, mainline workflows.

documentation/content/en/guides/namespace-provisioning-cli.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,9 @@ Create a resource from a file or from stdin.
117117
# You should be under the `./blueprint` git directory. If not, check the above
118118
# section  "Prerequisites | Repositories"
119119

120-
# create a directory
121-
$ mkdir basens
122-
123-
# let's initialize the package
120+
# initialize the package (directory will be created automatically if it doesn't exist)
124121
$ kpt pkg init basens --description "kpt package for provisioning namespace"
122+
creating package directory basens
125123
writing basens/Kptfile
126124
writing basens/README.md
127125
writing basens/package-context.yaml

documentation/content/en/installation/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ directory by default.
6868
| [v0.39 Commands] | [v1.0 Commands] |
6969
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7070
| `kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] LOCAL_DEST_DIRECTORY [flags]` | `kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] [flags] [LOCAL_DEST_DIRECTORY]` <br> Fetch a remote package from a git subdirectory and writes it to a new local directory. |
71-
| `kpt pkg init DIR [flags]` | `kpt pkg init [DIR] [flags]` <br> Initializes a directory as a kpt package by adding a Kptfile. Creates the directory if it does not exist. |
71+
| `kpt pkg init DIR [flags]` | `kpt pkg init [DIR] [flags]` <br> Initializes a directory as a kpt package by adding a Kptfile. Creates the directory if it does not exist. |
7272
| `kpt pkg update LOCAL_PKG_DIR[@VERSION] [flags]` | `kpt pkg update [PKG_PATH][@version] [flags]` <br> Pulls in upstream changes and merges them into a local package. |
7373
| `kpt pkg fix DIR [flags]` | `kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/fix:latest --include-meta-resources` <br> Fix a local package which is using deprecated features. |
7474
| `kpt pkg desc DIR [flags]` | Deprecated in favor of reading Kptfile directly |

documentation/content/en/reference/annotations/apply-time-mutation/_index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ from pod-a.
110110
Create a new kpt package:
111111

112112
```shell
113-
mkdir my-pkg
113+
kpt pkg init my-pkg
114114
cd my-pkg
115-
kpt pkg init
116115
```
117116

118117
Configure two pods, with one that depends on the other:

documentation/content/en/reference/annotations/depends-on/_index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ In this example, pod-b depends on pod-a.
3535
Create a new kpt package:
3636

3737
```shell
38-
mkdir my-pkg
38+
kpt pkg init my-pkg
3939
cd my-pkg
40-
kpt pkg init
4140
```
4241

4342
Configure two pods, with one that depends on the other:

documentation/content/en/reference/annotations/local-config/_index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ In this example, the `ConfigMap` `cm-a` is local and not applied.
3434
Create a new kpt package:
3535

3636
```shell
37-
mkdir my-pkg
37+
kpt pkg init my-pkg
3838
cd my-pkg
39-
kpt pkg init
4039
```
4140

4241
Configure a local `ConfigMap`:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ require (
5151
github.com/chai2010/gettext-go v1.0.3 // indirect
5252
github.com/containerd/stargz-snapshotter/estargz v0.18.0 // indirect
5353
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
54-
github.com/docker/cli v28.5.1+incompatible // indirect
54+
github.com/docker/cli v29.2.0+incompatible // indirect
5555
github.com/docker/distribution v2.8.3+incompatible // indirect
5656
github.com/docker/docker-credential-helpers v0.9.4 // indirect
5757
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
2929
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3030
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
3131
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
32-
github.com/docker/cli v28.5.1+incompatible h1:ESutzBALAD6qyCLqbQSEf1a/U8Ybms5agw59yGVc+yY=
33-
github.com/docker/cli v28.5.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
32+
github.com/docker/cli v29.2.0+incompatible h1:9oBd9+YM7rxjZLfyMGxjraKBKE4/nVyvVfN4qNl9XRM=
33+
github.com/docker/cli v29.2.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
3434
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
3535
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
3636
github.com/docker/docker-credential-helpers v0.9.4 h1:76ItO69/AP/V4yT9V4uuuItG0B1N8hvt0T0c0NN/DzI=

0 commit comments

Comments
 (0)