Skip to content

Commit

Permalink
Merge pull request #1188 from bzub/doc_fixes
Browse files Browse the repository at this point in the history
docs: consumer guide nits and fixes.
  • Loading branch information
prachirp committed Nov 13, 2020
2 parents 8ea1a23 + 0afc440 commit 7fba032
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 35 deletions.
2 changes: 1 addition & 1 deletion site/content/en/guides/consumer/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linkTitle: "Package Consumers"
weight: 1
type: docs
description: >
Guides for workflows related to consume packages published by other
Guides for workflows related to consuming packages published by other
teams or organizations.
---

Expand Down
14 changes: 6 additions & 8 deletions site/content/en/guides/consumer/apply/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ cd $TEST_HOME

[kpt live apply]

Because kpt packages are composed of resource configuration can be applied with
`kubectl apply -R -f DIR`, however kpt includes the next-generation **apply**
commands developed out of the Kubernetes [cli-utils] repository as the
[kpt live apply] command.
Because kpt packages are composed of resource configuration, they can be
applied with `kubectl apply -R -f DIR`. However, kpt includes the
next-generation **apply** commands developed out of the Kubernetes [cli-utils]
repository as the [kpt live apply] command.

Kpt live apply provides additional functionality beyond what is provided by
`kubectl apply`, such as communicating back resource status and pruning
Expand All @@ -35,8 +35,6 @@ resources for deleted configuration.

## Steps

- [Topics](#topics)
- [Steps](#steps)
- [Fetch a remote package](#fetch-a-remote-package)
- [Command](#command)
- [Output](#output)
Expand Down Expand Up @@ -224,8 +222,8 @@ the resources.

## Prune resources

Resources can be deleted from the cluster by deleting them from the
resource configuration.sh
Resources can be deleted from the cluster by deleting the corresponding
resource configuration.

### Prune Command

Expand Down
8 changes: 3 additions & 5 deletions site/content/en/guides/consumer/display/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ will print arbitrary fields by providing the `--field` flag.
kpt cfg grep "spec.replicas>3" examples | kpt cfg tree --replicas
```

Grep can be used to filter resources by field values. The output of
[`kpt cfg grep`][kpt cfg grep] is the matching full resource configuration, which
may be piped to tree for rendering.
Grep can be used to filter resources by field values. The output of [`kpt cfg
grep`][kpt cfg grep] is the matching full resource configuration, which may be
piped to [`kpt cfg tree`][kpt cfg tree] for rendering.

### Filter Output

Expand All @@ -194,8 +194,6 @@ may be piped to tree for rendering.
<!-- @catCockroachdb @verifyGuides-->
```sh
kpt cfg cat examples/cockroachdb
# Temporary workaround for https://github.com/GoogleContainerTools/kpt/issues/1050
echo "\n"
```

The raw YAML configuration may be dumped using [`kpt cfg cat`][kpt cfg cat].
Expand Down
6 changes: 3 additions & 3 deletions site/content/en/guides/consumer/function/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Run the function:
kpt fn run . --image gcr.io/kpt-functions/label-namespace -- label_name=color label_value=orange
```

Arguments specified after `--` will be provided to the function as a
`ConfigMap` input containing `data: {label_name: color, label_value: orange}`.
This is used to parameterize the behavior of the function.
Arguments specified after `--` will be provided as input to the function as a
`ConfigMap` containing `data: {label_name: color, label_value: orange}`. This
is used to parameterize the behavior of the function.

If the package directory `.` is not specified, the source will default to STDIN
and sink will default to STDOUT.
Expand Down
5 changes: 3 additions & 2 deletions site/content/en/guides/consumer/function/export/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ description: >
Export config files for different workflow orchestrators that run kpt functions
---

`kpt fn export` reduces the work to run kpt functions in workflow orchestrators. It allows to export a workflow pipeline that runs kpt functions alongside necessary configurations. The generated pipeline files can be easily integrated into the existing one manually.
`kpt fn export` reduces the work to run kpt functions in workflow orchestrators. It exports a workflow pipeline that runs kpt functions alongside necessary configurations. The generated pipeline files can be easily integrated into an existing one manually.

## Examples

These quickstarts cover how to exporting workflow config files for different orchestrators:
These quickstarts cover how to export workflow config files for different
orchestrators:

- [GitHub Actions]
- [GitLab CI]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ steps:

## Viewing the result on Cloud Build

Run this command will trigger a build:
Running this command will trigger a build:

```
gcloud builds submit .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Now you can manually copy and paste the `kpt` field in the `.gitlab-ci.yml` file

If you don’t have one yet, you can simply copy and paste the file to the root of your repo. It is fully functional.

If you want to see the diff after running kpt functions, append a `after_sciprt` field to run `kpt pkg diff`. Your final `.gitlab-ci.yaml` file looks like this:
If you want to see the diff after running kpt functions, append an `after_script` field to run `kpt pkg diff`. Your final `.gitlab-ci.yaml` file looks like this:

```yaml
stages:
Expand All @@ -100,7 +100,7 @@ git commit -am 'Init pipeline'
git push --set-upstream origin master
```

Once the changes are committed and pushed to GitLab, you can see the latest jon on GitLab CI like this:
Once the changes are committed and pushed to GitLab, you can see the latest job on GitLab CI like this:

{{< png src="images/fn-export/gitlab-ci-result" >}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
Export a Tekton pipeline that runs kpt functions
---

In this tutorial, you will pull an example package that declares Kubernetes resources and two kpt functions. Then you will export a pipeline that runs the functions against the resources on [Tekton] and modify it to make it fully functional. How to setting up Tekton is also included if you don't have one running yet. This tutorial takes about 20 minutes.
In this tutorial, you will pull an example package that declares Kubernetes resources and two kpt functions. Then you will export a pipeline that runs the functions against the resources on [Tekton] and modify it to make it fully functional. Setting up Tekton is also covered if you don't have one running yet. This tutorial takes about 20 minutes.

{{% pageinfo color="info" %}}
A kpt version `v0.32.0` or higher is required.
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/guides/consumer/get/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ the [kpt live] command.

## View the applied package

Once applied to the cluster, the remote resources can be displayed using
the common tools such as `kubectl get`.
Once applied to the cluster, the remote resources can be displayed using common
tools such as `kubectl get`.

### Applied Package Command

Expand Down
6 changes: 3 additions & 3 deletions site/content/en/guides/consumer/subpackages/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The primary package artifacts are Kubernetes resource configuration

### List package contents in a tree structure

Once you fetch the package onto local list its contents using [tree] command.
List the local package contents using the [tree] command.

```sh
kpt cfg tree wordpress/
Expand Down Expand Up @@ -75,8 +75,8 @@ further view and understand the package contents.

### List setters in the package

The fetched package contains [setters]. Invoke [list-setters] command to list
the [setters] recursively in all the packages.
The fetched package contains [setters]. Invoke the [list-setters] command to
list the [setters] recursively in all the packages.

```sh
kpt cfg list-setters wordpress/
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/guides/consumer/substitute/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Substitute a values into fields"
title: "Substitute values into fields"
linkTitle: "Substitute"
weight: 4
type: docs
Expand Down
11 changes: 5 additions & 6 deletions site/content/en/guides/consumer/update/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ See [update strategies] for more choices on how to merge upstream changes.
Following is a short explanation of the command that will be demonstrated
in this guide.

- Copy the staging/cockroachdb subdirectory out of the [kubernetes examples] git repo
- Copy the staging/cockroachdb subdirectory out of the [kubernetes examples]
git repo
- Edit the local package contents
- Commit the changes
- Update the local package with upstream changes from a new version
Expand All @@ -56,9 +57,6 @@ in this guide.

## Steps

- [Topics](#topics)
- [`kpt pkg update` explained](#kpt-pkg-update-explained)
- [Steps](#steps)
- [Fetch a remote package](#fetch-a-remote-package)
- [Fetch Command](#fetch-command)
- [Fetch Output](#fetch-output)
Expand All @@ -74,8 +72,8 @@ in this guide.

## Fetch a remote package

Packages can be fetched at specific versions defined by git tags, and have
updated to later versions to merge in upstream changes.
Packages can be fetched at specific versions defined by git tags, and then
updated to later versions by merging in upstream changes.

### Initialize local Repository

Expand Down Expand Up @@ -302,3 +300,4 @@ and local modifications (additional environment variable).

[kpt pkg update]: ../../../reference/pkg/update/
[update strategies]: ../../../reference/pkg/update/#flags
[kubernetes examples]: https://github.com/kubernetes/examples

0 comments on commit 7fba032

Please sign in to comment.