Skip to content

Commit 86c4e93

Browse files
Update book (#2283)
1 parent 874d307 commit 86c4e93

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

site/book/02-concepts/01-packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ a _subpackage_.
1111
Let's take a look at the wordpress package as an example:
1212

1313
```shell
14-
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3
14+
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.5
1515
```
1616

1717
View the package hierarchy using the `tree` command:

site/book/03-packages/01-getting-a-package.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ committing them to a Git repository. Consumers fork the package to use it.
44
Let's revisit the Wordpress example:
55

66
```shell
7-
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3
7+
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.5
88
```
99

1010
A package in a Git repo can be fetched by specifying a branch, tag, or commit
11-
SHA. In this case, we are specifying tag `v0.3`.
11+
SHA. In this case, we are specifying tag `v0.5`.
1212

1313
?> Refer to the [get command reference][get-doc] for usage.
1414

@@ -26,24 +26,26 @@ upstream:
2626
git:
2727
repo: https://github.com/GoogleContainerTools/kpt
2828
directory: /package-examples/wordpress
29-
ref: v0.3
29+
ref: v0.5
3030
updateStrategy: resource-merge
3131
upstreamLock:
3232
type: git
3333
git:
3434
repo: https://github.com/GoogleContainerTools/kpt
3535
directory: /package-examples/wordpress
36-
ref: package-examples/wordpress/v0.3
37-
commit: e0e0b3642969c2d14fe1d38d9698a73f18aa848f
36+
ref: package-examples/wordpress/v0.5
37+
commit: 4af5f509f33ab00ac99b1c3d146f8d1a4f4d3d0e
3838
info:
3939
emails:
4040
41-
description: This is an example wordpress package with mysql subpackage
41+
description: This is an example wordpress package with mysql subpackage.
4242
pipeline:
4343
mutators:
4444
- image: gcr.io/kpt-fn/set-label:v0.1
4545
configMap:
4646
app: wordpress
47+
validators:
48+
- image: gcr.io/kpt-fn/kubeval:v0.1
4749
```
4850
4951
The `Kptfile` contains two sections to keep track of the upstream package:
@@ -67,6 +69,10 @@ apiVersion: kpt.dev/v1alpha2
6769
kind: Kptfile
6870
metadata:
6971
name: mysql
72+
info:
73+
emails:
74+
75+
description: This is an example mysql package.
7076
pipeline:
7177
mutators:
7278
- image: gcr.io/kpt-fn/set-label:v0.1
@@ -95,7 +101,7 @@ For example, the following fetches the packages to a directory named
95101
`mywordpress`:
96102

97103
```shell
98-
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3 mywordpress
104+
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.5 mywordpress
99105
```
100106

101107
The _name of a package_ is given by its directory name. Since the Kptfile is a

site/book/03-packages/05-updating-a-package.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ $ git add .; git commit -m "My changes"
2020

2121
## Update the package
2222

23-
For example, you can update to version `v0.4` of the `wordpress` package:
23+
For example, you can update to version `v0.6` of the `wordpress` package:
2424

2525
```shell
26-
$ kpt pkg update wordpress@v0.4
26+
$ kpt pkg update wordpress@v0.6
2727
```
2828

2929
This is a porcelain for manually updating the `upstream` section in the
@@ -35,8 +35,8 @@ upstream:
3535
git:
3636
repo: https://github.com/GoogleContainerTools/kpt
3737
directory: /package-examples/wordpress
38-
# Change this from v0.3 to v0.4
39-
ref: v0.4
38+
# Change this from v0.5 to v0.6
39+
ref: v0.6
4040
updateStrategy: resource-merge
4141
```
4242
@@ -47,7 +47,7 @@ $ kpt pkg update wordpress
4747
```
4848

4949
The `update` command updates the local `wordpress` package and the dependent
50-
`mysql` package to the upstream version `v0.4` by doing a 3-way merge between:
50+
`mysql` package to the upstream version `v0.6` by doing a 3-way merge between:
5151

5252
1. Original upstream commit
5353
2. New upstream commit
@@ -64,7 +64,7 @@ resource using OpenAPI schema.
6464
Once you have successfully updated the package, commit the changes:
6565

6666
```shell
67-
$ git add .; git commit -m "Updated wordpress to v0.4"
67+
$ git add .; git commit -m "Updated wordpress to v0.6"
6868
```
6969

7070
[update-doc]: /reference/cli/pkg/update/

site/book/05-developing-functions/02-developing-in-Go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $ go build -o my-fn .
7070
Fetch the wordpress package:
7171

7272
```shell
73-
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3
73+
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.5
7474
```
7575

7676
Test it by running the function imperatively:

0 commit comments

Comments
 (0)