Skip to content

Commit

Permalink
Release new versions of wordpress and nginx packages (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfarzan authored May 13, 2021
1 parent b09cb61 commit 8b3fe0e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package-examples/nginx/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Deployment
metadata:
name: my-nginx
spec:
replicas: 3
replicas: 4
selector:
matchLabels:
app: nginx
Expand Down
2 changes: 1 addition & 1 deletion package-examples/wordpress/deployment/volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ metadata:
spec:
resources:
requests:
storage: 20Gi
storage: 30Gi
accessModes:
- ReadWriteOnce
6 changes: 3 additions & 3 deletions site/book/01-getting-started/02-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ configuration using the underlying Git version control system.
First, let's fetch the _kpt package_ from Git to your local filesystem:

```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt/package-examples/nginx@v0.2
$ kpt pkg get https://github.com/GoogleContainerTools/kpt/package-examples/nginx@v0.4
$ cd nginx
```

Expand Down Expand Up @@ -130,10 +130,10 @@ First, commit your local changes:
$ git add .; git commit -m "My customizations"
```

Then update to version `v0.3`:
Then update to version `v0.5`:

```shell
$ kpt pkg update @v0.3
$ kpt pkg update @v0.5
```

This merges the upstream changes with your local changes using a schema-aware merge strategy.
Expand Down
2 changes: 1 addition & 1 deletion site/book/02-concepts/01-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ _subpackage_.
Let's take a look at an example:

```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.1
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3
$ kpt pkg tree wordpress/
PKG: wordpress
├── [Kptfile] Kptfile wordpress
Expand Down
10 changes: 5 additions & 5 deletions site/book/03-packages/01-getting-a-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ repository. Consumers fork the package to use it.
Let's revisit the Wordpress example:

```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.1
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3
```

A package in a Git repo can be fetched by specifying a branch, tag, or commit SHA. In this case,
we are specifying tag `v0.1`.
we are specifying tag `v0.3`.

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

Expand All @@ -26,14 +26,14 @@ upstream:
git:
repo: https://github.com/GoogleContainerTools/kpt
directory: /package-examples/wordpress
ref: v0.1
ref: v0.3
updateStrategy: resource-merge
upstreamLock:
type: git
git:
repo: https://github.com/GoogleContainerTools/kpt
directory: /package-examples/wordpress
ref: package-examples/wordpress/v0.1
ref: package-examples/wordpress/v0.3
commit: e0e0b3642969c2d14fe1d38d9698a73f18aa848f
info:
emails:
Expand Down Expand Up @@ -91,7 +91,7 @@ It is possible to specify a different local directory name to the `get` command.
the following fetches the packages to a directory named `mywordpress`:

```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.1 mywordpress
$ kpt pkg get https://github.com/GoogleContainerTools/kpt.git/package-examples/wordpress@v0.3 mywordpress
```

The _name of a package_ is given by its directory name. Since the Kptfile is a KRM resource and
Expand Down
12 changes: 6 additions & 6 deletions site/book/03-packages/05-updating-a-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ $ git add .; git commit -m "My changes"

## Update the package

For example, you can update to version `v0.2` of the `wordpress` package:
For example, you can update to version `v0.4` of the `wordpress` package:

```shell
$ kpt pkg update wordpress@v0.2
$ kpt pkg update wordpress@v0.4
```

This is a porcelain for manually updating the `upstream` section in the `Kptfile` :
Expand All @@ -34,8 +34,8 @@ upstream:
git:
repo: https://github.com/GoogleContainerTools/kpt
directory: /package-examples/wordpress
# Change this from v0.1 to v0.2
ref: v0.2
# Change this from v0.3 to v0.4
ref: v0.4
updateStrategy: resource-merge
```
Expand All @@ -46,7 +46,7 @@ $ kpt pkg update wordpress
```

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

1. Original upstream commit
2. New upstream commit
Expand All @@ -62,7 +62,7 @@ strategy is used which performs a structural comparison of the resource using Op
Once you have successfully updated the package, commit the changes:

```shell
$ git add .; git commit -m "Updated wordpress to v0.2"
$ git add .; git commit -m "Updated wordpress to v0.4"
```

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

0 comments on commit 8b3fe0e

Please sign in to comment.