Skip to content

Commit cda0b72

Browse files
Update migration doc (#2361)
* Update migration doc * Avoid export steps * dummy commit for ci trigger
1 parent f82c930 commit cda0b72

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

site/installation/migration.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,13 @@ $ DEMO_HOME=$(mktemp -d); cd $DEMO_HOME
212212
```
213213

214214
```shell
215-
$ export ORG_NAME=example-org; export PKG_DIR=example
215+
# replace it with your package repo uri
216+
$ git clone https://github.com/GoogleContainerTools/kpt-functions-catalog.git
216217
```
217218

218219
```shell
219-
$ export PKG_REPO=https://github.com/${ORG_NAME}/${PKG_DIR}.git
220-
```
221-
222-
```shell
223-
$ git clone $PKG_REPO
220+
# cd to the package directory which you want to migrate
221+
$ cd kpt-functions-catalog/testdata/fix/nginx-v1alpha1
224222
```
225223

226224
```shell
@@ -233,7 +231,12 @@ Invoke `gcr.io/kpt-fn/fix` function on the kpt package.
233231

234232
```shell
235233
# you must be using 1.0+ version of kpt
236-
$ kpt fn eval ${PKG_DIR} --image gcr.io/kpt-fn/fix:v0.2 --include-meta-resources --truncate-output=false
234+
$ kpt fn eval --image gcr.io/kpt-fn/fix:v0.2 --include-meta-resources --truncate-output=false
235+
```
236+
237+
```shell
238+
# observe the changes done by the fix function
239+
$ git diff
237240
```
238241

239242
##### Changes made by the function
@@ -282,8 +285,8 @@ Test your migrated kpt package end-to-end and make sure that the
282285
functionality is as expected. `gcr.io/kpt-fn/fix` is a helper for migration and
283286
doesn't guarantee functional parity.
284287

285-
Finally, publish your package to git by upgrading the major version so that your
286-
consumers can fetch with the specific version.
288+
Finally, [publish your package] to git by upgrading the version so that your
289+
consumers can fetch the specific version of the package.
287290

288291
### For Package Consumers
289292

@@ -300,22 +303,15 @@ and migrate the local customizations(if any) already performed to their existing
300303
$ DEMO_HOME=$(mktemp -d); cd $DEMO_HOME
301304
```
302305

303-
```shell
304-
$ export ORG_NAME=example-org; export PKG_DIR=example
305-
```
306-
307-
```shell
308-
$ export PKG_REPO=https://github.com/${ORG_NAME}/${PKG_DIR}.git
309-
```
310-
311306
```shell
312307
# verify the version of kpt
313308
$ kpt version
314309
1.0.0+
315310
```
316311

317312
```shell
318-
$ kpt pkg get $PKG_REPO
313+
# fetch the package with upgraded version
314+
$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/testdata/fix/nginx-v1@master
319315
```
320316

321317
- You might have performed some customizations to your existing package such as,
@@ -326,7 +322,7 @@ $ kpt pkg get $PKG_REPO
326322
- Render the package resources with customizations
327323

328324
```shell
329-
$ kpt fn render $PKG_DIR
325+
$ kpt fn render nginx-v1/
330326
```
331327

332328
- The step is only applicable if you're using `kpt live` functionality.
@@ -383,3 +379,4 @@ kpt `v0.39`) to `v1` version(compatible with kpt `v1.0`).
383379
[kpt-functions-catalog]: https://catalog.kpt.dev/
384380
[v1alpha1 kptfile]: https://github.com/GoogleContainerTools/kpt/blob/master/pkg/kptfile/pkgfile.go#L39
385381
[git clone]: https://git-scm.com/docs/git-clone
382+
[publish your package]: https://kpt.dev/book/03-packages/08-publishing-a-package

0 commit comments

Comments
 (0)