@@ -212,15 +212,13 @@ $ DEMO_HOME=$(mktemp -d); cd $DEMO_HOME
212
212
```
213
213
214
214
``` 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
216
217
```
217
218
218
219
``` 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
224
222
```
225
223
226
224
``` shell
@@ -233,7 +231,12 @@ Invoke `gcr.io/kpt-fn/fix` function on the kpt package.
233
231
234
232
``` shell
235
233
# 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
237
240
```
238
241
239
242
##### Changes made by the function
@@ -282,8 +285,8 @@ Test your migrated kpt package end-to-end and make sure that the
282
285
functionality is as expected. ` gcr.io/kpt-fn/fix ` is a helper for migration and
283
286
doesn't guarantee functional parity.
284
287
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 .
287
290
288
291
### For Package Consumers
289
292
@@ -300,22 +303,15 @@ and migrate the local customizations(if any) already performed to their existing
300
303
$ DEMO_HOME=$( mktemp -d) ; cd $DEMO_HOME
301
304
```
302
305
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
-
311
306
``` shell
312
307
# verify the version of kpt
313
308
$ kpt version
314
309
1.0.0+
315
310
```
316
311
317
312
``` 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
319
315
```
320
316
321
317
- You might have performed some customizations to your existing package such as,
@@ -326,7 +322,7 @@ $ kpt pkg get $PKG_REPO
326
322
- Render the package resources with customizations
327
323
328
324
``` shell
329
- $ kpt fn render $PKG_DIR
325
+ $ kpt fn render nginx-v1/
330
326
```
331
327
332
328
- 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`).
383
379
[ kpt-functions-catalog ] : https://catalog.kpt.dev/
384
380
[ v1alpha1 kptfile ] : https://github.com/GoogleContainerTools/kpt/blob/master/pkg/kptfile/pkgfile.go#L39
385
381
[ 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