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
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The best place to get started and learn about specific features of kpt is to vis

## Install kpt

kpt installation instructions can be found on [kpt.dev/installation](https://kpt.dev/installation/)
kpt installation instructions can be found on [kpt.dev/installation](https://github.com/kptdev/kpt/blob/main/documentation/content/en/installation/kpt-cli.md)

## kpt components

Expand All @@ -45,31 +45,14 @@ The kpt toolchain includes the following components:
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 SDKs**](https://github.com/kptdev/krm-functions-sdk): Any general-purpose or domain-specific language can
- [**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](https://kpt.dev/book/05-developing-functions/02-developing-in-Go).
simplify the function authoring process in [Go](https://kpt.dev/book/05-developing-functions/#developing-in-Go).

- [**Function catalog**](https://github.com/kptdev/krm-functions-catalog): A [catalog](https://catalog.kpt.dev/) of
- [**Function catalog**](https://github.com/kptdev/krm-functions-catalog): A [catalog](https://catalog.kpt.dev/function-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 transformation, the functions need to be idempotent.

- **Package orchestrator**:
The [package orchestrator](https://github.com/kptdev/kpt/blob/main/docs/design-docs/07-package-orchestration.md)
enables the magic behind the unique WYSIWYG experience. It provides a control plane for creating,
modifying, updating, and deleting packages, and evaluating functions on package data. This enables operations on packaged resources
similar to operations directly on the live state through the Kubernetes API.

- **Config Sync**: While the package orchestrator
can be used with any GitOps tool, [Config Sync](https://github.com/kptdev/kpt-config-sync) provides a reference GitOps implementation to complete the WYSIWYG management
experience and enable end-to-end development of new features, such as
[OCI-based packages](https://github.com/kptdev/kpt/issues/2300). Config Sync is also helping to drive improvements
in upstream Kubernetes. For instance, Config Sync is built on top of [git-sync](https://github.com/kubernetes/git-sync) and
leverages [Kustomize](https://kustomize.io) to automatically render manifests on the fly when needed. It uses the same apply
logic as the kpt CLI.

- **Backstage UI plugin**: We've created a proof-of-concept UI in the form of a [Backstage UI plugin](https://github.com/kptdev/kpt-backstage-plugins) to demonstrate the WYSIWYG experience that's possible on top of the
package orchestrator. More scenarios can be supported by implementing form-based editors for additional Kubernetes resource types.

## Roadmap

You can read about the big upcoming features in the [roadmap doc](/docs/ROADMAP.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Last updated: February 9th, 2023

Please follow the [installation](https://kpt.dev/installation/) guide for installing the latest version of kpt.
Please follow the [installation](https://kpt.dev/installation/kpt-cli/) guide for installing the latest version of kpt.

## Latest releases

Expand Down
1 change: 1 addition & 0 deletions documentation/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ prism_syntax_highlighting = false
[params.github]
repo = "https://github.com/kptdev/kpt"
branch = "main"
subdir = "documentation"

# Configure mermaid (charting) integration
[params.mermaid]
Expand Down
14 changes: 7 additions & 7 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](/installation/) 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](/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](/faq/), please [reach out](/contact/)!
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,16 +44,16 @@ kpt is an open source project and anyone can [contribute](https://github.com/kpt

# For users

To get familiar with kpt as an user the best way to start is the first four chapters of the kpt [Book](/book).
Furthermore it is useful to check the [references](/references) 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/function-catalog).

# For admins

Start with the [installation](/installation/) and with the kpt [Book](/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](/book/05-developing-functions/) of the kpt Book.
To develp krm functions, the best to start with [Chapter 5]({{< relref "book/05-developing-functions" >}}) of the kpt Book.

# For contributors

Expand Down
34 changes: 17 additions & 17 deletions documentation/content/en/book/01-getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ menu:

### kpt

[Install the kpt CLI](../../installation/) and ensure you are running **version 1.0 or later**:
Install the [kpt CLI](installation/kpt-cli):

```shell
$ kpt version
kpt version
```

### Git
Expand Down Expand Up @@ -61,21 +61,21 @@ underlying Git version control system.
First, let's fetch the _kpt package_ from Git to your local filesystem:

```shell
$ kpt pkg get https://github.com/kptdev/kpt/package-examples/nginx@v0.9
kpt pkg get https://github.com/kptdev/kpt/package-examples/nginx@v1.0.0-beta.59
```

Subsequent commands are run from the `nginx` directory:

```shell
$ cd nginx
cd nginx
```

`kpt pkg` commands provide the functionality for working with packages on Git and on your local filesystem.

Next, let's quickly view the content of the package:

```shell
$ kpt pkg tree
kpt pkg tree
Package "nginx"
├── [Kptfile] Kptfile nginx
├── [deployment.yaml] Deployment my-nginx
Expand All @@ -88,7 +88,7 @@ the kpt tool itself and is not deployed to the cluster. Later chapters will expl
Initialize a local Git repo and commit the forked copy of the package:

```shell
$ git init; git add .; git commit -m "Pristine nginx package"
git init; git add .; git commit -m "Pristine nginx package"
```

### Customize the package
Expand All @@ -102,7 +102,7 @@ You may want to manually edit the files. For example, modify the value of `spec.
your favorite editor:

```shell
$ vim deployment.yaml
vim deployment.yaml
```

#### Automating One-time Edits with Functions
Expand All @@ -116,13 +116,13 @@ the `app` key in the `spec` section of the YAML document (`spec.**.app`) and set
You can use the `kpt fn eval` command to run this mutation on your local files a single time:

```shell
$ kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/search-replace:latest -- by-path='spec.**.app' put-value=my-nginx
kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/search-replace:latest -- by-path='spec.**.app' put-value=my-nginx
```

To see what changes were made to the local package:

```shell
$ git diff
git diff
```

#### Declaratively Defining Edits
Expand Down Expand Up @@ -154,7 +154,7 @@ This function will ensure that the label `env: dev` is added to all the resource
The pipeline is executed using the `render` command:

```shell
$ kpt fn render
kpt fn render
```

Regardless of how you choose to customize the package — whether by manually editing it or running one-time functions
Expand All @@ -168,7 +168,7 @@ declared in the package are executed, and the package is ready to be applied to
First, initialize the kpt package:

```shell
$ kpt live init
kpt live init
```

This adds metadata to the `Kptfile` required to keep track of changes made
Expand All @@ -179,7 +179,7 @@ deleted together.
Apply the resources to the cluster:

```shell
$ kpt live apply --reconcile-timeout=15m
kpt live apply --reconcile-timeout=15m
```

This waits for the resources to be reconciled on the cluster by monitoring their
Expand All @@ -193,13 +193,13 @@ you want to merge the upstream changes with changes to your local package.
First, commit your local changes:

```shell
$ git add .; git commit -m "My customizations"
git add .; git commit -m "My customizations"
```

Then update to version `v0.10`:
Then update to version `latest`:

```shell
$ kpt pkg update @v0.10
kpt pkg update @latest
```

This merges the upstream changes with your local changes using a schema-aware
Expand All @@ -208,15 +208,15 @@ merge strategy.
Apply the updated resources to the cluster:

```shell
$ kpt live apply --reconcile-timeout=15m
kpt live apply --reconcile-timeout=15m
```

### Clean up

Delete the package from the cluster:

```shell
$ kpt live destroy
kpt live destroy
```

Congrats! You should now have a rough idea of what kpt is and what you can do
Expand Down
32 changes: 7 additions & 25 deletions documentation/content/en/book/02-concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ menu:
---

## What is kpt?
###

> kpt supports management of
kpt supports management of
[Configuration as Data](https://github.com/kptdev/kpt/blob/main/docs/design-docs/06-config-as-data.md).

*Configuration as Data* is an approach to management of configuration which:
Expand Down Expand Up @@ -46,31 +45,14 @@ The kpt toolchain includes the following components:
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 SDKs**: Any general-purpose or domain-specific language can be used to create functions to transform
- [**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/02-developing-in-Go).
[Go](../05-developing-functions/#developing-in-Go).

- [**Function catalog**](https://catalog.kpt.dev/): A catalog of off-the-shelf, tested functions. kpt makes
- [**Function catalog**](https://catalog.kpt.dev/function-catalog): 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
transformation, the functions need to be idempotent.

- [**Package orchestrator**](https://docs.nephio.org/docs/porch/):
The package orchestrator enables the magic behind the unique WYSIWYG experience. It provides a control plane for
creating, modifying, updating, and deleting packages, and evaluating functions on package data. This enables
operations on packaged resources similar to operations directly on the live state through the Kubernetes API.

- [**Config Sync**](https://cloud.google.com/anthos-config-management/docs/config-sync-overview): While the package
orchestrator can be used with any GitOps tool, Config Sync provides a reference GitOps implementation to complete the
WYSIWYG management experience and enable end-to-end development of new features, such as
[OCI-based packages](https://github.com/kptdev/kpt/issues/2300). Config Sync is also helping to drive improvements in
upstream Kubernetes. For instance, Config Sync is built on top of [git-sync](https://github.com/kubernetes/git-sync)
and leverages [Kustomize](https://kustomize.io) to automatically render manifests on the fly when needed. It uses the
same apply logic as the kpt CLI.

- **Backstage UI plugin**: We've created a proof-of-concept UI to demonstrate the WYSIWYG experience that's possible on
top of the package orchestrator. More scenarios can be supported by implementing form-based editors for additional
Kubernetes resource types.

## Packages

A kpt package is a bundle of configuration _data_. It is represented as a directory tree containing KRM resources using
Expand All @@ -84,13 +66,13 @@ Just as directories can be nested, a package can contain another package, called
Let's take a look at the wordpress package as an example:

```shell
$ kpt pkg get https://github.com/kptdev/kpt.git/package-examples/wordpress@v0.9
kpt pkg get https://github.com/kptdev/kpt/tree/package-examples/wordpress@v1.0.0-beta.59
```

View the package hierarchy using the `tree` command:

```shell
$ kpt pkg tree wordpress/
kpt pkg tree wordpress/
Package "wordpress"
├── [Kptfile] Kptfile wordpress
├── [service.yaml] Service wordpress
Expand Down Expand Up @@ -128,7 +110,7 @@ compatible with large corpus of existing Kubernetes configuration stored on Git
For example, `cockroachdb` is just a vanilla directory of KRM:

```shell
$ kpt pkg get https://github.com/kubernetes/examples/staging/cockroachdb
kpt pkg get https://github.com/kubernetes/examples/tree/master/_archived/cockroachdb
```

We will go into details of how to work with packages in [Chapter 3](../03-packages).
Expand Down
Loading
Loading