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
4 changes: 2 additions & 2 deletions documentation/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ prism_syntax_highlighting = false

# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
[params.github]
repo = "https://github.com/kptdev/kpt"
branch = "main"
repo = "https://github.com/kptdev/krm-functions-catalog/"
branch = "master"

# Configure mermaid (charting) integration
[params.mermaid]
Expand Down
108 changes: 11 additions & 97 deletions documentation/content/en/_index.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,16 @@
---
title: kpt Documentation
toc_hide: true
title: Function Catalog
toc_hide: false
hide_breadcrumb: true
menu:
main:
weight: 40
---

<script>
document.addEventListener("DOMContentLoaded", function() {
if (window.location.pathname === "/") {
document.querySelector(".breadcrumb").style.display = "none";
}
});
</script>
{{< alert >}}
Please see the [versioning](https://github.com/kptdev/krm-functions-catalog/blob/master/VERSIONING.md)
document, which details the SemVer tagging strategy being used for the released KRM Functions.
{{< /alert >}}

<div class="row mt-5 mb-3">
<div class="col-lg-6">
<div class="lead">
kpt is a package-centric toolchain that enables a WYSIWYG configuration authoring, automation, and delivery experience, which simplifies managing Kubernetes platforms and KRM-driven infrastructure at scale by manipulating declarative Configuration as Data.
</div>
</div>
<div class="col-lg-6">
<img src="/images/kpt_stacked_color.svg" alt="kpt logo" style="max-width: 300px;">
</div>
</div>

{{% blocks/section type="row" color="white"%}}

{{% blocks/feature icon="fas fa-download " title="Install" %}}
Get started by [installing](/installation/) kpt.
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-graduation-cap" title="Learn" %}}
Read [The kpt Book](/book/).
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-info-circle" title="Ask" %}}
If your question is not a [FAQ](/faq/), please [reach out](/contact/)!
{{% /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)
{{% /blocks/feature %}}

{{% /blocks/section %}}


{{% blocks/section color="white" %}}

# 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 usefull to chek the [recerences](/references) and the catalog of [selected krm functions](https://catalog.kpt.dev/).

# For admins

Start with the [installation](/installation/) and with the kpt [Book](/book).

# For developers

To develp krm functions, the best to start with [Chapter 5](/book/05-developing-functions/) of the kpt Book.

# For contributors

kpt is developed in the [kptdev](https://github.com/kptdev) organisation of GitHub.

## Issues

Issues can be reported to the [kpt repo](https://github.com/kptdev/kpt/issues) related to any repos in the kpt
organisation.

## Pull Requests

We are happy to get Pull Requests. Send them!

{{% /blocks/section %}}

# Communication

{{% blocks/section type="row" color="white"%}}

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

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

{{% /blocks/feature %}}
{{% blocks/feature icon="fa-solid fa-comments" title="Discussions" %}}

Join the discussions in the [kptdev/kpt](https://github.com/kptdev/kpt/discussions) repo.

{{% /blocks/feature %}}

{{% blocks/feature icon="fa-solid fa-people-group" title="Community Meeting" %}}

Participate in our [community meetings](https://zoom-lfx.platform.linuxfoundation.org/meeting/98980817322?password=c09cdcc7-59c0-49c4-9802-ad4d50faafcd&invite=true)

{{% /blocks/feature %}}


{{% /blocks/section %}}

{{% blocks/lead color="white" %}}
kpt is a [Cloud Native Computing Foundation (CNCF)](https://www.cncf.io/) [Sandbox Project](https://www.cncf.io/sandbox-projects/)!

<img src="/images/cncf-color.svg" alt="CNCF logo" style="max-width: 600px;">

{{% /blocks/lead %}}
{{< listfunctions >}}
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ environments: # kpt-set: ${env}

#### Note:

Refer to the [`create-setters`]({{< relref "function-catalog/create-setters/v0.1/" >}}) function documentation for information about creating setters.
Refer to the [`create-setters`]({{< relref "create-setters/v0.1/" >}}) function documentation for information about creating setters.
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ environments: # kpt-set: ${env}

#### Note:

Refer to the [`create-setters`]({{< relref "function-catalog/create-setters/v0.1/" >}}) function documentation for information about creating setters.
Refer to the [`create-setters`]({{< relref "create-setters/v0.1/" >}}) function documentation for information about creating setters.
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,4 @@ Explanation for the changes:
Here, the comment is added to the `environments` field as it is an array node, and the intent is to paremeterize entire array.
<!--mdtogo-->

[setter]: {{< relref "function-catalog/apply-setters/v0.2/#definitions" >}}
[setter]: {{< relref "apply-setters/v0.2/#definitions" >}}
16 changes: 0 additions & 16 deletions documentation/content/en/function-catalog/_index.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ Output looks like the following:

<!--mdtogo-->

[setter]: {{< relref "function-catalog/apply-setters/v0.2/#definitions" >}}
[create-setters]: {{< relref "function-catalog/create-setters/v0.1/" >}}
[setter]: {{< relref "apply-setters/v0.2/#definitions" >}}
[create-setters]: {{< relref "create-setters/v0.1/" >}}
10 changes: 5 additions & 5 deletions documentation/layouts/partials/breadcrumb.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{/* layouts/partials/breadcrumb.html */}}
{{ if ne .RelPermalink "/function-catalog/" }}
{{ if and (ne .RelPermalink "/function-catalog/") (not .Params.hide_breadcrumb) }}
<nav aria-label="breadcrumb" class="td-breadcrumbs">
<ol class="breadcrumb">

{{/* Function Catalog root link */}}
<li class="breadcrumb-item">
<a href="/function-catalog/">Function Catalog</a>
<a href="/">Function Catalog</a>
</li>

{{/* Show parent function if available */}}
{{ with .Params.parent_function }}
{{ $funcName := . }}

{{/* Determine the versioned directory */}}
{{ $funcDir := printf "content/en/function-catalog/%s" $funcName }}
{{ $funcDir := printf "content/en/%s" $funcName }}
{{ $versions := slice }}
{{ if fileExists $funcDir }}
{{ range readDir $funcDir }}
Expand All @@ -32,13 +32,13 @@

{{ if $latest }}
<li class="breadcrumb-item">
<a href="{{ printf "/function-catalog/%s/%s/" $funcName $latest | relURL }}">
<a href="{{ printf "/%s/%s/" $funcName $latest | relURL }}">
{{ $funcName | humanize }}
</a>
</li>
{{ else }}
<li class="breadcrumb-item">
<a href="{{ printf "/function-catalog/%s/" $funcName | relURL }}">
<a href="{{ printf "/%s/" $funcName | relURL }}">
{{ $funcName | humanize }}
</a>
</li>
Expand Down
4 changes: 3 additions & 1 deletion documentation/layouts/shortcodes/listfunctions.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

{{ range $files }}
{{ if .IsDir }}
{{ if ne .Name "examples" }}

{{ $subfiles := readDir (printf "%s/%s" $currentDir .Name) }}

Expand Down Expand Up @@ -54,7 +55,7 @@

<!-- Check if _index.md exists and read its front matter -->
{{ if (fileExists $indexFile) }}
{{ $indexPath := printf "function-catalog/%s/%s/_index.md" $functionName $highestVersion }}
{{ $indexPath := printf "%s/%s/_index.md" $functionName $highestVersion }}
{{ with $.Site.GetPage $indexPath }}
<tr>
<td>
Expand Down Expand Up @@ -83,6 +84,7 @@
</tr>
{{ end }}

{{ end }}
{{ end }}

{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion examples/create-setters-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ $ kpt fn render create-setters-simple
2. Check the setter comment `kpt-set: nginx:${tag}` is added to `image` field value `nginx:1.16.1` in `Deployment` resource.
3. Check the setter comment `kpt-set: ${env}` is added to `environment` field in `MyKind` resource.

[setter]: {{< relref "function-catalog/apply-setters/v0.2/#definitions" >}}
[setter]: {{< relref "apply-setters/v0.2/#definitions" >}}
2 changes: 1 addition & 1 deletion examples/list-setters-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ $ kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/list-setters:latest

Refer to the [apply-setters] function documentation for information about updating the field values parameterized by setters.

[apply-setters]: {{< relref "function-catalog/apply-setters/v0.1/" >}}
[apply-setters]: {{< relref "apply-setters/v0.1/" >}}
12 changes: 6 additions & 6 deletions examples/search-replace-create-setters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ data:

Please refer to [apply-setters] documentation for information about applying desired setter values.

[setter]: {{< relref "function-catalog/apply-setters/v0.2/" >}}
[setters]: {{< relref "function-catalog/apply-setters/v0.2/" >}}
[apply-setters]: {{< relref "function-catalog/apply-setters/v0.2/" >}}
[create-setters]: {{< relref "function-catalog/create-setters/v0.1/" >}}
[setter comments]: {{< relref "function-catalog/apply-setters/v0.2/#definitions" >}}
[setter]: {{< relref "apply-setters/v0.2/" >}}
[setters]: {{< relref "apply-setters/v0.2/" >}}
[apply-setters]: {{< relref "apply-setters/v0.2/" >}}
[create-setters]: {{< relref "create-setters/v0.1/" >}}
[setter comments]: {{< relref "apply-setters/v0.2/#definitions" >}}

[setter]: {{< relref "function-catalog/apply-setters/v0.2/#definitions" >}}
[setter]: {{< relref "apply-setters/v0.2/#definitions" >}}
2 changes: 1 addition & 1 deletion examples/set-annotations-advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Check all resources have 2 annotations: `color: orange` and `fruit: apple`. And
the resource of kind `MyResource` also has these 2 annotations in
`spec.selector.annotations`.

[`set-annotations`]: {{< relref "function-catalog/set-annotations/v0.1/" >}}
[`set-annotations`]: {{< relref "set-annotations/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-annotations-imperative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ The labels provided in key-value pairs after `--` will be converted to a
Check the 2 annotations `color: orange` and `fruit: apple` have been added to
all resources.

[`set-annotations`]: {{< relref "function-catalog/set-annotations/v0.1/" >}}
[`set-annotations`]: {{< relref "set-annotations/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-annotations-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ $ kpt fn render set-annotations-simple

Check the 2 annotations have been added.

[`set-annotations`]: {{< relref "function-catalog/set-annotations/v0.1/" >}}
[`set-annotations`]: {{< relref "set-annotations/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-image-advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ standard `.spec.containers[].image` field of the resource of kind `Pod`. And the
image `nginx` has been set to `bitnami/nginx:1.21.4` in the custom
`.spec.manifest.images[].image` location of the resource of kind `MyKind`

[`set-image`]: {{< relref "function-catalog/set-image/v0.1/" >}}
[`set-image`]: {{< relref "set-image/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-image-digest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ $ kpt fn render set-image-digest

Check the 2 images have been set to the specified digest.

[`set-image`]: {{< relref "function-catalog/set-image/v0.1/" >}}
[`set-image`]: {{< relref "set-image/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-image-imperative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ The labels provided in key-value pairs after `--` will be converted to a

Check the image `nginx` has been replaced with `bitnami/nginx:1.21.4` for all resources.

[`set-image`]: {{< relref "function-catalog/set-image/v0.1/" >}}
[`set-image`]: {{< relref "set-image/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-image-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ $ kpt fn render set-image-simple

Check the 2 images have been set to the specified tag.

[`set-image`]: {{< relref "function-catalog/set-image/v0.1/" >}}
[`set-image`]: {{< relref "set-image/v0.1/" >}}
2 changes: 1 addition & 1 deletion examples/set-labels-full-coverage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ $ kpt fn render set-labels-full-coverage
Check all resources, the following labels should be upserted to the `labels`, `matchingLabels` or `seletors(labelSelector)` fields:
`color: orange`, `fruit: apple` and `app: new`.

[`set-labels`]: {{< relref "function-catalog/set-labels/v0.2/" >}}
[`set-labels`]: {{< relref "set-labels/v0.2/" >}}
2 changes: 1 addition & 1 deletion examples/set-labels-imperative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ kpt and used as the function configuration.

Check all resources have 2 labels `color: orange` and `fruit: apple`.

[`set-labels`]: {{< relref "function-catalog/set-labels/v0.2/" >}}
[`set-labels`]: {{< relref "set-labels/v0.2/" >}}
2 changes: 1 addition & 1 deletion examples/set-labels-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ $ kpt fn render set-labels-simple

Check all resources have 2 labels `color: orange` and `fruit: apple`.

[`set-labels`]: {{< relref "function-catalog/set-labels/v0.2/" >}}
[`set-labels`]: {{< relref "set-labels/v0.2/" >}}
2 changes: 1 addition & 1 deletion examples/set-namespace-depends-on/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ the package.
annotation updated, since it references a namespaced resource which was not
included in the package.

[`set-namespace`]: {{< relref "function-catalog/set-namespace/v0.4/" >}}
[`set-namespace`]: {{< relref "set-namespace/v0.4/" >}}
[`depends-on`]: https://kpt.dev/reference/annotations/depends-on/
2 changes: 1 addition & 1 deletion examples/set-namespace-kpt-package-context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ $ kpt fn render set-namespace-kpt-package-context

Verify that all namespaces in `resources.yaml` are updated from `old` to `example`.

[`set-namespace`]: {{< relref "function-catalog/set-namespace/v0.4/" >}}
[`set-namespace`]: {{< relref "set-namespace/v0.4/" >}}
2 changes: 1 addition & 1 deletion examples/set-namespace-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ $ kpt fn render set-namespace-simple

Check all resources have `metadata.namespace` set to `example-ns`

[`set-namespace`]: {{< relref "function-catalog/set-namespace/v0.4/" >}}
[`set-namespace`]: {{< relref "set-namespace/v0.4/" >}}
2 changes: 1 addition & 1 deletion examples/starlark-configmap-as-functionconfig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ $ kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/starlark:latest -- so

Check the `spec.replicas` field has been set to `5` in the `Deployment`.

[`starlark`]: {{< relref "function-catalog/starlark/v0.5/" >}}
[`starlark`]: {{< relref "starlark/v0.5/" >}}
2 changes: 1 addition & 1 deletion examples/starlark-inject-sidecar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ $ kpt fn render starlark-inject-sidecar

The logging agent container should have been injected.

[`starlark`]: {{< relref "function-catalog/starlark/v0.5/" >}}
[`starlark`]: {{< relref "starlark/v0.5/" >}}
2 changes: 1 addition & 1 deletion examples/starlark-load-library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ $ kpt fn render starlark-load-library

Check the `.spec.replicas` field should have been updated to 4.

[`starlark`]: {{< relref "function-catalog/starlark/v0.5/" >}}
[`starlark`]: {{< relref "starlark/v0.5/" >}}
2 changes: 1 addition & 1 deletion examples/starlark-poddisruptionbudget/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ $ kpt fn render starlark-poddisruptionbudget
A new file should have been created, and it should contain a
`PodDisruptionBudget` object.

[`starlark`]: {{< relref "function-catalog/starlark/v0.5/" >}}
[`starlark`]: {{< relref "starlark/v0.5/" >}}
2 changes: 1 addition & 1 deletion examples/starlark-set-namespace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ $ kpt fn render starlark-set-namespace

Check the `.metadata.namespace` field has been set to `prod` for every resource.

[`starlark`]: {{< relref "function-catalog/starlark/v0.5/" >}}
[`starlark`]: {{< relref "starlark/v0.5/" >}}
2 changes: 1 addition & 1 deletion examples/starlark-validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ To pass validation, let's replace the key `private-key` in the `ConfigMap` with
something else e.g. `public_key`.
Rerun the command. It will succeed.

[`starlark`]: {{< relref "function-catalog/starlark/v0.5/" >}}
[`starlark`]: {{< relref "starlark/v0.5/" >}}
Loading