Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions documentation/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ kpt is a package-centric toolchain that enables a WYSIWYG configuration authorin
{{% blocks/section type="row" color="white"%}}

{{% blocks/feature icon="fas fa-download " title="Install" %}}
Get started by [installing]({{< relref "installation/kpt-cli.md" >}}) kpt.
Get started by [installing]({{% relref "installation/kpt-cli.md" %}}) kpt.
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-graduation-cap" title="Learn" %}}
Read [The kpt Book]({{< relref "book" >}}).
Read [The kpt Book]({{% relref "book" %}}).
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-info-circle" title="Ask" %}}
If your question is not a [FAQ]({{< relref "faq" >}}), please [reach out]( #communication )!
If your question is not a [FAQ]({{% relref "faq" %}}), please [reach out]( #communication )!
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-briefcase " title="Contribute" %}}
kpt is an open source project and anyone can [contribute](https://github.com/kptdev/kpt/blob/main/CONTRIBUTING.md)
Expand All @@ -44,18 +44,18 @@ kpt is an open source project and anyone can [contribute](https://github.com/kpt

# For users

To get familiar with kpt, the best way to start is with the first 4 chapters of the kpt [Book]({{< relref "book" >}}).
Furthermore it is useful to check the [references]({{< relref "reference" >}}) and the catalog of [selected krm functions](https://catalog.kpt.dev).
To get familiar with kpt, the best way to start is with the first 4 chapters of the kpt [Book]({{% relref "book" %}}).
Furthermore it is useful to check the [references]({{% relref "reference" %}}) and the catalog of [selected krm functions](https://catalog.kpt.dev).

Use our [public Dosu space](https://github.dosu.com/kptdev/kpt) to ask anything about kpt.

# For admins

Start with the [installation]({{< relref "installation" >}}) and with the kpt [Book]({{< relref "book" >}}).
Start with the [installation]({{% relref "installation" %}}) and with the kpt [Book]({{% relref "book" %}}).

# For developers

To develp krm functions, the best to start with [Chapter 5]({{< relref "book/05-developing-functions" >}}) of the kpt Book.
To develop krm functions, the best to start with [Chapter 5]({{% relref "book/05-developing-functions" %}}) of the kpt Book.

# For contributors

Expand All @@ -78,7 +78,7 @@ We are happy to get Pull Requests. Send them!

{{% blocks/feature icon="fa-brands fa-slack " title="Slack" %}}

Join us in the [#kpt](https://kubernetes.slack.com/archives/C0155NSPJSZ) channel in the [Kubernetes Slack](https://communityinviter.com/apps/kubernetes/community)!
Join us in the [#kpt](https://kubernetes.slack.com/archives/C0155NSPJSZ) channel in the [Kubernetes Slack](https://inviter.co/kubernetes)!

{{% /blocks/feature %}}
{{% blocks/feature icon="fa-solid fa-comments" title="Discussions" %}}
Expand Down
6 changes: 3 additions & 3 deletions documentation/content/en/book/01-getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ menu:

### kpt

Install the [kpt CLI](installation/kpt-cli), using the following command:
Install the [kpt CLI]({{% relref "/installation/kpt-cli" %}}), using the following command:

```shell
kpt version
Expand All @@ -39,7 +39,7 @@ Follow the [instructions](https://podman.io/getting-started/installation) to ins
If you want to set up a rootless container runtime, then [this](https://rootlesscontaine.rs/) may be a useful resource for you.

Environment variables can be used to control which container runtime to use. More details can be found in the reference
documents for [`kpt fn render`](../../reference/cli/fn/render/) and [`kpt fn eval`](../../reference/cli/fn/eval/).
documents for [`kpt fn render`]({{% relref "/reference/cli/fn/render" %}}) and [`kpt fn eval`]({{% relref "/reference/cli/fn/eval" %}}).

### Kubernetes cluster

Expand Down Expand Up @@ -105,7 +105,7 @@ vim deployment.yaml

#### Automating one-time edits with functions

The [`kpt fn`](../../reference/cli/fn/) set of commands enables you to execute programs called _kpt functions_. These programs are
The [`kpt fn`]({{% relref "/reference/cli/fn" %}}) set of commands enables you to execute programs called _kpt functions_. These programs are
packaged as containers and take YAML files as input, mutate or validate them, and then output YAML.

For example, you can use a function (`ghcr.io/kptdev/krm-functions-catalog/search-replace:latest`) to search for and replace all the occurrences of the `app` key, in the `spec` section of the YAML document (`spec.**.app`), and set the value to `my-nginx`.
Expand Down
12 changes: 6 additions & 6 deletions documentation/content/en/book/02-concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ This enables machine manipulation of configuration for Kubernetes and any infras

The kpt toolchain includes the following components:

- [**kpt CLI**](../../reference/cli/): The kpt CLI supports package and function operations, and also deployment, via
- [**kpt CLI**]({{% relref "/reference/cli" %}}): The kpt CLI supports package and function operations, and also deployment, via
either direct apply or GitOps. By keeping an inventory of deployed resources, kpt enables resource pruning, aggregated
status and observability, and an improved preview experience.

- [**Function SDK**](https://github.com/kptdev/krm-functions-sdk): Any general-purpose or domain-specific language can be used to create functions to transform
and/or validate the YAML KRM input/output format, but we provide SDKs to simplify the function authoring process, in
[Go](../05-developing-functions/#developing-in-Go).
[Go]({{% relref "/book/05-developing-functions#developing-in-Go" %}}).

- [**Function catalog**](https://catalog.kpt.dev): A catalog of off-the-shelf, tested functions. kpt makes
configuration easy to create and transform, via reusable functions. Because they are expected to be used for in-place
Expand Down Expand Up @@ -184,7 +184,7 @@ For example, `spark` is just a vanilla directory of KRM:
kpt pkg get https://github.com/kubernetes/examples/tree/master/_archived/spark
```

We will go into details of how to work with packages in [Chapter 3](../03-packages).
We will go into details of how to work with packages in [Chapter 3]({{% relref "/book/03-packages" %}}).

## Workflows

Expand Down Expand Up @@ -297,7 +297,7 @@ executed, kpt can provide the following guarantees:
out-of-band access to the host filesystem and networking.

We will discuss the KRM Functions Specification Standard in detail in
[Chapter 5](../05-developing-functions).
[Chapter 5]({{% relref "/book/05-developing-functions" %}}).
At a high level, a function execution looks like this:

![img](/images/func.svg)
Expand Down Expand Up @@ -327,7 +327,7 @@ fundamentally different approaches:
imperative invocation can be more privileged and low-level than an declarative
invocation. For example, it can have access to the host system.

We will discuss how to run functions in [Chapter 4](../04-using-functions) and how to develop functions
in [Chapter 5](../05-developing-functions).
We will discuss how to run functions in [Chapter 4]({{% relref "/book/04-using-functions" %}}) and how to develop functions
in [Chapter 5]({{% relref "/book/05-developing-functions" %}}).


16 changes: 8 additions & 8 deletions documentation/content/en/book/03-packages/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Chapter 3: Packages"
linkTitle: "Chapter 3: Packages"
description: |
[Chapter 2](../02-concepts#packages) provided a high-level conceptual explanation of a package and the package
[Chapter 2]({{% relref "/book/02-concepts#packages" %}}) provided a high-level conceptual explanation of a package and the package
lifecycle. This chapter covers working with packages in detail: how to get, explore, edit, update, and publish
packages.
toc: true
Expand All @@ -25,7 +25,7 @@ kpt pkg get https://github.com/kptdev/kpt.git/package-examples/wordpress@v1.0.0-

A package in a Git repository can be fetched by specifying a branch, tag, or commit SHA. In the above example, the tag `v1.0.0-beta.61` is specified.

See the [get command reference](../../reference/cli/pkg/get/) for usage.
See the [get command reference]({{% relref "/reference/cli/pkg/get" %}}) for usage.

The `Kptfile` contains the metadata about the origin of the forked package. Have a look at the content of the `Kptfile` on
your local filesystem:
Expand Down Expand Up @@ -151,7 +151,7 @@ Package "wordpress" (independent)
└── [service.yaml] Service wordpress-mysql
```

See the [tree command reference](../../reference/cli/pkg/tree/) for usage.
See the [tree command reference]({{% relref "/reference/cli/pkg/tree" %}}) for usage.

In addition, you can use a kpt function, such as `search-replace`, to run a query on the package. For example, to search for resources that have a field with the
`spec.selector.tier` path, use the following kpt function:
Expand Down Expand Up @@ -220,7 +220,7 @@ For example, setting a label on all the resources in the `wordpress` package can
kpt fn eval wordpress -i set-labels:latest -- env=dev
```

[Chapter 4](../04-using-functions/) discusses in detail the different ways of running the functions.
[Chapter 4]({{% relref "/book/04-using-functions" %}}) discusses in detail the different ways of running the functions.

## Rendering a package

Expand All @@ -230,7 +230,7 @@ Regardless of how you have edited the package, you need to _render_ it. Use the
kpt fn render wordpress
```

See the [render command reference](../../reference/cli/fn/render/) for command usage.
See the [render command reference]({{% relref "/reference/cli/fn/render" %}}) for command usage.

`render` is a critical step in the package lifecycle. At a high level, it performs the following steps:

Expand All @@ -242,7 +242,7 @@ See the [render command reference](../../reference/cli/fn/render/) for command u
Note that status conditions are only written for in-place renders (this is the default behavior). When using out-of-place output modes, such as `kpt fn render -o stdout` or `kpt fn render -o <dir>`,
no status condition is indicated because the package is not being updated on disk.

[Chapter 4](../04-using-functions/) discusses in detail the different ways of running the functions.
[Chapter 4]({{% relref "/book/04-using-functions" %}}) discusses in detail the different ways of running the functions.

## Updating a package

Expand Down Expand Up @@ -299,7 +299,7 @@ The `update` command updates the local `wordpress` package and the dependent `my

Several different strategies are available for handling the merge. By default, the `resource-merge` strategy is used. This performs a structural comparison of the resource using the OpenAPI schema.

See the [update command reference](../../reference/cli/pkg/update/) for usage.
See the [update command reference]({{% relref "/reference/cli/pkg/update" %}}) for usage.

### Committing the updated resources

Expand All @@ -318,7 +318,7 @@ kpt pkg init awesomeapp

This command automatically creates the `awesomeapp` directory, if it does not already exist, eliminating the need to manually create the directory beforehand.

See the [init command reference](../../reference/cli/pkg/init/) for usage.
See the [init command reference]({{% relref "/reference/cli/pkg/init" %}}) for usage.

The `info` section of the `Kptfile` contains some optional package metadata that you may want to set. These fields are not consumed by any functionality in kpt:

Expand Down
12 changes: 6 additions & 6 deletions documentation/content/en/book/04-using-functions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Chapter 4: Using functions"
linkTitle: "Chapter 4: Using functions"
description: |
[Chapter 2](../02-concepts/#functions) provided a high-level conceptual explanation of the functions. We also saw examples of how to use `fn eval` and `fn render` to
[Chapter 2]({{% relref "/book/02-concepts#functions" %}}) provided a high-level conceptual explanation of the functions. We also saw examples of how to use `fn eval` and `fn render` to
execute the functions. In this chapter, we will take a closer look at how to execute the functions using these two
two approaches.

Expand Down Expand Up @@ -84,7 +84,7 @@ Package "wordpress":
Successfully executed 3 function(s) in 2 package(s).
```

See the [render command reference](../../reference/cli/fn/render/) for usage.
See the [render command reference]({{% relref "/reference/cli/fn/render" %}}) for usage.

When you invoke the `render` command, kpt performs the following steps:

Expand Down Expand Up @@ -267,7 +267,7 @@ Using the `exec` field is not recommended, for the following two reasons:

### Specifying `functionConfig`

In [Chapter 2](../02-concepts/#functions), we saw the following conceptual representation of a function invocation:
In [Chapter 2]({{% relref "/book/02-concepts#functions" %}}), we saw the following conceptual representation of a function invocation:

![img](/images/func.svg)

Expand Down Expand Up @@ -608,7 +608,7 @@ Alternatively, for convenience, you can use the short-hand form of the above com
kpt fn eval wordpress -i set-namespace:latest -- namespace=mywordpress
```

See the [eval command reference](../../reference/cli/fn/eval/) for usage.
See the [eval command reference]({{% relref "/reference/cli/fn/eval" %}}) for usage.

This changes the resources in the `wordpress` package and the `mysql` subpackage.

Expand Down Expand Up @@ -769,8 +769,8 @@ kpt fn source wordpress \
| kpt fn sink my-wordpress
```

See the command reference for usage of the [source](../..//reference/cli/fn/source/) command and the
[sink](../../reference/cli/fn/sink/) command.
See the command reference for usage of the [source]({{% relref "/reference/cli/fn/source" %}}) command and the
[sink]({{% relref "/reference/cli/fn/sink" %}}) command.

The above pipeline can be described as follows:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Chapter 5: Developing Functions"
linkTitle: "Chapter 5: Developing Functions"

description: |
[Chapter 2](../02-concepts/#functions) provided a high-level conceptual explanation of functions. We discussed how
[Chapter 2]({{% relref "/book/02-concepts#functions" %}}) provided a high-level conceptual explanation of functions. We discussed how
this architecture enables us to develop functions in different languages, frameworks and runtimes. In this chapter,
we are going to look at different approaches to developing functions.

Expand Down Expand Up @@ -43,7 +43,7 @@ Although using executable configuration saves some time initially, it can become
an anti-pattern if it grows in complexity. We recommend limiting their use if:

- There is a small amount of logic (< 20 lines)
- You do not forsee this logic growing in complexity in the future
- You do not foresee this logic growing in complexity in the future

Otherwise, you are better off developing functions in a general-purpose language
where you can take advantage of proper abstractions and language features,
Expand Down Expand Up @@ -78,7 +78,7 @@ level-driven reconciliation model of the Kubernetes system.
### Hermetic and Unprivileged

If possible, try to formulate your function to be hermetic. We discussed this in
detail in [chapter 4](../04-using-functions#privileged-execution).
detail in [chapter 4]({{% relref "/book/04-using-functions#privileged-execution" %}}).

## Functions Specification

Expand All @@ -97,7 +97,7 @@ When kpt reads resources from disk, each resource in the `ResourceList` carries
`internal.config.kubernetes.io/path` annotation indicating its file path relative to
the package directory. When a function creates new resources, it should set this
annotation to a path relative to the same package directory. See the
[annotations reference](/reference/annotations/#path-annotation-details)
[annotations reference]({{% relref "/reference/annotations#path-annotation-details" %}})
for full details.

As an example, you can see the `ResourceList` containing resources in the
Expand Down Expand Up @@ -125,7 +125,7 @@ for writing functions that manipulate KRM. Go provides:

### Prerequisites

- [Install kpt](installation/kpt-cli/)
- [Install kpt]({{% relref "/installation/kpt-cli" %}})

- [Install Docker](https://docs.docker.com/get-docker/)

Expand All @@ -138,7 +138,7 @@ In this quickstart, we will write a function called "set-annotation" that adds a

#### Set up your project

We start from the [get-started](https://github.com/kptdev/krm-functions-sdk/tree/main/go/get-started) package int he KRM Funxtions SDK,
We start from the [get-started](https://github.com/kptdev/krm-functions-sdk/tree/main/go/get-started) package in the KRM Functions SDK,
which contains a `main.go` file with some scaffolding code.

Initialize your project.
Expand Down
14 changes: 7 additions & 7 deletions documentation/content/en/book/06-deploying-packages/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ number of pods have been created and become available.

For core kubernetes types, reconcile status is computed using hardcoded rules.
For CRDs, the status computation is based on the recommended
[convention for status fields](../../reference/schema/crd-status-convention/)
[convention for status fields]({{% relref "/reference/schema/crd-status-convention" %}})
that must be followed by custom resource publishers. If CRDs follow
these conventions, `kpt live apply` will correctly compute the reconciliation status.
`kpt` alsohas special rules for computing status for
[Config Connector resources](../../reference/schema/config-connector-status-convention/).
[Config Connector resources]({{% relref "/reference/schema/config-connector-status-convention" %}}).

Multiple resources are usually applied together and we want to know
when all of these resources have been successfully reconciled. `kpt live apply` computes
Expand Down Expand Up @@ -119,7 +119,7 @@ uses heuristics to automatically choose the namespace. In this example, all the
resources in `wordpress` package are in the `default` namespace, so it chooses
`default` for the namespace. Alternatively, you can manually configure the name
and namespace of the `ResourceGroup` resource. Refer to the
[init command reference](../../reference/cli/live/init/) for usage.
[init command reference]({{% relref "/reference/cli/live/init" %}}) for usage.

{{< warning type=warning >}}
Once a package is applied to the cluster, do not change the `ResourceGroup` CR. Doing so corrupts the association between the package and the inventory in the cluster, possibly leading to unpredictable and destructive operations.
Expand Down Expand Up @@ -166,7 +166,7 @@ deployment.apps/wordpress reconciled
6 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

Refer to the [apply command reference](../../reference/cli/live/apply/) for usage.
Refer to the [apply command reference]({{% relref "/reference/cli/live/apply" %}}) for usage.

### `ResourceGroup` CRD

Expand Down Expand Up @@ -229,7 +229,7 @@ persistentvolumeclaim/mysql-pv-claim is Current: PVC is Bound
persistentvolumeclaim/wp-pv-claim is Current: PVC is Bound
```

Refer to the [status command reference](../../reference/cli/live/status/) for usage.
Refer to the [status command reference]({{% relref "/reference/cli/live/status" %}}) for usage.

### Delete the package

Expand Down Expand Up @@ -260,7 +260,7 @@ persistentvolumeclaim/wp-pv-claim reconciled
6 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

Refer to the [destroy command reference](../../reference/cli/live/destroy/) for usage.
Refer to the [destroy command reference]({{% relref "/reference/cli/live/destroy" %}}) for usage.

## Handling Dependencies

Expand Down Expand Up @@ -349,4 +349,4 @@ service/wordpress-mysql reconciled
4 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```

See [depends-on](../../reference/annotations/depends-on/) for more information.
See [depends-on]({{% relref "/reference/annotations/depends-on" %}}) for more information.
Loading