Skip to content

Commit e264264

Browse files
authored
Minor doc changes
* Fix broken command, link to contributor guide * Fix links
1 parent 9785ff4 commit e264264

File tree

6 files changed

+39
-29
lines changed

6 files changed

+39
-29
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ information on using pull requests.
2525
## Community Guidelines
2626

2727
This project follows
28-
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).
28+
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).
29+
30+
## Additional Notes
31+
32+
Follow the [contributor guide](docs/contributor_guide.md) for additional tips and best practices when
33+
submitting changes.

docs/concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ At a high level, a function can be conceptualized like so:
1414

1515
See [Configuration Functions Specification][spec] for further details.
1616

17-
There are two special-case functions:
17+
There are two special-case functions: source functions and sink functions.
1818

1919
## Source Function
2020

docs/contributor_guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ need to perform due diligence.
1111
1. What's size of the package? Will it cause binary bloat?
1212
1. Is the package and its transitive dependencies high quality, trust-worthy, and well-maintained projects?
1313
1. What version of the package should we depend on?
14-
1. Are the licenses for the package and its transitive dependencies 'green'? See next section for checking license.
14+
1. Are the licenses for the package and its transitive dependencies green? See next section for checking licenses.
1515

1616
## Checking licenses
1717

@@ -25,8 +25,8 @@ npm run lint-license
2525
## Releases
2626

2727
1. Update version in package.json to e.g. `0.10.0-rc.1`
28-
2. Create a RC in GitHub, e.g: `release-kpt-functions-v0.10.0-rc.1`
28+
1. Create a release candidate (RC) in GitHub, e.g: `release-kpt-functions-v0.10.0-rc.1`
2929
This will trigger a release job in GitHub actions
30-
3. Create a PR changing dependant packages to use the rc version.
31-
4. If the CI passes for this PR, edit release created in #2 and remove `-rc.1`.
32-
5. Edit PR in #4 to remove `-rc.1`.
30+
1. Create a pull request (PR) changing dependent packages to use the RC version.
31+
1. If the release job passes for this PR, edit release created in #2 and remove `-rc.1`.
32+
1. Edit PR in #4 to remove `-rc.1`.

docs/develop-quickstart.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Currently supported platforms: amd64 Linux/Mac
1616

1717
- Install [node][download-node]
1818
- Install [docker][install-docker]
19-
- Install [kpt][download-kpt]
19+
- Install [kpt][download-kpt] and add it to \$PATH
2020

2121
#### `.npmrc` File
2222

2323
In order to install these packages, you need to configure your `.npmrc` file to authenticate to GitHub.
2424

2525
1. Create a Personal Token by navigating to `Settings > Developer settings > Personal access tokens`
26-
in GitHub. Specify `read:packages` scope.
27-
1. Back up any existing `.npmrc` if it exist:
26+
in GitHub. Specify the `read:packages` scope.
27+
1. Back up any existing `.npmrc` if it exists:
2828

2929
```sh
3030
mv ~/.npmrc{,.backup}
@@ -53,19 +53,19 @@ In order to install these packages, you need to configure your `.npmrc` file to
5353
cd kpt-functions-sdk/ts/hello-world
5454
```
5555
56-
2. Install all dependencies:
56+
1. Install all dependencies:
5757
5858
```sh
5959
npm install
6060
```
61-
62-
3. Run the following in a separate terminal to continuously build your function as you make changes:
61+
62+
1. Run the following in a separate terminal to continuously build your function as you make changes:
6363
6464
```sh
6565
npm run watch
6666
```
6767
68-
4. Run the `label_namespace` function:
68+
1. Run the `label_namespace` function:
6969
7070
```sh
7171
export CONFIGS=../../example-configs
@@ -75,20 +75,20 @@ In order to install these packages, you need to configure your `.npmrc` file to
7575
kpt fn sink $CONFIGS
7676
```
7777
78-
As the name suggest, this function added the given label to all `Namespace` objects
79-
in `example-configs` directory:
78+
As the name suggests, this function added the given label to all `Namespace` objects
79+
in the `example-configs` directory:
8080
8181
```sh
8282
git diff $CONFIGS
8383
```
8484
85-
5. Try modifying the function in `src/label_namespace.ts` to perform other operations
85+
1. Try modifying the function in `src/label_namespace.ts` to perform other operations
8686
on `example-configs`, then repeat step 4.
8787
8888
The function should implement the `KptFunc` interface [documented here][api-kptfunc].
8989
9090
Take a look at [these example functions][demo-funcs] to better understand how to use
91-
`kpt-functions` library.
91+
the `kpt-functions` SDK.
9292
9393
## Next Steps
9494

docs/develop.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Currently supported platforms: amd64 Linux/Mac
2929

3030
#### `.npmrc` File
3131

32-
Currently, NPM packages in the SDK are published to [private GitHub package in this repo][npm-packages].
32+
Currently, NPM packages in the SDK are published to [private GitHub packages in this repo][npm-packages].
3333

3434
In order to install these packages, you need to configure your `.npmrc` file to authenticate to GitHub.
3535

3636
1. Create a Personal Token by navigating to `Settings > Developer settings > Personal access tokens`
37-
in GitHub. Specify `read:packages` scope.
38-
1. Back up any existing `.npmrc` if it exist:
37+
in GitHub. Specify the `read:packages` scope.
38+
1. Back up any existing `.npmrc` if it exists:
3939

4040
```sh
4141
mv ~/.npmrc{,.backup}
@@ -52,7 +52,7 @@ In order to install these packages, you need to configure your `.npmrc` file to
5252
5353
### Your Kubernetes Cluster
5454
55-
For the type generation functionality to work, you need a Kubernetes cluster with [CRD OpenAPI Publishing][beta-feature] feature which is beta with Kubernetes 1.15.
55+
For the type generation functionality to work, you need a Kubernetes cluster with the [CRD OpenAPI Publishing][beta-feature] feature which is beta with Kubernetes 1.15.
5656
5757
Alternatively, you can use an existing NPM package with pre-generated types such as the `hello-world`
5858
package discussed in the [Quickstart](develop-quickstart.md) and skip to [implementing the function](#implementing-the-function).
@@ -97,7 +97,7 @@ You can also use a deployed cluster in GKE. The beta k8s feature is avilable onl
9797
`--enable-kubernetes-alpha` flag, as seen here:
9898
9999
```sh
100-
gcloud container clusters create $USER-1-14-alpha --enable-kubernetes-alpha --cluster-version=latest --region=us-central1-a --project <PROJECT>
100+
gcloud container clusters create $USER-1-14-alpha --enable-kubernetes-alpha --cluster-version=latest --no-enable-autoupgrade --region=us-central1-a --project <PROJECT>
101101
gcloud container clusters get-credentials $USER-1-14-alpha --zone us-central1-a --project <PROJECT>
102102
```
103103
@@ -241,11 +241,9 @@ the NPM package you created above. The CLI sub-commands can be invoked via `npm
241241
to add a new function to the package:
242242
243243
```console
244-
npm run kpt:function-create -- --help
244+
npm run kpt:function-create
245245
```
246246
247-
> **Note:** Flags are passed to the CLI after the `--` separator.
248-
249247
These sub-commands are available:
250248
251249
```console
@@ -259,6 +257,13 @@ kpt:type-create Generate classes for core and CRD types. Overwrite
259257
files if they exist.
260258
```
261259
260+
Flags are passed to the CLI after the `--` separator. For example, to pass a tag
261+
when building a docker image:
262+
263+
```console
264+
npm run kpt:docker-build -- --tag=latest
265+
```
266+
262267
## Next Steps
263268
264269
- [Running KPT Functions](run.md)

docs/run.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ provide a simple list of key/value pairs as parameters. We provide porcelain to
196196
docker run -i gcr.io/kpt-functions/label-namespace -d label_name=color -d label_value=orange < /tmp/input.yaml
197197
```
198198

199-
> **Note:** This causes an error if the function takes another kind of `functionConfig`.
199+
> **Note:** This causes an error if the function takes another Kind of `functionConfig`.
200200
201201
#### Composing a pipeline
202202

@@ -223,13 +223,13 @@ Finally, let's run the pipeline:
223223
docker run -i -u $(id -u) -v $(pwd):/source gcr.io/kpt-functions/read-yaml -i /dev/null -d source_dir=/source |
224224
docker run -i gcr.io/kpt-functions/label-namespace -d label_name=color -d label_value=orange |
225225
docker run -i -u $(id -u) -v $(pwd):/sink gcr.io/kpt-functions/write-yaml -o /dev/null -d sink_dir=/sink -d overwrite=true
226-
````
226+
```
227227

228228
You should see labels added to `Namespace` configuration files:
229229

230230
```sh
231231
git status
232-
````
232+
```
233233

234234
#### Understanding Docker Flags
235235

0 commit comments

Comments
 (0)