diff --git a/AGENTS.md b/AGENTS.md
index fb4561b121..2e8205efba 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -234,7 +234,7 @@ git config --global user.name "Your Name"
### Module Generation
-If changes modify CLI documentation in documentation/content/en/reference/cli/:
+If changes modify CLI documentation in documentation/content/en/documentation/6-references/cli/:
* Run `make generate` to regenerate `internal/docs/generated/`
* Commit generated files
@@ -274,7 +274,7 @@ If changes modify CLI documentation in documentation/content/en/reference/cli/:
## Implementation Notes for Code Changes
-* **CLI Commands**: Add to `commands/` directory; use Cobra; update `documentation/content/en/reference/cli/` for documentation
+* **CLI Commands**: Add to `commands/` directory; use Cobra; update `documentation/content/en/documentation/6-references/cli/` for documentation
* **Library Code**: Place in `pkg/` for public APIs; use `internal/` for internal utilities
* **Tests**: Colocate `*_test.go` files with source; use testdata directories for fixtures
* **Generated Code**: Run `make generate` after modifying templates
diff --git a/cli/main.go b/cli/main.go
index a8d8cebbdc..612ce36916 100644
--- a/cli/main.go
+++ b/cli/main.go
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-//go:generate mdtogo ../documentation/content/en/reference/cli/live ../internal/docs/generated/livedocs --license=none --strategy=cmdDocs --recursive=true
-//go:generate mdtogo ../documentation/content/en/reference/cli/pkg ../internal/docs/generated/pkgdocs --license=none --strategy=cmdDocs --recursive=true
-//go:generate mdtogo ../documentation/content/en/reference/cli/fn ../internal/docs/generated/fndocs --license=none --strategy=cmdDocs --recursive=true
-//go:generate mdtogo ../documentation/content/en/reference/cli/alpha ../internal/docs/generated/alphadocs --license=none --strategy=cmdDocs --recursive=false
-//go:generate mdtogo ../documentation/content/en/reference/cli/alpha/sync ../internal/docs/generated/syncdocs --license=none --strategy=cmdDocs --recursive=true
-//go:generate mdtogo ../documentation/content/en/reference/cli/alpha/wasm ../internal/docs/generated/wasmdocs --license=none --strategy=cmdDocs --recursive=true
-//go:generate mdtogo ../documentation/content/en/reference/cli/_index.md ../internal/docs/generated/overview --license=none --strategy=cmdDocs
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/live ../internal/docs/generated/livedocs --license=none --strategy=cmdDocs --recursive=true
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/pkg ../internal/docs/generated/pkgdocs --license=none --strategy=cmdDocs --recursive=true
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/fn ../internal/docs/generated/fndocs --license=none --strategy=cmdDocs --recursive=true
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/alpha ../internal/docs/generated/alphadocs --license=none --strategy=cmdDocs --recursive=false
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/alpha/sync ../internal/docs/generated/syncdocs --license=none --strategy=cmdDocs --recursive=true
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/alpha/wasm ../internal/docs/generated/wasmdocs --license=none --strategy=cmdDocs --recursive=true
+//go:generate mdtogo ../documentation/content/en/documentation/6-references/cli/_index.md ../internal/docs/generated/overview --license=none --strategy=cmdDocs
package main
import (
diff --git a/documentation/README.md b/documentation/README.md
index 915792ea19..199643cc90 100644
--- a/documentation/README.md
+++ b/documentation/README.md
@@ -120,8 +120,8 @@ The token is only sent to github.com domains.
8. Links to other kpt doc pages should be absolute:
- - Correct: `[pkg]: /reference/cli/pkg/get/`
- - Incorrect: `[pkg]: ../../../reference/cli/pkg/get`
+ - Correct: `[pkg]: /documentation/6-references/cli/pkg/get/`
+ - Incorrect: `[pkg]: ../../../documentation/6-references/cli/pkg/get`
9. Flags must appear after positional args:
diff --git a/documentation/assets/scss/_sidebar-left.scss b/documentation/assets/scss/_sidebar-left.scss
index 7a253f2189..ae99dae2e8 100644
--- a/documentation/assets/scss/_sidebar-left.scss
+++ b/documentation/assets/scss/_sidebar-left.scss
@@ -53,7 +53,8 @@
&::after {
display: inline-flex;
content: '\f078';
- font-family: 'Font Awesome 5 Free';
+ font-family: $td-font-awesome-font-name;
+ font-weight: 900;
}
}
&.active-path {
diff --git a/documentation/content/en/_index.md b/documentation/content/en/_index.md
index 6852f130a5..16be048346 100644
--- a/documentation/content/en/_index.md
+++ b/documentation/content/en/_index.md
@@ -45,7 +45,7 @@ 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).
+Furthermore it is useful to check the [references]({{% relref-or "/documentation/6-references" "/reference" %}}) and the catalog of [selected krm functions](https://catalog.kpt.dev).
Use our [public Dosu space](https://app.dosu.dev/b19fb34f-d249-48ae-a3b1-2bd8ec156e41/ask) to ask anything about kpt.
diff --git a/documentation/content/en/book/01-getting-started/_index.md b/documentation/content/en/book/01-getting-started/_index.md
index 5fe7f18fd9..d0a5fb3ef2 100644
--- a/documentation/content/en/book/01-getting-started/_index.md
+++ b/documentation/content/en/book/01-getting-started/_index.md
@@ -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`]({{% relref "/reference/cli/fn/render" %}}) and [`kpt fn eval`]({{% relref "/reference/cli/fn/eval" %}}).
+documents for [`kpt fn render`]({{% relref "/documentation/6-references/cli/fn/render" %}}) and [`kpt fn eval`]({{% relref "/documentation/6-references/cli/fn/eval" %}}).
### Kubernetes cluster
@@ -105,7 +105,7 @@ vim deployment.yaml
#### Automating one-time edits with functions
-The [`kpt fn`]({{% relref "/reference/cli/fn" %}}) set of commands enables you to execute programs called _kpt functions_. These programs are
+The [`kpt fn`]({{% relref "/documentation/6-references/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`.
diff --git a/documentation/content/en/book/02-concepts/_index.md b/documentation/content/en/book/02-concepts/_index.md
index cc2f371ccb..a65806e482 100644
--- a/documentation/content/en/book/02-concepts/_index.md
+++ b/documentation/content/en/book/02-concepts/_index.md
@@ -11,346 +11,18 @@ menu:
## What is kpt?
-kpt (Kubernetes Package Transformation) supports management of Configuration as Data (CaD).
-
-*Configuration as Data* is an approach to management of configuration (incl. configuration of infrastructure, policy,
-services, applications, etc.) which:
-
-* makes configuration data the source of truth, stored separately from the live
- state
-* uses a uniform, serializable data model to represent configuration
-* separates code that acts on the configuration from the data and from packages / bundles of the data
-* abstracts configuration file structure and storage from operations that act upon the configuration data; clients
- manipulating configuration data don’t need to directly interact with storage (git, container images)
-
-This enables machine manipulation of configuration for Kubernetes and any infrastructure represented in the
-[Kubernetes Resource Model (KRM)](https://github.com/kubernetes/design-proposals-archive/blob/main/architecture/resource-management.md).
-
-
-
-### Configuration as data key principles
-
-* secrets should be stored separately, in a secret-focused storage system
-* stores a versioned history of configuration changes by change sets to bundles of related configuration data
-* relies on uniformity and consistency of the configuration format, including type metadata, to enable pattern-based
- operations on the configuration data, along the lines of duck typing
-* separates schemas for the configuration data from the data, and relies on schema information for strongly typed
- operations and to disambiguate data structures and other variations within the model
-* decouples abstractions of configuration from collections of configuration data
-* represents abstractions of configuration generators as data with schemas, like other configuration data
-* finds, filters / queries / selects, and/or validates configuration data that can be operated on by given code
- (functions)
-* finds and/or filters / queries / selects code (functions) that can operate on resource types contained within a body
- of configuration data
-* actuation (reconciliation of configuration data with live state) is separate from transformation of configuration
- data, and is driven by the declarative data model
-* transformations, particularly value propagation, are preferable to wholesale configuration generation except when the
- expansion is dramatic (say, >10x)
-* transformation input generation should usually be decoupled from propagation
-* deployment context inputs should be taken from well defined “provider context” objects
-* identifiers and references should be declarative
-* live state should be linked back to sources of truth (configuration)
-
-### Components of the kpt toolchain
-
-The kpt toolchain includes the following components:
-
-- [**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]({{% 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
- transformation, the functions need to be idempotent.
+Moved to [{{% relref "/documentation/1-overview" %}}]({{% relref "/documentation/1-overview" %}})
## Packages
-
-kpt manages KRM resources in bundles called **packages**.
-
-Off-the-shelf packages are rarely deployed without any customization. Like [kustomize](https://kustomize.io), kpt
-applies transformation **functions**, using the same
-[KRM function specification](https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md),
-but optimizes for in-place configuration transformation rather than out-of-place transformation.
-
-Validation goes hand-in-hand with customization and KRM functions can be used to automate both mutation and validation
-of resources, similar to
-[Kubernetes admission control](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/).
-
-
-
-A kpt package is a bundle of configuration _data_. It is represented as a directory tree containing KRM resources using
-YAML as the file format.
-
-A package is explicitly declared using a file named `Kptfile` containing a KRM resource of kind `Kptfile`. The Kptfile
-contains metadata about the package and is just a regular resource in the YAML format.
-
-### Kptfile Annotations
-
-The Kptfile supports annotations that control package-level behaviour:
-
-- **`kpt.dev/bfs-rendering`**: When set to `"true"`, renders the package hierarchy in breadth-first order instead of
-the default depth-first post-order.
-- **`kpt.dev/save-on-render-failure`**: When set to `"true"`, saves partially rendered resources to disk even when
-rendering fails, instead of reverting all changes. This is particularly useful for debugging render failures and is
-essential for programmatic package rendering scenarios where preserving partial progress is valuable.
-
-### Status Conditions
-The Kptfile includes a `status.conditions` field that provides a declarative way to track the execution status of kpt
-operations. This makes package management operations observable and traceable.
-
-When `kpt fn render` executes, a `Rendered` status condition is automatically added to the root Kptfile to indicate
-whether the rendering operation succeeded or failed.
-This status is recorded only for in-place renders (the default behavior).
-It is not written for out-of-place modes such as stdout (`-o stdout`), unwrap (`-o unwrap`), or
-directory output (`-o
`).
-
-**On successful render:**
-```yaml
-status:
- conditions:
- - type: Rendered
- status: "True"
- reason: RenderSuccess
-```
-
-**On failed render:**
-```yaml
-status:
- conditions:
- - type: Rendered
- status: "False"
- reason: RenderFailed
- message: |-
- pkg.render: pkg .:
- pipeline.run: must run with `--allow-exec` option to allow running function binaries
-```
-
-The status condition is recorded only in the root Kptfile, not in subpackages. The error message in failure cases
-provides details about what went wrong during the render operation.
-
-Just as directories can be nested, a package can contain another package, called a _subpackage_.
-
-Let's take a look at the wordpress package as an example:
-
-```shell
-kpt pkg get https://github.com/kptdev/kpt/package-examples/wordpress@v1.0.0-beta.59
-```
-
-View the package hierarchy using the `tree` command:
-
-```shell
-kpt pkg tree wordpress/
-Package "wordpress" (independent)
-├── [Kptfile] Kptfile wordpress
-├── [service.yaml] Service wordpress
-├── deployment
-│ ├── [deployment.yaml] Deployment wordpress
-│ └── [volume.yaml] PersistentVolumeClaim wp-pv-claim
-└── Package "mysql" (dependent)
- ├── [Kptfile] Kptfile mysql
- ├── [deployment.yaml] PersistentVolumeClaim mysql-pv-claim
- ├── [deployment.yaml] Deployment wordpress-mysql
- └── [service.yaml] Service wordpress-mysql
-```
-
-This _package hierarchy_ contains two packages:
-
-1. `wordpress` is the top-level package in the hierarchy declared using `wordpress/Kptfile`. This package contains 2
- subdirectories. `wordpress/deployment` is a regular directory used for organizing resources that belong to the
- `wordpress` package itself. The `wordpress` package contains 3 direct resources in 3 files: `service.yaml`,
- `deployment/deployment.yaml`, and `deployment/volume.yaml`.
-2. `wordpress/mysql` is a subpackage of `wordpress` package since it contains a `Kptfile`. This package contains 3
- resources in `wordpress/mysql/deployment.yaml` file.
-
-kpt uses Git as the underlying version control system. A typical workflow starts by fetching an _upstream_ package from
-a Git repository to the local filesystem using `kpt pkg` commands. All other functionality
-(i.e. `kpt fn` and `kpt live`) use the package from the local filesystem, not the remote Git repository. You may think
-of this as the _vendoring_ used by tooling for some programming languages. The main difference is that kpt is designed
-to enable you to modify the vendored package on the local filesystem and then later update the package by merging the
-local and upstream changes.
-
-There is one scenario where a Kptfile is implicit: You can use kpt to fetch any Git directory containing KRM resources,
-even if it does not contain a `Kptfile`. Effectively, you are telling kpt to treat that Git directory as a package. kpt
-automatically creates the `Kptfile` on the local filesystem to keep track of the upstream repo. This means that kpt is
-compatible with large corpus of existing Kubernetes configuration stored on Git today!
-
-For example, `spark` is just a vanilla directory of KRM:
-
-```shell
-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]({{% relref "/book/03-packages" %}}).
-
-### Local Configuration
-
-A package can contain resources that are used only during rendering and should not
-be applied to the cluster. These are called local configuration resources.
-Common examples include function configs (referenced via `configPath`) and helper
-resources used as input to pipeline functions.
-You mark a resource as local by adding the `config.kubernetes.io/local-config`
-annotation:
-
-```yaml
-metadata:
- annotations:
- config.kubernetes.io/local-config: "true"
-```
-
-When you deploy the package with `kpt live apply`, local configuration resources
-are automatically filtered out. They exist in the package solely to support the
-pipeline. See [Chapter 4]({{% relref "/book/04-using-functions" %}}) for how function configs use
-this annotation, and the
-[`local-config` annotation reference]({{% relref "/reference/annotations/local-config" %}}) for
-full details.
+Moved to [{{% relref "/documentation/2-concepts/packages" %}}]({{% relref "/documentation/2-concepts/packages" %}})
## Workflows
-In this section, we'll describe the typical workflows in kpt. We say "typical", because there is no single right way of
-using kpt. A user may choose to use some command but not another. This modularity is a key design principle. However, we
-still want to provide guidance on how the functionality could be used in real-world scenarios.
-
-A workflow in kpt can be best modelled as performing some verbs on the noun _package_. For example, when consuming an
-upstream package, the initial workflow can look like this:
-
-
-
-- **Get**: Using `kpt pkg get`
-- **Explore**: Using an editor or running commands such as `kpt pkg tree`
-- **Edit**: Customize the package either manually or automatically using `kpt fn eval`. This may involve editing the
- functions pipeline in the `Kptfile` which is executed in the next stage.
-- **Render**: Using `kpt fn render`
-
-First, you get a package from upstream. Then, you explore the content of the package to understand it better. Then you
-typically want to customize the package for you specific needs. Finally, you render the package which produces the final
-resources that can be directly applied to the cluster. Render is a required step as it ensures certain preconditions and
-postconditions hold true about the state of the package.
-
-This workflow is an iterative process. There is usually a tight Edit/Render loop in order to produce the desired
-outcome.
-
-Some time later, you may want to update to a newer version of the upstream package:
-
-
-
-- **Update**: Using `kpt pkg update`
-
-Updating the package involves merging your local changes with the changes made by the upstream package authors between
-the two specified versions. This is a resource-based merge strategy, and not a line-based merge strategy used by
-`git merge`.
-
-Instead of consuming an existing package, you can also create a package from scratch:
-
-
-
-- **Create**: Initialize a package using `kpt pkg init`. The command creates the directory if it doesn't exist.
-
-Now, let's say you have rendered the package, and want to deploy it to a cluster. The workflow
-may look like this:
-
-
-
-- **Initialize**: One-time process using `kpt live init`
-- **Preview**: Using `kpt live apply --dry-run`
-- **Apply**: Using `kpt live apply`
-- **Observe**: Using `kpt live status`
-
-First, you use dry-run to validate the resources in your package and verify that the expected
-resources will be applied and pruned. Then if that looks good, you apply the package. Afterwards,
-you may observe the status of the package on the cluster.
-
-You typically want to store the package on Git:
-
-
-
-- **Publish**: Using `git commit`
-
-The publishing flow is orthogonal to deployment flow. This allows you to act as a publisher of an
-upstream package even though you may not deploy the package personally.
+Moved to [{{% relref "/documentation/2-concepts/workflows" %}}]({{% relref "/documentation/2-concepts/workflows" %}})
## Functions
-A KRM function (formerly called a _kpt_ function_) is a containerized program that
-can perform CRUD operations on KRM resources stored on the local filesystem. kpt
-functions are the extensible mechanism to automate mutation and validation of
-KRM resources. Some example use cases:
-
-- Enforce all `Namespace` resources to have a `cost-center` label.
-- Add a label to resources based on some filtering criteria
-- Use a `Team` custom resource to generate a `Namespace` and associated
- organization-mandated defaults (e.g. `RBAC`, `ResourceQuota`, etc.) when
- bootstrapping a new team
-- Bulk transformation of all `PodSecurityPolicy` resources to improve the
- security posture.
-- Inject a sidecar container (service mesh, mysql proxy, logging) in a workload
- resource (e.g. `Deployment`)
-
-Since functions are containerized, they can encapsulate different toolchains,
-languages, and runtimes. For example, the function container image can
-encapsulate:
-
-- A binary built using kpt's official Go SDK
-- Wrap an existing KRM tool such as `kubeconform`
-- Invoke a bash script performing low-level operations
-- The interpreter for "executable configuration" such as `Starlark` or `Rego`
-
-To astute readers, this model will sound familiar: functions are the client-side
-analog to Kubernetes controllers:
-
-| | Client-side | Server-side |
-| ---------------- | ------------------------ | ----------------- |
-| **Orchestrator** | kpt | Kubernetes |
-| **Data** | YAML files on filesystem | resources on etcd |
-| **Programs** | functions | controllers |
-
-Just as Kubernetes system orchestrates server-side containers, kpt CLI
-orchestrates client-side containers operating on configuration. By standardizing
-the input and output of the function containers, and how the containers are
-executed, kpt can provide the following guarantees:
-
-- Functions are interoperable
-- Functions can be chained together
-- Functions are hermetic. For correctness, security and speed, it's desirable to
- be able to run functions hermetically without any privileges; preventing
- out-of-band access to the host filesystem and networking.
-
-We will discuss the KRM Functions Specification Standard in detail in
-[Chapter 5]({{% relref "/book/05-developing-functions" %}}).
-At a high level, a function execution looks like this:
-
-
-
-where:
-
-- `input items`: The input list of KRM resources to operate on.
-- `output items`: The output list obtained from adding, removing, or modifying
- items in the input.
-- `functionConfig`: An optional meta resource containing the arguments to this
- invocation of the function.
-- `results`: An optional meta resource emitted by the function for observability
- and debugging purposes.
-
-Naturally, functions can be chained together in a pipeline:
-
-
-
-There are two different CLI commands that execute functions corresponding to two
-fundamentally different approaches:
-
-- `kpt fn render`: Executes the pipeline of functions declared in the package
- and its subpackages. This is a declarative way to run functions.
-- `kpt fn eval`: Executes a given function on the package. The image to run and
- the `functionConfig` is specified as CLI argument. This is an imperative way
- to run functions. Since the function is provided explicitly by the user, an
- 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]({{% relref "/book/04-using-functions" %}}) and how to develop functions
-in [Chapter 5]({{% relref "/book/05-developing-functions" %}}).
+Moved to [{{% relref "/documentation/2-concepts/functions" %}}]({{% relref "/documentation/2-concepts/functions" %}})
diff --git a/documentation/content/en/book/03-packages/_index.md b/documentation/content/en/book/03-packages/_index.md
index b60b9b4124..7a4026d00e 100644
--- a/documentation/content/en/book/03-packages/_index.md
+++ b/documentation/content/en/book/03-packages/_index.md
@@ -2,7 +2,7 @@
title: "Chapter 3: Packages"
linkTitle: "Chapter 3: Packages"
description: |
- [Chapter 2]({{% relref "/book/02-concepts#packages" %}}) provided a high-level conceptual explanation of a package and the package
+ [Packages]({{% relref "/documentation/2-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
@@ -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]({{% relref "/reference/cli/pkg/get" %}}) for usage.
+See the [get command reference]({{% relref "/documentation/6-references/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:
@@ -202,7 +202,7 @@ Package "wordpress" (independent)
└── [service.yaml] Service wordpress-mysql
```
-See the [tree command reference]({{% relref "/reference/cli/pkg/tree" %}}) for usage.
+See the [tree command reference]({{% relref "/documentation/6-references/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:
@@ -224,7 +224,7 @@ Every file in a package falls into one of three categories:
`.json` file, or a file named `Kptfile`) but aren't actually valid KRM resources, such as a Helm
`values.yaml`. kpt doesn't know what to do with these, so they must be excluded one way or another,
either manually via `.krmignore` or automatically via the
- [`kpt.dev/auto-ignore-non-krm`]({{% relref "/reference/annotations/auto-ignore-non-krm" %}}) annotation
+ [`kpt.dev/auto-ignore-non-krm`]({{% relref "/documentation/6-references/annotations/auto-ignore-non-krm" %}}) annotation
described below. Like `.krmignore`, the annotation is scoped per package: a subpackage with its own
`Kptfile` does not inherit it from a parent package.
@@ -251,9 +251,9 @@ If a package contains a non-KRM file (category 3 above) that isn't excluded by `
listed above fail before doing any work, listing every such file found across the whole package tree in
one error. This applies to files that parse as YAML but aren't valid KRM; a file that isn't valid YAML at
all fails differently and isn't covered by this consolidated reporting or by the annotation below -- see
-["Malformed YAML is different, and isn't covered"]({{% relref "/reference/annotations/auto-ignore-non-krm#malformed-yaml-is-different-and-isnt-covered" %}})
+["Malformed YAML is different, and isn't covered"]({{% relref "/documentation/6-references/annotations/auto-ignore-non-krm#malformed-yaml-is-different-and-isnt-covered" %}})
for details. If you'd rather non-KRM files be skipped automatically instead of maintaining a `.krmignore`
-list by hand, see the [`kpt.dev/auto-ignore-non-krm`]({{% relref "/reference/annotations/auto-ignore-non-krm" %}})
+list by hand, see the [`kpt.dev/auto-ignore-non-krm`]({{% relref "/documentation/6-references/annotations/auto-ignore-non-krm" %}})
annotation.
## Editing a package
@@ -310,7 +310,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]({{% relref "/reference/cli/fn/render" %}}) for command usage.
+See the [render command reference]({{% relref "/documentation/6-references/cli/fn/render" %}}) for command usage.
`render` is a critical step in the package lifecycle. At a high level, it performs the following steps:
@@ -379,7 +379,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]({{% relref "/reference/cli/pkg/update" %}}) for usage.
+See the [update command reference]({{% relref "/documentation/6-references/cli/pkg/update" %}}) for usage.
### Committing the updated resources
@@ -398,7 +398,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]({{% relref "/reference/cli/pkg/init" %}}) for usage.
+See the [init command reference]({{% relref "/documentation/6-references/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:
diff --git a/documentation/content/en/book/04-using-functions/_index.md b/documentation/content/en/book/04-using-functions/_index.md
index 954028e7fc..9cc0523d99 100644
--- a/documentation/content/en/book/04-using-functions/_index.md
+++ b/documentation/content/en/book/04-using-functions/_index.md
@@ -2,7 +2,7 @@
title: "Chapter 4: Using functions"
linkTitle: "Chapter 4: Using functions"
description: |
- [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
+ [Functions]({{% relref "/documentation/2-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.
@@ -84,7 +84,7 @@ Package "wordpress":
Successfully executed 3 function(s) in 2 package(s).
```
-See the [render command reference]({{% relref "/reference/cli/fn/render" %}}) for usage.
+See the [render command reference]({{% relref "/documentation/6-references/cli/fn/render" %}}) for usage.
When you invoke the `render` command, kpt performs the following steps:
@@ -268,7 +268,7 @@ Using the `exec` field is not recommended, for the following two reasons:
### Specifying `functionConfig`
-In [Chapter 2]({{% relref "/book/02-concepts#functions" %}}), we saw the following conceptual representation of a function invocation:
+In [Functions]({{% relref "/documentation/2-concepts/functions" %}}), we saw the following conceptual representation of a function invocation:

@@ -408,7 +408,7 @@ This annotation is useful for:
- Any resource that should exist in the package but not on the cluster
For full details on the annotation schema and behavior, see the
-[`local-config` annotation reference]({{% relref "/reference/annotations/local-config" %}}).
+[`local-config` annotation reference]({{% relref "/documentation/6-references/annotations/local-config" %}}).
### Specifying function `name`
@@ -879,7 +879,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]({{% relref "/reference/cli/fn/eval" %}}) for usage.
+See the [eval command reference]({{% relref "/documentation/6-references/cli/fn/eval" %}}) for usage.
This changes the resources in the `wordpress` package and the `mysql` subpackage.
@@ -1042,8 +1042,8 @@ kpt fn source wordpress \
| kpt fn sink my-wordpress
```
-See the command reference for usage of the [source]({{% relref "/reference/cli/fn/source" %}}) command and the
-[sink]({{% relref "/reference/cli/fn/sink" %}}) command.
+See the command reference for usage of the [source]({{% relref "/documentation/6-references/cli/fn/source" %}}) command and the
+[sink]({{% relref "/documentation/6-references/cli/fn/sink" %}}) command.
The above pipeline can be described as follows:
diff --git a/documentation/content/en/book/05-developing-functions/_index.md b/documentation/content/en/book/05-developing-functions/_index.md
index ec213435c2..4929688758 100644
--- a/documentation/content/en/book/05-developing-functions/_index.md
+++ b/documentation/content/en/book/05-developing-functions/_index.md
@@ -3,7 +3,7 @@ title: "Chapter 5: Developing Functions"
linkTitle: "Chapter 5: Developing Functions"
description: |
- [Chapter 2]({{% relref "/book/02-concepts#functions" %}}) provided a high-level conceptual explanation of functions. We discussed how
+ [Functions]({{% relref "/documentation/2-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.
@@ -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]({{% relref "/reference/annotations#path-annotation-details" %}})
+[annotations reference]({{% relref "/documentation/6-references/annotations#path-annotation-details" %}})
for full details.
As an example, you can see the `ResourceList` containing resources in the
diff --git a/documentation/content/en/book/06-deploying-packages/_index.md b/documentation/content/en/book/06-deploying-packages/_index.md
index d91dd19e10..ac0304744f 100644
--- a/documentation/content/en/book/06-deploying-packages/_index.md
+++ b/documentation/content/en/book/06-deploying-packages/_index.md
@@ -66,7 +66,7 @@ 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]({{% relref "/reference/schema/crd-status-convention" %}})
+[convention for status fields]({{% relref "/documentation/6-references/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.
@@ -117,7 +117,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]({{% relref "/reference/cli/live/init" %}}) for usage.
+[init command reference]({{% relref "/documentation/6-references/cli/live/init" %}}) for usage.
{{% alert title="Warning" color="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.
@@ -131,7 +131,7 @@ Note that not all resources in the package are applied to the cluster. Resources
annotated with `config.kubernetes.io/local-config: "true"` are automatically
filtered out. These are typically function configs or helper resources used only
during rendering. The `Kptfile` itself is also excluded. For more details, see
-the [`local-config` annotation reference]({{% relref "/reference/annotations/local-config" %}}).
+the [`local-config` annotation reference]({{% relref "/documentation/6-references/annotations/local-config" %}}).
The `wordpress` package requires a `Secret` containing the mysql password.
Let's create that first:
@@ -170,7 +170,7 @@ deployment.apps/wordpress reconciled
6 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```
-Refer to the [apply command reference]({{% relref "/reference/cli/live/apply" %}}) for usage.
+Refer to the [apply command reference]({{% relref "/documentation/6-references/cli/live/apply" %}}) for usage.
### `ResourceGroup` CRD
@@ -233,7 +233,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]({{% relref "/reference/cli/live/status" %}}) for usage.
+Refer to the [status command reference]({{% relref "/documentation/6-references/cli/live/status" %}}) for usage.
### Delete the package
@@ -264,7 +264,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]({{% relref "/reference/cli/live/destroy" %}}) for usage.
+Refer to the [destroy command reference]({{% relref "/documentation/6-references/cli/live/destroy" %}}) for usage.
## Handling Dependencies
@@ -353,4 +353,4 @@ service/wordpress-mysql reconciled
4 resource(s) reconciled, 0 skipped, 0 failed to reconcile, 0 timed out
```
-See [depends-on]({{% relref "/reference/annotations/depends-on" %}}) for more information.
+See [depends-on]({{% relref "/documentation/6-references/annotations/depends-on" %}}) for more information.
diff --git a/documentation/content/en/book/08-ci-user-guide/_index.md b/documentation/content/en/book/08-ci-user-guide/_index.md
index 0d82ae4d69..ca5b0d788b 100644
--- a/documentation/content/en/book/08-ci-user-guide/_index.md
+++ b/documentation/content/en/book/08-ci-user-guide/_index.md
@@ -105,7 +105,7 @@ It is important to distinguish `kpt fn render` from `kpt fn eval`:
## Applying configuration in CI (optional and gated)
Applying configuration from CI should be treated as optional and tightly controlled to prevent accidental cluster
-changes. In most pipelines, [kpt live apply]({{% relref "/reference/cli/live/apply" %}}) runs only when a deployment is explicitly
+changes. In most pipelines, [kpt live apply]({{% relref "/documentation/6-references/cli/live/apply" %}}) runs only when a deployment is explicitly
authorized.
Run apply only under these conditions:
diff --git a/documentation/content/en/documentation/1-overview/_index.md b/documentation/content/en/documentation/1-overview/_index.md
new file mode 100644
index 0000000000..643d583c56
--- /dev/null
+++ b/documentation/content/en/documentation/1-overview/_index.md
@@ -0,0 +1,63 @@
+---
+title: "Overview"
+weight: -1
+description: >
+ kpt overview
+---
+
+## What is kpt?
+kpt (Kubernetes Package Transformation) supports management of Configuration as Data (CaD).
+
+*Configuration as Data* is an approach to management of configuration (incl. configuration of infrastructure, policy,
+services, applications, etc.) which:
+
+* makes configuration data the source of truth, stored separately from the live
+ state
+* uses a uniform, serializable data model to represent configuration
+* separates code that acts on the configuration from the data and from packages / bundles of the data
+* abstracts configuration file structure and storage from operations that act upon the configuration data; clients
+ manipulating configuration data don’t need to directly interact with storage (git, container images)
+
+This enables machine manipulation of configuration for Kubernetes and any infrastructure represented in the
+[Kubernetes Resource Model (KRM)](https://github.com/kubernetes/design-proposals-archive/blob/main/architecture/resource-management.md).
+
+
+
+### Configuration as data key principles
+
+* secrets should be stored separately, in a secret-focused storage system
+* stores a versioned history of configuration changes by change sets to bundles of related configuration data
+* relies on uniformity and consistency of the configuration format, including type metadata, to enable pattern-based
+ operations on the configuration data, along the lines of duck typing
+* separates schemas for the configuration data from the data, and relies on schema information for strongly typed
+ operations and to disambiguate data structures and other variations within the model
+* decouples abstractions of configuration from collections of configuration data
+* represents abstractions of configuration generators as data with schemas, like other configuration data
+* finds, filters / queries / selects, and/or validates configuration data that can be operated on by given code
+ (functions)
+* finds and/or filters / queries / selects code (functions) that can operate on resource types contained within a body
+ of configuration data
+* actuation (reconciliation of configuration data with live state) is separate from transformation of configuration
+ data, and is driven by the declarative data model
+* transformations, particularly value propagation, are preferable to wholesale configuration generation except when the
+ expansion is dramatic (say, >10x)
+* transformation input generation should usually be decoupled from propagation
+* deployment context inputs should be taken from well defined “provider context” objects
+* identifiers and references should be declarative
+* live state should be linked back to sources of truth (configuration)
+
+### Components of the kpt toolchain
+
+The kpt toolchain includes the following components:
+
+- [**kpt CLI**]({{% relref "/documentation/6-references/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]({{% 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
+ transformation, the functions need to be idempotent.
diff --git a/documentation/content/en/documentation/2-concepts/_index.md b/documentation/content/en/documentation/2-concepts/_index.md
new file mode 100644
index 0000000000..a8fc95788e
--- /dev/null
+++ b/documentation/content/en/documentation/2-concepts/_index.md
@@ -0,0 +1,12 @@
+---
+title: "Concepts"
+weight: 2
+description: >
+ Packages, workflows, and functions
+---
+
+kpt is organized around **packages** of Kubernetes Resource Model (KRM) configuration.
+This chapter explains what a [package]({{% relref "/documentation/2-concepts/packages" %}}) is,
+the typical [workflows]({{% relref "/documentation/2-concepts/workflows" %}}) for working with one,
+and how [functions]({{% relref "/documentation/2-concepts/functions" %}}) automate mutation and
+validation of the resources in it.
diff --git a/documentation/content/en/documentation/2-concepts/functions.md b/documentation/content/en/documentation/2-concepts/functions.md
new file mode 100644
index 0000000000..a74510a5ce
--- /dev/null
+++ b/documentation/content/en/documentation/2-concepts/functions.md
@@ -0,0 +1,86 @@
+---
+title: "Functions"
+weight: 3
+description: >
+ KRM functions
+---
+
+## Functions
+
+A KRM function (formerly called a _kpt_ function_) is a containerized program that
+can perform CRUD operations on KRM resources stored on the local filesystem. kpt
+functions are the extensible mechanism to automate mutation and validation of
+KRM resources. Some example use cases:
+
+- Enforce all `Namespace` resources to have a `cost-center` label.
+- Add a label to resources based on some filtering criteria
+- Use a `Team` custom resource to generate a `Namespace` and associated
+ organization-mandated defaults (e.g. `RBAC`, `ResourceQuota`, etc.) when
+ bootstrapping a new team
+- Bulk transformation of all `PodSecurityPolicy` resources to improve the
+ security posture.
+- Inject a sidecar container (service mesh, mysql proxy, logging) in a workload
+ resource (e.g. `Deployment`)
+
+Since functions are containerized, they can encapsulate different toolchains,
+languages, and runtimes. For example, the function container image can
+encapsulate:
+
+- A binary built using kpt's official Go SDK
+- Wrap an existing KRM tool such as `kubeconform`
+- Invoke a bash script performing low-level operations
+- The interpreter for "executable configuration" such as `Starlark` or `Rego`
+
+To astute readers, this model will sound familiar: functions are the client-side
+analog to Kubernetes controllers:
+
+| | Client-side | Server-side |
+| ---------------- | ------------------------ | ----------------- |
+| **Orchestrator** | kpt | Kubernetes |
+| **Data** | YAML files on filesystem | resources on etcd |
+| **Programs** | functions | controllers |
+
+Just as Kubernetes system orchestrates server-side containers, kpt CLI
+orchestrates client-side containers operating on configuration. By standardizing
+the input and output of the function containers, and how the containers are
+executed, kpt can provide the following guarantees:
+
+- Functions are interoperable
+- Functions can be chained together
+- Functions are hermetic. For correctness, security and speed, it's desirable to
+ be able to run functions hermetically without any privileges; preventing
+ out-of-band access to the host filesystem and networking.
+
+We will discuss the KRM Functions Specification Standard in detail in
+[Chapter 5]({{% relref "/book/05-developing-functions" %}}).
+At a high level, a function execution looks like this:
+
+
+
+where:
+
+- `input items`: The input list of KRM resources to operate on.
+- `output items`: The output list obtained from adding, removing, or modifying
+ items in the input.
+- `functionConfig`: An optional meta resource containing the arguments to this
+ invocation of the function.
+- `results`: An optional meta resource emitted by the function for observability
+ and debugging purposes.
+
+Naturally, functions can be chained together in a pipeline:
+
+
+
+There are two different CLI commands that execute functions corresponding to two
+fundamentally different approaches:
+
+- `kpt fn render`: Executes the pipeline of functions declared in the package
+ and its subpackages. This is a declarative way to run functions.
+- `kpt fn eval`: Executes a given function on the package. The image to run and
+ the `functionConfig` is specified as CLI argument. This is an imperative way
+ to run functions. Since the function is provided explicitly by the user, an
+ 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]({{% relref "/book/04-using-functions" %}}) and how to develop functions
+in [Chapter 5]({{% relref "/book/05-developing-functions" %}}).
diff --git a/documentation/content/en/documentation/2-concepts/packages.md b/documentation/content/en/documentation/2-concepts/packages.md
new file mode 100644
index 0000000000..dbbcce749b
--- /dev/null
+++ b/documentation/content/en/documentation/2-concepts/packages.md
@@ -0,0 +1,148 @@
+---
+title: "Packages"
+weight: 1
+description: >
+ kpt packages
+---
+
+## Packages
+
+kpt manages KRM resources in bundles called **packages**.
+
+Off-the-shelf packages are rarely deployed without any customization. Like [kustomize](https://kustomize.io), kpt
+applies transformation **functions**, using the same
+[KRM function specification](https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md),
+but optimizes for in-place configuration transformation rather than out-of-place transformation.
+
+Validation goes hand-in-hand with customization and KRM functions can be used to automate both mutation and validation
+of resources, similar to
+[Kubernetes admission control](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/).
+
+
+
+A kpt package is a bundle of configuration _data_. It is represented as a directory tree containing KRM resources using
+YAML as the file format.
+
+A package is explicitly declared using a file named `Kptfile` containing a KRM resource of kind `Kptfile`. The Kptfile
+contains metadata about the package and is just a regular resource in the YAML format.
+
+### Kptfile Annotations
+
+The Kptfile supports annotations that control package-level behaviour:
+
+- **`kpt.dev/bfs-rendering`**: When set to `"true"`, renders the package hierarchy in breadth-first order instead of
+the default depth-first post-order.
+- **`kpt.dev/save-on-render-failure`**: When set to `"true"`, saves partially rendered resources to disk even when
+rendering fails, instead of reverting all changes. This is particularly useful for debugging render failures and is
+essential for programmatic package rendering scenarios where preserving partial progress is valuable.
+
+### Status Conditions
+The Kptfile includes a `status.conditions` field that provides a declarative way to track the execution status of kpt
+operations. This makes package management operations observable and traceable.
+
+When `kpt fn render` executes, a `Rendered` status condition is automatically added to the root Kptfile to indicate
+whether the rendering operation succeeded or failed.
+This status is recorded only for in-place renders (the default behavior).
+It is not written for out-of-place modes such as stdout (`-o stdout`), unwrap (`-o unwrap`), or
+directory output (`-o `).
+
+**On successful render:**
+```yaml
+status:
+ conditions:
+ - type: Rendered
+ status: "True"
+ reason: RenderSuccess
+```
+
+**On failed render:**
+```yaml
+status:
+ conditions:
+ - type: Rendered
+ status: "False"
+ reason: RenderFailed
+ message: |-
+ pkg.render: pkg .:
+ pipeline.run: must run with `--allow-exec` option to allow running function binaries
+```
+
+The status condition is recorded only in the root Kptfile, not in subpackages. The error message in failure cases
+provides details about what went wrong during the render operation.
+
+Just as directories can be nested, a package can contain another package, called a _subpackage_.
+
+Let's take a look at the wordpress package as an example:
+
+```shell
+kpt pkg get https://github.com/kptdev/kpt/package-examples/wordpress@v1.0.0-beta.59
+```
+
+View the package hierarchy using the `tree` command:
+
+```shell
+kpt pkg tree wordpress/
+Package "wordpress" (independent)
+├── [Kptfile] Kptfile wordpress
+├── [service.yaml] Service wordpress
+├── deployment
+│ ├── [deployment.yaml] Deployment wordpress
+│ └── [volume.yaml] PersistentVolumeClaim wp-pv-claim
+└── Package "mysql" (dependent)
+ ├── [Kptfile] Kptfile mysql
+ ├── [deployment.yaml] PersistentVolumeClaim mysql-pv-claim
+ ├── [deployment.yaml] Deployment wordpress-mysql
+ └── [service.yaml] Service wordpress-mysql
+```
+
+This _package hierarchy_ contains two packages:
+
+1. `wordpress` is the top-level package in the hierarchy declared using `wordpress/Kptfile`. This package contains 2
+ subdirectories. `wordpress/deployment` is a regular directory used for organizing resources that belong to the
+ `wordpress` package itself. The `wordpress` package contains 3 direct resources in 3 files: `service.yaml`,
+ `deployment/deployment.yaml`, and `deployment/volume.yaml`.
+2. `wordpress/mysql` is a subpackage of `wordpress` package since it contains a `Kptfile`. This package contains 3
+ resources in `wordpress/mysql/deployment.yaml` file.
+
+kpt uses Git as the underlying version control system. A typical workflow starts by fetching an _upstream_ package from
+a Git repository to the local filesystem using `kpt pkg` commands. All other functionality
+(i.e. `kpt fn` and `kpt live`) use the package from the local filesystem, not the remote Git repository. You may think
+of this as the _vendoring_ used by tooling for some programming languages. The main difference is that kpt is designed
+to enable you to modify the vendored package on the local filesystem and then later update the package by merging the
+local and upstream changes.
+
+There is one scenario where a Kptfile is implicit: You can use kpt to fetch any Git directory containing KRM resources,
+even if it does not contain a `Kptfile`. Effectively, you are telling kpt to treat that Git directory as a package. kpt
+automatically creates the `Kptfile` on the local filesystem to keep track of the upstream repo. This means that kpt is
+compatible with large corpus of existing Kubernetes configuration stored on Git today!
+
+For example, `spark` is just a vanilla directory of KRM:
+
+```shell
+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]({{% relref "/book/03-packages" %}}).
+
+### Local Configuration
+
+A package can contain resources that are used only during rendering and should not
+be applied to the cluster. These are called local configuration resources.
+Common examples include function configs (referenced via `configPath`) and helper
+resources used as input to pipeline functions.
+
+You mark a resource as local by adding the `config.kubernetes.io/local-config`
+annotation:
+
+```yaml
+metadata:
+ annotations:
+ config.kubernetes.io/local-config: "true"
+```
+
+When you deploy the package with `kpt live apply`, local configuration resources
+are automatically filtered out. They exist in the package solely to support the
+pipeline. See [Chapter 4]({{% relref "/book/04-using-functions" %}}) for how function configs use
+this annotation, and the
+[`local-config` annotation reference]({{% relref "/documentation/6-references/annotations/local-config" %}}) for
+full details.
diff --git a/documentation/content/en/documentation/2-concepts/workflows.md b/documentation/content/en/documentation/2-concepts/workflows.md
new file mode 100644
index 0000000000..d0dbacb83a
--- /dev/null
+++ b/documentation/content/en/documentation/2-concepts/workflows.md
@@ -0,0 +1,71 @@
+---
+title: "Workflows"
+weight: 2
+description: >
+ kpt workflows
+---
+
+## Workflows
+
+In this section, we'll describe the typical workflows in kpt. We say "typical", because there is no single right way of
+using kpt. A user may choose to use some command but not another. This modularity is a key design principle. However, we
+still want to provide guidance on how the functionality could be used in real-world scenarios.
+
+A workflow in kpt can be best modelled as performing some verbs on the noun _package_. For example, when consuming an
+upstream package, the initial workflow can look like this:
+
+
+
+- **Get**: Using `kpt pkg get`
+- **Explore**: Using an editor or running commands such as `kpt pkg tree`
+- **Edit**: Customize the package either manually or automatically using `kpt fn eval`. This may involve editing the
+ functions pipeline in the `Kptfile` which is executed in the next stage.
+- **Render**: Using `kpt fn render`
+
+First, you get a package from upstream. Then, you explore the content of the package to understand it better. Then you
+typically want to customize the package for you specific needs. Finally, you render the package which produces the final
+resources that can be directly applied to the cluster. Render is a required step as it ensures certain preconditions and
+postconditions hold true about the state of the package.
+
+This workflow is an iterative process. There is usually a tight Edit/Render loop in order to produce the desired
+outcome.
+
+Some time later, you may want to update to a newer version of the upstream package:
+
+
+
+- **Update**: Using `kpt pkg update`
+
+Updating the package involves merging your local changes with the changes made by the upstream package authors between
+the two specified versions. This is a resource-based merge strategy, and not a line-based merge strategy used by
+`git merge`.
+
+Instead of consuming an existing package, you can also create a package from scratch:
+
+
+
+- **Create**: Initialize a package using `kpt pkg init`. The command creates the directory if it doesn't exist.
+
+Now, let's say you have rendered the package, and want to deploy it to a cluster. The workflow
+may look like this:
+
+
+
+- **Initialize**: One-time process using `kpt live init`
+- **Preview**: Using `kpt live apply --dry-run`
+- **Apply**: Using `kpt live apply`
+- **Observe**: Using `kpt live status`
+
+First, you use dry-run to validate the resources in your package and verify that the expected
+resources will be applied and pruned. Then if that looks good, you apply the package. Afterwards,
+you may observe the status of the package on the cluster.
+
+You typically want to store the package on Git:
+
+
+
+- **Publish**: Using `git commit`
+
+The publishing flow is orthogonal to deployment flow. This allows you to act as a publisher of an
+upstream package even though you may not deploy the package personally.
+
diff --git a/documentation/content/en/documentation/3-intallation/_index.md b/documentation/content/en/documentation/3-intallation/_index.md
new file mode 100644
index 0000000000..534a569831
--- /dev/null
+++ b/documentation/content/en/documentation/3-intallation/_index.md
@@ -0,0 +1,8 @@
+---
+title: "Installation"
+weight: 3
+description: >
+ kpt installation
+---
+
+Chapter 3 Installation
diff --git a/documentation/content/en/documentation/3-intallation/docker.md b/documentation/content/en/documentation/3-intallation/docker.md
new file mode 100644
index 0000000000..7092c6bb0a
--- /dev/null
+++ b/documentation/content/en/documentation/3-intallation/docker.md
@@ -0,0 +1,8 @@
+---
+title: "Docker"
+weight: 2
+description: >
+ kpt Docker installation
+---
+
+Installation / Docker
diff --git a/documentation/content/en/documentation/3-intallation/homebrew.md b/documentation/content/en/documentation/3-intallation/homebrew.md
new file mode 100644
index 0000000000..881faff884
--- /dev/null
+++ b/documentation/content/en/documentation/3-intallation/homebrew.md
@@ -0,0 +1,8 @@
+---
+title: "Homebrew"
+weight: 1
+description: >
+ kpt Homebrew installation
+---
+
+Installation / Homebrew
diff --git a/documentation/content/en/documentation/3-intallation/source.md b/documentation/content/en/documentation/3-intallation/source.md
new file mode 100644
index 0000000000..b1022b91ec
--- /dev/null
+++ b/documentation/content/en/documentation/3-intallation/source.md
@@ -0,0 +1,8 @@
+---
+title: "Source"
+weight: 3
+description: >
+ kpt source installation
+---
+
+Installation / Source
diff --git a/documentation/content/en/documentation/4-getting-started/_index.md b/documentation/content/en/documentation/4-getting-started/_index.md
new file mode 100644
index 0000000000..5043d1711f
--- /dev/null
+++ b/documentation/content/en/documentation/4-getting-started/_index.md
@@ -0,0 +1,8 @@
+---
+title: "Getting Started"
+weight: 4
+description: >
+ kpt getting started
+---
+
+Chapter 4 Getting Started
diff --git a/documentation/content/en/documentation/4-getting-started/quickstart.md b/documentation/content/en/documentation/4-getting-started/quickstart.md
new file mode 100644
index 0000000000..22727b7911
--- /dev/null
+++ b/documentation/content/en/documentation/4-getting-started/quickstart.md
@@ -0,0 +1,8 @@
+---
+title: "Quickstart"
+weight: 2
+description: >
+ kpt quickstart
+---
+
+Chapter 1 Getting started / Quickstart
diff --git a/documentation/content/en/documentation/4-getting-started/system-requirements.md b/documentation/content/en/documentation/4-getting-started/system-requirements.md
new file mode 100644
index 0000000000..87b80c1212
--- /dev/null
+++ b/documentation/content/en/documentation/4-getting-started/system-requirements.md
@@ -0,0 +1,8 @@
+---
+title: "System Requirements"
+weight: 1
+description: >
+ kpt system requirements
+---
+
+Chapter 1 Getting started / System requirements
diff --git a/documentation/content/en/documentation/5-guides/_index.md b/documentation/content/en/documentation/5-guides/_index.md
new file mode 100644
index 0000000000..b2f5693b3b
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/_index.md
@@ -0,0 +1,8 @@
+---
+title: "Guides"
+weight: 5
+description: >
+ kpt guides
+---
+
+Chapter 5 Guides
diff --git a/documentation/content/en/documentation/5-guides/advanced-topics/_index.md b/documentation/content/en/documentation/5-guides/advanced-topics/_index.md
new file mode 100644
index 0000000000..59c60622af
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/advanced-topics/_index.md
@@ -0,0 +1,6 @@
+---
+title: "Advanced topics"
+weight: 5
+description: >
+ Advanced topics
+---
diff --git a/documentation/content/en/documentation/5-guides/advanced-topics/tenant-onboarding.md b/documentation/content/en/documentation/5-guides/advanced-topics/tenant-onboarding.md
new file mode 100644
index 0000000000..dcd66f4370
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/advanced-topics/tenant-onboarding.md
@@ -0,0 +1,8 @@
+---
+title: "Tenant Onboarding"
+weight: 3
+description: >
+ Tenant Onboarding
+---
+
+guides/tenant-onboarding
diff --git a/documentation/content/en/documentation/5-guides/advanced-topics/understanding-3-way-merge.md b/documentation/content/en/documentation/5-guides/advanced-topics/understanding-3-way-merge.md
new file mode 100644
index 0000000000..2d4405910a
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/advanced-topics/understanding-3-way-merge.md
@@ -0,0 +1,8 @@
+---
+title: "Understanding 3-Way Merge in kpt"
+weight: 4
+description: >
+ Understanding 3-Way Merge in kpt
+---
+
+guides/3-way-merge
diff --git a/documentation/content/en/documentation/5-guides/advanced-topics/value-propagation-pattern.md b/documentation/content/en/documentation/5-guides/advanced-topics/value-propagation-pattern.md
new file mode 100644
index 0000000000..e3897f8fe7
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/advanced-topics/value-propagation-pattern.md
@@ -0,0 +1,8 @@
+---
+title: "Value Propagation Pattern"
+weight: 2
+description: >
+ Value Propagation Pattern
+---
+
+guides/value-propagation
diff --git a/documentation/content/en/documentation/5-guides/advanced-topics/variant-constructor-pattern.md b/documentation/content/en/documentation/5-guides/advanced-topics/variant-constructor-pattern.md
new file mode 100644
index 0000000000..da556619b2
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/advanced-topics/variant-constructor-pattern.md
@@ -0,0 +1,8 @@
+---
+title: "Variant Constructor Pattern"
+weight: 1
+description: >
+ Variant Constructor Pattern
+---
+
+guides/variant-constructor-pattern
diff --git a/documentation/content/en/documentation/5-guides/ci-user-guide.md b/documentation/content/en/documentation/5-guides/ci-user-guide.md
new file mode 100644
index 0000000000..6be0c83a0b
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/ci-user-guide.md
@@ -0,0 +1,8 @@
+---
+title: "CI User Guide"
+weight: 4
+description: >
+ CI user guide
+---
+
+Chapter 9: CI user guide
diff --git a/documentation/content/en/documentation/5-guides/krm-function-developer-guide.md b/documentation/content/en/documentation/5-guides/krm-function-developer-guide.md
new file mode 100644
index 0000000000..696788c503
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/krm-function-developer-guide.md
@@ -0,0 +1,8 @@
+---
+title: "KRM Function Developer Guide"
+weight: 3
+description: >
+ KRM Function Developer Guide
+---
+
+guides/krm-functions/
diff --git a/documentation/content/en/documentation/5-guides/working-with-functions/_index.md b/documentation/content/en/documentation/5-guides/working-with-functions/_index.md
new file mode 100644
index 0000000000..5c9dac6ce8
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-functions/_index.md
@@ -0,0 +1,6 @@
+---
+title: "Working with Functions"
+weight: 2
+description: >
+ Working with functions
+---
diff --git a/documentation/content/en/documentation/5-guides/working-with-functions/declarative-function-execution.md b/documentation/content/en/documentation/5-guides/working-with-functions/declarative-function-execution.md
new file mode 100644
index 0000000000..d11b48c236
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-functions/declarative-function-execution.md
@@ -0,0 +1,8 @@
+---
+title: "Declarative function execution"
+weight: 1
+description: >
+ Declarative function execution
+---
+
+Chapter 4: Using functions / Declarative function execution
diff --git a/documentation/content/en/documentation/5-guides/working-with-functions/developing-functions.md b/documentation/content/en/documentation/5-guides/working-with-functions/developing-functions.md
new file mode 100644
index 0000000000..d367f3418e
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-functions/developing-functions.md
@@ -0,0 +1,8 @@
+---
+title: "Developing Functions"
+weight: 4
+description: >
+ Developing functions
+---
+
+Chapter 5: Developing Functions
diff --git a/documentation/content/en/documentation/5-guides/working-with-functions/function-results.md b/documentation/content/en/documentation/5-guides/working-with-functions/function-results.md
new file mode 100644
index 0000000000..5bfaeee557
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-functions/function-results.md
@@ -0,0 +1,8 @@
+---
+title: "Function results"
+weight: 3
+description: >
+ Function results
+---
+
+Chapter 4: Using functions / Function results
diff --git a/documentation/content/en/documentation/5-guides/working-with-functions/imperative-function-execution.md b/documentation/content/en/documentation/5-guides/working-with-functions/imperative-function-execution.md
new file mode 100644
index 0000000000..3a4aecd55b
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-functions/imperative-function-execution.md
@@ -0,0 +1,8 @@
+---
+title: "Imperative function execution"
+weight: 2
+description: >
+ Imperative function execution
+---
+
+Chapter 4: Using functions / Imperative function execution
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/_index.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/_index.md
new file mode 100644
index 0000000000..c58884e292
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/_index.md
@@ -0,0 +1,6 @@
+---
+title: "Working with kpt packages"
+weight: 1
+description: >
+ Working with kpt packages
+---
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/composing-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/composing-a-package.md
new file mode 100644
index 0000000000..9653b550b5
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/composing-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Composing a package"
+weight: 9
+description: >
+ Composing a package
+---
+
+Chapter 3: Packages / Composing a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/creating-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/creating-a-package.md
new file mode 100644
index 0000000000..818284da39
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/creating-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Creating a package"
+weight: 8
+description: >
+ Creating a package
+---
+
+Chapter 3: Packages / Creating a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/deploying-packages.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/deploying-packages.md
new file mode 100644
index 0000000000..52939be5d6
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/deploying-packages.md
@@ -0,0 +1,8 @@
+---
+title: "Deploying packages"
+weight: 7
+description: >
+ Deploying packages
+---
+
+Chapter 6: Deploying Packages
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/editing-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/editing-a-package.md
new file mode 100644
index 0000000000..bb56246d88
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/editing-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Editing a package"
+weight: 4
+description: >
+ Editing a package
+---
+
+Chapter 3: Packages / Editing a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/excluding-files-with-krmignore.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/excluding-files-with-krmignore.md
new file mode 100644
index 0000000000..8472b4c844
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/excluding-files-with-krmignore.md
@@ -0,0 +1,8 @@
+---
+title: "Excluding files with .krmignore"
+weight: 3
+description: >
+ Excluding files with .krmignore
+---
+
+Chapter 3: Packages / Excluding files with .krmignore
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/exploring-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/exploring-a-package.md
new file mode 100644
index 0000000000..c5f687a278
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/exploring-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Exploring a package"
+weight: 2
+description: >
+ Exploring a package
+---
+
+Chapter 3: Packages / Exploring a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/getting-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/getting-a-package.md
new file mode 100644
index 0000000000..0a59369449
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/getting-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Getting a package"
+weight: 1
+description: >
+ Getting a package
+---
+
+Chapter 3: Packages / Getting a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/publishing-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/publishing-a-package.md
new file mode 100644
index 0000000000..50695c55e4
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/publishing-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Publishing a package"
+weight: 10
+description: >
+ Publishing a package
+---
+
+Chapter 3: Packages / Publishing a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/rendering-a-package.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/rendering-a-package.md
new file mode 100644
index 0000000000..57fb1582a6
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/rendering-a-package.md
@@ -0,0 +1,8 @@
+---
+title: "Rendering a package"
+weight: 5
+description: >
+ Rendering a package
+---
+
+Chapter 3: Packages / Rendering a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/updating-a-package/_index.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/updating-a-package/_index.md
new file mode 100644
index 0000000000..1245146467
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/updating-a-package/_index.md
@@ -0,0 +1,8 @@
+---
+title: "Updating a package"
+weight: 6
+description: >
+ Updating a package
+---
+
+Chapter 3: Packages / Updating a package
diff --git a/documentation/content/en/documentation/5-guides/working-with-kpt-packages/updating-a-package/effective-customizations.md b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/updating-a-package/effective-customizations.md
new file mode 100644
index 0000000000..3dc2ac0b03
--- /dev/null
+++ b/documentation/content/en/documentation/5-guides/working-with-kpt-packages/updating-a-package/effective-customizations.md
@@ -0,0 +1,8 @@
+---
+title: "Effective Customizations"
+weight: 1
+description: >
+ Effective customizations
+---
+
+Chapter 7: Effective Customizations
diff --git a/documentation/content/en/documentation/6-references/_index.md b/documentation/content/en/documentation/6-references/_index.md
new file mode 100644
index 0000000000..52e700f9af
--- /dev/null
+++ b/documentation/content/en/documentation/6-references/_index.md
@@ -0,0 +1,14 @@
+---
+title: "References"
+weight: 6
+description: >
+ kpt references
+aliases:
+ - /reference/
+---
+
+Chapter 6 References
+
+- [CLI Reference]({{% relref "/documentation/6-references/cli" %}})
+- [Schema Reference]({{% relref "/documentation/6-references/schema" %}})
+- [Annotations Reference]({{% relref "/documentation/6-references/annotations" %}})
diff --git a/documentation/content/en/reference/annotations/_index.md b/documentation/content/en/documentation/6-references/annotations/_index.md
similarity index 82%
rename from documentation/content/en/reference/annotations/_index.md
rename to documentation/content/en/documentation/6-references/annotations/_index.md
index 7be50341c3..25b16da238 100644
--- a/documentation/content/en/reference/annotations/_index.md
+++ b/documentation/content/en/documentation/6-references/annotations/_index.md
@@ -2,11 +2,8 @@
title: Annotations Reference
linkTitle: Annotations Reference
description:
-toc_hide: true
-menu:
- main:
- parent: "References"
- weight: 30
+aliases:
+ - /reference/annotations/
---
The following annotations are used to configure kpt features:
@@ -40,7 +37,6 @@ relative to the root package before writing to disk.
For `kpt fn eval DIR`, the path is relative to the package directory DIR
(the directory passed as the evaluation target).
-[config.kubernetes.io/depends-on]: /reference/annotations/depends-on/
-[config.kubernetes.io/apply-time-mutation]: /reference/annotations/apply-time-mutation/
-[config.kubernetes.io/local-config]: /reference/annotations/local-config/
-[kpt.dev/auto-ignore-non-krm]: /reference/annotations/auto-ignore-non-krm/
+[config.kubernetes.io/depends-on]: /documentation/6-references/annotations/depends-on/
+[config.kubernetes.io/apply-time-mutation]: /documentation/6-references/annotations/apply-time-mutation/
+[config.kubernetes.io/local-config]: /documentation/6-references/annotations/local-config/
diff --git a/documentation/content/en/reference/annotations/apply-time-mutation/_index.md b/documentation/content/en/documentation/6-references/annotations/apply-time-mutation/_index.md
similarity index 94%
rename from documentation/content/en/reference/annotations/apply-time-mutation/_index.md
rename to documentation/content/en/documentation/6-references/annotations/apply-time-mutation/_index.md
index 6bbda94884..eaa8c8ee4f 100644
--- a/documentation/content/en/reference/annotations/apply-time-mutation/_index.md
+++ b/documentation/content/en/documentation/6-references/annotations/apply-time-mutation/_index.md
@@ -4,6 +4,8 @@ linkTitle: "apply-time-mutation"
description: |
Specify one or more substitutions to make at apply time using dependencies as input.
+aliases:
+ - /reference/annotations/apply-time-mutation/
---
The `config.kubernetes.io/apply-time-mutation` annotation specifies one or more
@@ -219,6 +221,6 @@ pod/pod-a deleted
1 resource(s) deleted, 0 skipped
```
-[Substitution]: /reference/annotations/apply-time-mutation/#substitution
-[ObjectReference]: /reference/annotations/apply-time-mutation/#objectreference
-[JSONPath]: /reference/annotations/apply-time-mutation/#jsonpath-syntax
+[Substitution]: /documentation/6-references/annotations/apply-time-mutation/#substitution
+[ObjectReference]: /documentation/6-references/annotations/apply-time-mutation/#objectreference
+[JSONPath]: /documentation/6-references/annotations/apply-time-mutation/#jsonpath-syntax
diff --git a/documentation/content/en/reference/annotations/auto-ignore-non-krm/_index.md b/documentation/content/en/documentation/6-references/annotations/auto-ignore-non-krm/_index.md
similarity index 97%
rename from documentation/content/en/reference/annotations/auto-ignore-non-krm/_index.md
rename to documentation/content/en/documentation/6-references/annotations/auto-ignore-non-krm/_index.md
index c99875cbd7..96fae4f9b2 100644
--- a/documentation/content/en/reference/annotations/auto-ignore-non-krm/_index.md
+++ b/documentation/content/en/documentation/6-references/annotations/auto-ignore-non-krm/_index.md
@@ -130,7 +130,7 @@ actually contains the non-KRM file, for that file to be skipped.
`kpt fn render` additionally records which files were skipped in the
root `Kptfile`'s `status.conditions` after a successful render; see
-the [`fn render` Render Status Conditions]({{% relref "/reference/cli/fn/render#render-status-conditions" %}})
+the [`fn render` Render Status Conditions]({{% relref "/documentation/6-references/cli/fn/render#render-status-conditions" %}})
section.
### Example
diff --git a/documentation/content/en/reference/annotations/depends-on/_index.md b/documentation/content/en/documentation/6-references/annotations/depends-on/_index.md
similarity index 97%
rename from documentation/content/en/reference/annotations/depends-on/_index.md
rename to documentation/content/en/documentation/6-references/annotations/depends-on/_index.md
index 154a127d2f..01cc3abadd 100644
--- a/documentation/content/en/reference/annotations/depends-on/_index.md
+++ b/documentation/content/en/documentation/6-references/annotations/depends-on/_index.md
@@ -4,6 +4,8 @@ linkTitle: "depends-on"
description: |
Specify one or more resource dependencies.
+aliases:
+ - /reference/annotations/depends-on/
---
The `config.kubernetes.io/depends-on` annotation specifies one or more resource
diff --git a/documentation/content/en/reference/annotations/local-config/_index.md b/documentation/content/en/documentation/6-references/annotations/local-config/_index.md
similarity index 97%
rename from documentation/content/en/reference/annotations/local-config/_index.md
rename to documentation/content/en/documentation/6-references/annotations/local-config/_index.md
index 0c2a942367..9c28d7685d 100644
--- a/documentation/content/en/reference/annotations/local-config/_index.md
+++ b/documentation/content/en/documentation/6-references/annotations/local-config/_index.md
@@ -4,6 +4,8 @@ linkTitle: "local-config"
description: |
Specify a resource to be skipped when applying.
+aliases:
+ - /reference/annotations/local-config/
---
The `config.kubernetes.io/local-config` annotation specifies a resource to be
diff --git a/documentation/content/en/reference/cli/_index.md b/documentation/content/en/documentation/6-references/cli/_index.md
similarity index 80%
rename from documentation/content/en/reference/cli/_index.md
rename to documentation/content/en/documentation/6-references/cli/_index.md
index 118b86827a..97d3f0719f 100755
--- a/documentation/content/en/reference/cli/_index.md
+++ b/documentation/content/en/documentation/6-references/cli/_index.md
@@ -2,10 +2,8 @@
title: CLI Reference
linkTitle: CLI Reference
description: Overview of kpt commands
-toc_hide: true
-menu:
- main:
- parent: "References"
+aliases:
+ - /reference/cli/
---
-[pkg]: /reference/cli/pkg/
-[fn]: /reference/cli/fn/
-[live]: /reference/cli/live/
-[alpha]: /reference/cli/alpha/
\ No newline at end of file
+[pkg]: /documentation/6-references/cli/pkg/
+[fn]: /documentation/6-references/cli/fn/
+[live]: /documentation/6-references/cli/live/
+[alpha]: /documentation/6-references/cli/alpha/
\ No newline at end of file
diff --git a/documentation/content/en/reference/cli/alpha/_index.md b/documentation/content/en/documentation/6-references/cli/alpha/_index.md
similarity index 90%
rename from documentation/content/en/reference/cli/alpha/_index.md
rename to documentation/content/en/documentation/6-references/cli/alpha/_index.md
index 167304adb5..542f0640fe 100644
--- a/documentation/content/en/reference/cli/alpha/_index.md
+++ b/documentation/content/en/documentation/6-references/cli/alpha/_index.md
@@ -4,9 +4,8 @@ linkTitle: "alpha"
weight: 4
description: |
This command is currently in alpha and might change without notice.
-menu:
- main:
- parent: "References"
+aliases:
+ - /reference/cli/alpha/
---
-[inventory template]: /reference/cli/live/apply/#prune
+[inventory template]: /documentation/6-references/cli/live/apply/#prune
diff --git a/documentation/content/en/reference/cli/pkg/_index.md b/documentation/content/en/documentation/6-references/cli/pkg/_index.md
similarity index 90%
rename from documentation/content/en/reference/cli/pkg/_index.md
rename to documentation/content/en/documentation/6-references/cli/pkg/_index.md
index 9ed78544f4..15f6fa5af6 100644
--- a/documentation/content/en/reference/cli/pkg/_index.md
+++ b/documentation/content/en/documentation/6-references/cli/pkg/_index.md
@@ -5,9 +5,8 @@ weight: 1
description: |
Get, update, and describe packages with resources
-menu:
- main:
- parent: "References"
+aliases:
+ - /reference/cli/pkg/
---