Skip to content

Commit 8d5b586

Browse files
authored
Minro doc fixes (#91)
- Use 'container' instead of 'docker' in the docs - Wordsmith 'configuration as data'
1 parent d8bb81e commit 8d5b586

File tree

6 files changed

+22
-24
lines changed

6 files changed

+22
-24
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ can be run as pre-commit or post-commit steps to validate configurations before
3131

3232
### Why KPT Functions
3333

34-
- **Configuration is data:** Many configuration tools conflate data with the operations on that
34+
- **Configuration as data:** Many configuration tools conflate data with the operations on that
3535
data (e.g. YAML files embedding a templating language).
3636
As configuration becomes complex, it becomes hard to read and understand.
37-
Our design philosophy is to separate _human-readable data_ from the _state-less programs_ that
38-
manipulate that data. We call these programs _functions_.
37+
Our design philosophy is to keep configuration as data, which enables us to programmatically manipulate it using stateless programs called _functions_.
3938
- **Unix philosophy:** Functions should be small, reusable, and composable.
4039
By implementing the [Configuration Functions Specification][spec],
4140
we can develop an ever-growing catalog of useful, interoperable functions.

docs/concepts.md

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

77
![function][img-func]
88

9-
- `FUNC`: A program, packaged as a docker container, that performs CRUD (Create, Read, Update,
9+
- `FUNC`: A program, packaged as a container, that performs CRUD (Create, Read, Update,
1010
Delete) operations on the input.
1111
- `input`: A Kubernetes List type containing objects to operate on.
1212
- `output`: A Kubernetes List type containing the resultant Kubernetes objects.

docs/develop.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This guide will walk you through developing a KPT function using the Typescript
77
- [Setup](#setup)
88
- [Create the NPM package](#create-the-npm-package)
99
- [Implement the function](#implement-the-function)
10-
- [Build and push Docker image](#build-and-push-docker-image)
10+
- [Build and push container images](#build-and-push-container-images)
1111
- [Use the SDK CLI](#use-the-sdk-cli)
1212
- [Next Steps](#next-steps)
1313

@@ -59,8 +59,7 @@ package discussed in the [Quickstart](develop-quickstart.md) and skip to [implem
5959
6060
#### Using a `kind` Cluster
6161
62-
The easiest way to get developing is to use `kind` to bring up a local cluster, running in a docker
63-
container.
62+
The easiest way to get developing is to use `kind` to bring up a cluster running in a local container.
6463
6564
1. Download the [kind binary][download-kind] version 0.5.1 or higher
6665
1. Use this config file:
@@ -172,7 +171,7 @@ code .
172171
In `src/my_func.ts`, implement the `KptFunc` interface [documented here][api-kptfunc].
173172
174173
Take a look at [these example functions][demo-funcs] to better understand how to use
175-
`kpt-functions` library. These functions are available as docker images documented in the [catalog][catalog].
174+
`kpt-functions` library. These functions are available as container images documented in the [catalog][catalog].
176175
177176
Once you've written some code, build the package with:
178177
@@ -193,9 +192,9 @@ To run the tests, use:
193192
npm test
194193
```
195194
196-
## Build and push Docker image
195+
## Build and push container images
197196
198-
With your working function in-hand, it's time to package your function into an executable docker
197+
With your working function in-hand, it's time to package your function into an executable container
199198
image.
200199
201200
`docker build` also requires authentication to GitHub, via the aforementioned credentials:
@@ -204,13 +203,13 @@ image.
204203
cp ~/.npmrc .
205204
```
206205
207-
To build the docker image:
206+
To build the container image:
208207
209208
```sh
210209
npm run kpt:docker-build
211210
```
212211
213-
You can now run the image as a docker container, e.g.:
212+
You can now run the function container, e.g.:
214213
215214
```sh
216215
docker run gcr.io/kpt-functions-demo/my-func:dev --help
@@ -227,7 +226,7 @@ You'll need proper authentication/authorization to push to your registry.
227226
`kpt:docker-push` pushes to the registry specified in the `kpt.docker_repo_base` field in `package.json`.
228227
You can manually edit this field at any time.
229228
230-
The default value for the docker image tag is `dev`. This can be overridden using`--tag` flag:
229+
The default value for the container image tag is `dev`. This can be overridden using`--tag` flag:
231230
232231
```sh
233232
npm run kpt:docker-build -- --tag=latest
@@ -249,16 +248,16 @@ These sub-commands are available:
249248
```console
250249
kpt:docker-create Generate Dockerfiles for all functions. Overwrite
251250
files if they exist.
252-
kpt:docker-build Build docker images for all functions.
253-
kpt:docker-push Push docker images to the registry for all functions.
251+
kpt:docker-build Build container images for all functions.
252+
kpt:docker-push Push container images to the registry for all functions.
254253
kpt:function-create Generate stubs for a new function. Overwrites files
255254
if they exist.
256255
kpt:type-create Generate classes for core and CRD types. Overwrite
257256
files if they exist.
258257
```
259258
260259
Flags are passed to the CLI after the `--` separator. For example, to pass a tag
261-
when building a docker image:
260+
when building a container image:
262261
263262
```console
264263
npm run kpt:docker-build -- --tag=latest

docs/run.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ After completing the [Development Guide](develop.md), you'll have a function tha
66
node dist/my_func_run.js --help
77
```
88

9-
or as a docker container:
9+
or as a container:
1010

1111
```sh
1212
docker run gcr.io/kpt-functions-demo/my-func:dev --help
@@ -231,11 +231,11 @@ You should see labels added to `Namespace` configuration files:
231231
git status
232232
```
233233

234-
#### Understanding Docker Flags
234+
#### Understanding `docker run` Flags
235235

236-
- `-u`: By default, docker containers run as a non-privileged user. Privileged actions, like
236+
- `-u`: By default, containers run as a non-privileged user. Privileged actions, like
237237
filesystem access or calls to the network, require escalated access. Note the example usages of
238-
`read-yaml`, which include `docker run -u $(id -u)`, running docker with your user ID.
238+
`read-yaml`, which include `docker run -u $(id -u)`, running the container with your user ID.
239239
- `-v`: Filesystem access requires mounting your container's filesystem onto your local
240240
filesystem. For example, the `read-yaml` command includes the following: `-v $(pwd):/source`. This connects
241241
the container's `/source` directory to the current directory on your filesystem.
@@ -245,7 +245,7 @@ git status
245245

246246
Functions can be piped to form sophisticated pipelines.
247247

248-
First, grab the `example-configs` directory and pull the docker images:
248+
First, grab the `example-configs` directory and pull the container images:
249249

250250
```sh
251251
git clone --depth 1 [email protected]:GoogleContainerTools/kpt-functions-sdk.git

go/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
make
55
```
66

7-
## Publish docker images
7+
## Publish container images
88

99
```console
1010
make publish-functions

ts/create-kpt-functions/src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async function main() {
5050
help: dockerCreateHelp,
5151
});
5252

53-
const dockerBuildHelp = 'Build docker images for all functions.';
53+
const dockerBuildHelp = 'Build container images for all functions.';
5454
const db = subparsers.addParser('docker-build', {
5555
addHelp: true,
5656
description: dockerBuildHelp,
@@ -61,7 +61,7 @@ async function main() {
6161
help: 'Docker tag used for all function images.',
6262
});
6363

64-
const dockerPushHelp = 'Push docker images to the registry for all functions.';
64+
const dockerPushHelp = 'Push container images to the registry for all functions.';
6565
const dp = subparsers.addParser('docker-push', {
6666
addHelp: true,
6767
description: dockerPushHelp,

0 commit comments

Comments
 (0)