Skip to content

Commit

Permalink
Flatten catalogs with parent function information.
Browse files Browse the repository at this point in the history
  • Loading branch information
etefera committed Sep 11, 2020
1 parent 1f5ac47 commit 61ba7f9
Show file tree
Hide file tree
Showing 28 changed files with 44 additions and 87 deletions.
11 changes: 6 additions & 5 deletions site/content/en/concepts/functions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ specifically:

- **Configuration as data:** enables us to programmatically manipulate
configurations using stateless programs called _functions_.
- **Unix philosophy:** inspires us to develop a [catalog] of useful,
- **Unix philosophy:** inspires us to develop a catalog of useful,
interoperable functions which implement the
[Configuration Functions Specification][spec].

Expand Down Expand Up @@ -68,7 +68,8 @@ A Source Function takes no `input`:
{{< png src="images/source" >}}

Instead, the function typically produces the `output` by reading configurations
from an external system (e.g. reading files from a filesystem).
from an external system (e.g. reading files from a filesystem). Find examples in
the [sources catalog].

### Sink Function

Expand All @@ -77,7 +78,7 @@ A Sink Function produces no `output`:
{{< png src="images/sink" >}}

Instead, the function typically writes configurations to an external system
(e.g. writing files to a filesystem).
(e.g. writing files to a filesystem). Find examples in the [sinks catalog].

### Pipeline

Expand All @@ -93,11 +94,11 @@ pipeline. Get detailed tutorials on how to use `kpt fn export` from the
## Next Steps

- Get a quickstart on writing functions from the [function producer docs].
- See more examples of functions in the functions [catalog].
- Learn more ways of using the `kpt fn` command from the [reference] doc.

[architecture influences]: ../architecture/#influences
[catalog]: ../../guides/consumer/function/catalog/
[sources catalog]: ../../guides/consumer/function/sources
[sinks catalog]: ../../guides/consumer/function/sinks
[spec]: https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md
[Export a Workflow]: ../../guides/consumer/function/export/
[function producer docs]: ../../guides/producer/functions/
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/faq/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ A: [Please reach out!][contact]
[declarative application management in kubernetes]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/declarative-application-management.md
[setters]: ../reference/cfg/set/
[functions]: ../reference/fn/run/
[source functions]: ../guides/consumer/function/catalog/#sources
[source functions]: ../guides/consumer/function/sources
[Functions User Guide]: ../guides/consumer/function/
[updating]: ../reference/pkg/update/
[gcr.io/kpt-dev/kpt]: https://gcr.io/kpt-dev/kpt
Expand Down
9 changes: 9 additions & 0 deletions site/content/en/guides/consumer/function/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Either way, `kpt fn run` will
4. write the function(s) output back to the package directory; creating,
deleting, or updating resources

This repository documents a catalog of functions implementing the
[Configuration Functions Specification][spec].

Implement configuration functions using any toolchain such as the
[Typescript SDK][ts sdk] or [Golang Libraries][go libs].

### Imperative Run

Functions can be run imperatively by specifying the `--image` flag.
Expand Down Expand Up @@ -166,3 +172,6 @@ Here, rather than specifying `gcr.io/kpt-functions/label-namespace` using the
[function producer docs]: ../../producer/functions/
[functions concepts]: ../../../concepts/functions/
[reference]: ../../../reference/fn/run/
[spec]: https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md
[ts sdk]: ../../producer/functions/ts/
[go libs]: ../../producer/functions/golang/
29 changes: 0 additions & 29 deletions site/content/en/guides/consumer/function/catalog/_index.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ function tableByType(type) {

const descriptions = {
"source": `
A Source Function takes no \`input\`:
A Source takes no \`input\`:
{{< png src="images/source" >}}
Instead, the function typically produces the \`output\` by reading configurations
from an external system (e.g. reading files from a filesystem).
`,
"sink": `
A Sink Function produces no \`output\`:
A Sink produces no \`output\`:
{{< png src="images/sink" >}}
Expand All @@ -48,8 +48,8 @@ Instead, the function typically writes configurations to an external system
const name = process.argv[2]

const README = `---
title: "${name} Functions Catalog"
linkTitle: "${name} Functions Catalog"
title: "${name} Catalog"
linkTitle: "${name}s"
type: docs
description: >
Catalog of ${name} Functions.
Expand All @@ -65,9 +65,7 @@ ${tableByType(name.toLowerCase())}
## Next Steps
- Learn more ways of using the kpt fn command from the [reference] doc.
- Get a quickstart on writing functions from the [function producer docs].
[reference]: ../../../../reference/fn/run/
[function producer docs]: ../../../producer/functions/`;
[reference]: ../../../../reference/fn/run/`;

console.log(README);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Then you will get an `example-package` directory:

- `resources/resources.yaml`: declares a `Deployment` and a `Namespace`.
- `resources/constraints/`: declares constraints used by the `gatekeeper-validate` function.
- `functions.yaml`: runs two functions from [Kpt Functions Catalog] declaratively:
- `functions.yaml`: runs two functions declaratively:
- `gatekeeper-validate` enforces constraints over all resources.
- `label-namespace` adds a label to all Namespaces.

Expand Down Expand Up @@ -150,4 +150,3 @@ Once local changes are pushed, you can see how the pipeline fails on CircleCI.

[CircleCI]: https://circleci.com/
[Getting Started Introduction]: https://circleci.com/docs/2.0/getting-started/#section=getting-started
[Kpt Functions Catalog]: ../../catalog
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Then you will get an `example-package` directory:

- `resources/resources.yaml`: declares a `Deployment` and a `Namespace`.
- `resources/constraints/`: declares constraints used by the `gatekeeper-validate` function.
- `functions.yaml`: runs two functions from [Kpt Functions Catalog] declaratively:
- `functions.yaml`: runs two functions declaratively:
- `gatekeeper-validate` enforces constraints over all resources.
- `label-namespace` adds a label to all Namespaces.

Expand Down Expand Up @@ -104,5 +104,4 @@ Submit again, then view how the pipeline fails on Cloud Build.

[Cloud Build]: https://cloud.google.com/cloud-build
[Cloud Build Quickstarts]: https://cloud.google.com/cloud-build/docs/quickstarts
[Kpt Functions Catalog]: ../../catalog
[Build History]: https://console.cloud.google.com/cloud-build/builds
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Then you will get an `example-package` directory:

- `resources/resources.yaml`: declares a `Deployment` and a `Namespace`.
- `resources/constraints/`: declares constraints used by the `gatekeeper-validate` function.
- `functions.yaml`: runs two functions from [Kpt Functions Catalog] declaratively:
- `functions.yaml`: runs two functions declaratively:
- `gatekeeper-validate` enforces constraints over all resources.
- `label-namespace` adds a label to all Namespaces.

Expand Down Expand Up @@ -127,4 +127,3 @@ Once local changes are pushed, you can see how the pipeline fails on GitHub Acti

[GitHub Actions]: https://github.com/features/actions
[How to Configure a Workflow]: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow
[Kpt Functions Catalog]: ../../catalog
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Then you will get an `example-package` directory:

- `resources/resources.yaml`: declares a `Deployment` and a `Namespace`.
- `resources/constraints/`: declares constraints used by the `gatekeeper-validate` function.
- `functions.yaml`: runs two functions from [Kpt Functions Catalog] declaratively:
- `functions.yaml`: runs two functions declaratively:
- `gatekeeper-validate` enforces constraints over all resources.
- `label-namespace` adds a label to all Namespaces.

Expand Down Expand Up @@ -112,4 +112,3 @@ Once local changes are pushed, you can see how the pipeline fails on GitLab CI.

[GitLab CI]: https://docs.gitlab.com/ee/ci/
[Getting Started with GitLab CI]: https://docs.gitlab.com/ee/ci/quick_start/README.html
[Kpt Functions Catalog]: ../../catalog
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Then you will get an `example-package` directory:

- `resources/resources.yaml`: declares a `Deployment` and a `Namespace`.
- `resources/constraints/`: declares constraints used by the `gatekeeper-validate` function.
- `functions.yaml`: runs two functions from [Kpt Functions Catalog] declaratively:
- `functions.yaml`: runs two functions declaratively:
- `gatekeeper-validate` enforces constraints over all resources.
- `label-namespace` adds a label to all Namespaces.

Expand Down Expand Up @@ -164,7 +164,6 @@ Once local changes are pushed, build again on Jenkins, then you can see how it f

[Jenkins]: https://www.jenkins.io/
[tutorial]: https://www.jenkins.io/doc/tutorials/
[Kpt Functions Catalog]: ../../catalog
[page]: ./creating_a_jenkins_instance_on_gcp
[Marketplace]: https://console.cloud.google.com/marketplace/browse?q=jenkins&filter=solution-type:vm&filter=price:free
[agent]: https://www.jenkins.io/doc/book/glossary/#agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Then you will get an `example-package` directory:

- `resources/resources.yaml`: declares a `Deployment` and a `Namespace`.
- `resources/constraints/`: declares constraints used by the `gatekeeper-validate` function.
- `functions.yaml`: runs two functions from [Kpt Functions Catalog] declaratively:
- `functions.yaml`: runs two functions declaratively:
- `gatekeeper-validate` enforces constraints over all resources.
- `label-namespace` adds a label to all Namespaces.

Expand Down Expand Up @@ -251,7 +251,6 @@ Once local changes are pushed, run the pipeline again, then you can see how it f
[Tekton]: https://tekton.dev/
[Getting Started]: https://tekton.dev/docs/getting-started/
[Kpt Functions Catalog]: ../../catalog
[prerequisites]: https://tekton.dev/docs/getting-started#prerequisites
[Create a Kubernetes cluster]: https://cloud.google.com/kubernetes-engine/docs/quickstart
[Git Tasks]: https://github.com/tektoncd/catalog/tree/v1beta1/git
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Generator Functions Catalog"
linkTitle: "Generator Functions Catalog"
title: "Generator Catalog"
linkTitle: "Generators"
type: docs
description: >
Catalog of Generator Functions.
Expand All @@ -21,7 +21,5 @@ DO NOT EDIT. Generated by: "cd ../catalog; npm run gen-docs"
## Next Steps

- Learn more ways of using the kpt fn command from the [reference] doc.
- Get a quickstart on writing functions from the [function producer docs].

[reference]: ../../../../reference/fn/run/
[function producer docs]: ../../../producer/functions/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Sink Functions Catalog"
linkTitle: "Sink Functions Catalog"
title: "Sink Catalog"
linkTitle: "Sinks"
type: docs
description: >
Catalog of Sink Functions.
Expand All @@ -9,7 +9,7 @@ description: >
DO NOT EDIT. Generated by: "cd ../catalog; npm run gen-docs"
-->

A Sink Function produces no `output`:
A Sink produces no `output`:

{{< png src="images/sink" >}}

Expand All @@ -26,7 +26,5 @@ Instead, the function typically writes configurations to an external system
## Next Steps

- Learn more ways of using the kpt fn command from the [reference] doc.
- Get a quickstart on writing functions from the [function producer docs].

[reference]: ../../../../reference/fn/run/
[function producer docs]: ../../../producer/functions/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Source Functions Catalog"
linkTitle: "Source Functions Catalog"
title: "Source Catalog"
linkTitle: "Sources"
type: docs
description: >
Catalog of Source Functions.
Expand All @@ -9,7 +9,7 @@ description: >
DO NOT EDIT. Generated by: "cd ../catalog; npm run gen-docs"
-->

A Source Function takes no `input`:
A Source takes no `input`:

{{< png src="images/source" >}}

Expand All @@ -29,7 +29,5 @@ from an external system (e.g. reading files from a filesystem).
## Next Steps

- Learn more ways of using the kpt fn command from the [reference] doc.
- Get a quickstart on writing functions from the [function producer docs].

[reference]: ../../../../reference/fn/run/
[function producer docs]: ../../../producer/functions/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Transformer Functions Catalog"
linkTitle: "Transformer Functions Catalog"
title: "Transformer Catalog"
linkTitle: "Transformers"
type: docs
description: >
Catalog of Transformer Functions.
Expand All @@ -25,7 +25,5 @@ DO NOT EDIT. Generated by: "cd ../catalog; npm run gen-docs"
## Next Steps

- Learn more ways of using the kpt fn command from the [reference] doc.
- Get a quickstart on writing functions from the [function producer docs].

[reference]: ../../../../reference/fn/run/
[function producer docs]: ../../../producer/functions/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Validator Functions Catalog"
linkTitle: "Validator Functions Catalog"
title: "Validator Catalog"
linkTitle: "Validators"
type: docs
description: >
Catalog of Validator Functions.
Expand All @@ -24,7 +24,5 @@ DO NOT EDIT. Generated by: "cd ../catalog; npm run gen-docs"
## Next Steps

- Learn more ways of using the kpt fn command from the [reference] doc.
- Get a quickstart on writing functions from the [function producer docs].

[reference]: ../../../../reference/fn/run/
[function producer docs]: ../../../producer/functions/
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ code .
In `src/my_func.ts`, implement the `KptFunc` interface from the [TS SDK API].
Take a look at these [demo functions] to better understand how
to use the typescript library. These functions are available as container
images documented in the [catalog].
to use the typescript library.
Once you've written some code, build the package with:
Expand Down Expand Up @@ -301,6 +300,5 @@ npm run kpt:docker-build -- --tag=latest
[VSCode]: https://code.visualstudio.com/
[TS SDK API]: https://googlecontainertools.github.io/kpt-functions-sdk/api/
[demo functions]: https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/
[catalog]: ../../../../consumer/function/catalog/
[run functions]: ../../../../consumer/function/
[functions concepts]: ../../../../../concepts/functions/
2 changes: 0 additions & 2 deletions site/content/en/reference/fn/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ See the [Functions Developer Guide] for more on producing functions.
- Learn how to [run functions].
- Find out how to structure a pipeline of functions from the
[functions concepts] page.
- See more examples of functions in the functions [catalog].

[Functions Developer Guide]: ../../guides/producer/functions/
[catalog]: ../../guides/consumer/function/catalog/
[Typescript SDK]: ../../guides/producer/functions/ts/
[sdk-ts-examples]: https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/
[Golang Libraries]: ../../guides/producer/functions/golang/
Expand Down
2 changes: 0 additions & 2 deletions site/content/en/reference/fn/run/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ because:
## Next Steps
* See more examples of functions in the [functions catalog].
* Get a quickstart on writing functions from the [function producer docs].
* Find out how to structure a pipeline of functions from the
[functions concepts] page.
Expand All @@ -398,6 +397,5 @@ because:
[Issue 823]: https://github.com/GoogleContainerTools/kpt/issues/823/
[Issue 824]: https://github.com/GoogleContainerTools/kpt/issues/824/
[Issue 757]: https://github.com/GoogleContainerTools/kpt/issues/757/
[functions catalog]: ../../../guides/consumer/function/catalog/
[function producer docs]: ../../../guides/producer/functions/
[functions concepts]: ../../../concepts/functions/
Loading

0 comments on commit 61ba7f9

Please sign in to comment.