Skip to content

Commit

Permalink
Clarify links, add functions to catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
prachirp committed Jun 24, 2020
1 parent 4be5d83 commit e97fd38
Show file tree
Hide file tree
Showing 108 changed files with 763 additions and 329 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,15 @@ functions-examples-docker:
docker build . -f functions/examples/Dockerfile -t gcr.io/kpt-dev/example-functions:v0.1.0
docker push gcr.io/kpt-dev/example-functions:v0.1.0

gencatalog:
rm site/content/en/guides/consumer/function/catalog/_index.md
(cd site/content/en/guides/consumer/function/catalog/catalog && npm run gen-docs)

gendocs:
rm -rf docs/
(cd site && go run github.com/gohugoio/hugo)

docs: gendocs license
docs: gencatalog gendocs license

servedocs:
(cd site && go run github.com/gohugoio/hugo server)
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ chmod +x kpt
GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt
```

### [Documentation](https://googlecontainertools.github.io/kpt)
### [Documentation][docs]

See the [docs](https://googlecontainertools.github.io/kpt) for more information on how to use `kpt`.
See the [docs] for more information on how to use `kpt`.

---

[linux]: https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt
[darwin]: https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt
[windows]: https://storage.googleapis.com/kpt-dev/latest/windows_amd64/kpt.exe
[docs]: https://googlecontainertools.github.io/kpt
2 changes: 1 addition & 1 deletion docs/api-reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ <h5>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/kptfile/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ <h1>Kptfile</h1>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/api-conventions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ <h2 id="next-steps">Next Steps</h2>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
5 changes: 4 additions & 1 deletion docs/concepts/architecture/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ <h4 id="configuration-as-data">Configuration as data</h4>
As configuration becomes complex, it becomes hard to read and understand.
Our design philosophy is to keep configuration as data in order to manage this complexity.
We do this by keeping resources serialized as either JSON or YAML configuration.</p>
<ul>
<li><a href="https://changelog.com/gotime/114#t=00:12:09.18">link</a></li>
</ul>
<h4 id="kpt-vs-kubernetes">kpt vs kubernetes:</h4>
<ul>
<li>While the Kubernetes control-plane reads / writes configuration data stored by the apiserver
Expand Down Expand Up @@ -585,7 +588,7 @@ <h3 id="targets">Targets</h3>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
5 changes: 3 additions & 2 deletions docs/concepts/functions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ <h3 id="pipeline">Pipeline</h3>

<h2 id="next-steps">Next Steps</h2>
<ul>
<li>Get a quickstart on writing functions from the <a href="../../guides/producer/functions/">function producer docs</a>.</li>
<li>See more examples of functions in the functions <a href="../../guides/consumer/function/catalog">catalog</a>.</li>
<li>Consult the <a href="../../guides/producer/functions/">function producer docs</a> for more details on writing functions.</li>
<li>Learn more ways of using the <code>kpt fn</code> command from the <a href="../../reference/fn/run/">reference</a> doc.</li>
</ul>

<div class="section-index">
Expand Down Expand Up @@ -459,7 +460,7 @@ <h2 id="next-steps">Next Steps</h2>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ <h5>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/packaging/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ <h2 id="packaging">Packaging</h2>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions docs/contact/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ <h1>Contact</h1>
<p>We&rsquo;d love to hear from you!</p>
<ul>
<li>Join our <a href="https://kubernetes.slack.com/channels/kpt">Slack channel</a></li>
<li>Join our <a href="https://groups.google.com/forum/#!forum/kpt-users">email list</a></li>
<li>Join our <a href="https://groups.google.com/g/kpt-users">email list</a></li>
</ul>

<div class="section-index">
Expand Down Expand Up @@ -272,7 +272,7 @@ <h1>Contact</h1>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
24 changes: 14 additions & 10 deletions docs/faq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ <h4 id="q-what-does-kpt-provide-that-git-clone-doesnt"><strong>Q: What does kpt
configuration (rather than with an editor), etc</p>
<h4 id="q-how-is-kpt-different-from-other-solutions"><strong>Q: How is <code>kpt</code> different from other solutions?</strong></h4>
<p>A: Rather than expressing configuration as code, <code>kpt</code> represents configuration packages as data,
in particular as YAML or JSON objects adhering to the
<a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/resource-management.md">Kubernetes resource model</a></p>
in particular as YAML or JSON objects adhering to the <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/resource-management.md">kubernetes resource model</a></p>
<h4 id="q-why-resource-configuration-as-the-artifact-rather-than-templates-or-configuration-dsls"><strong>Q: Why resource configuration as the artifact rather than templates or configuration DSLs?</strong></h4>
<p>A: As explained in <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/declarative-application-management.md">Declarative application management in Kubernetes</a>,
using resource configuration provides a number of desirable properties:</p>
Expand Down Expand Up @@ -293,23 +292,28 @@ <h4 id="q-why-resource-configuration-as-the-artifact-rather-than-templates-or-co
<h4 id="q-isnt-writing-yaml-hard"><strong>Q: Isn&rsquo;t writing YAML hard?</strong></h4>
<p>A: <code>kpt</code> offers a collection of utilities which enable working with configuration
programmatically to simplify the experience. Using <code>vi</code> to edit YAML should be
necessary only for bootstrapping, and the common cases should use <a href="/kpt/reference/cfg/set">setters</a>
or <a href="/kpt/reference/fn/run">functions</a> to generate or modify YAML configuration.</p>
necessary only for bootstrapping, and the common cases should use <a href="../reference/cfg/set">setters</a>
or <a href="../reference/fn/run">functions</a> to generate or modify YAML configuration.</p>
<h4 id="q-i-really-like-dsl--templating-solution-x-can-i-use-it-with-kpt"><strong>Q: I really like DSL / templating solution X. Can I use it with <code>kpt</code>?</strong></h4>
<p>A: Yes. <code>kpt</code> supports plugging in solutions which generate or manipulate configuration, e.g. from
DSLs and templates. This may be performed using <a href="/kpt/reference/fn/run">functions</a>. The generated
DSLs and templates. This may be performed using <a href="../guides/consumer/function/catalog/#sources">source functions</a> from our catalog. The generated
output may be modified directly, and merged when regenerated.</p>
<h4 id="q-i-want-to-write-high-level-abstractions-like-crds-but-on-the-client-side-can-i-do-this-with-kpt"><strong>Q: I want to write high-level abstractions like CRDs, but on the client-side. Can I do this with <code>kpt</code>?</strong></h4>
<p>A: Yes. <code>kpt</code>'s architecture facilitates the developing programs which may generate or modify
configuration. Multiple programs may be composed together. See <a href="/kpt/reference/fn/run">functions</a>.</p>
configuration. See the <a href="../guides/consumer/function/pipeline/">functions pipeline</a> page for how to compose multiple programs together.</p>
<h4 id="q-how-do-i-roll-out-changes-throughout-my-organization-using-kpt"><strong>Q: How do I roll out changes throughout my organization using <code>kpt</code>?</strong></h4>
<p>A: This can be done one of several ways, including: 1) using semantic versioning or release
channels with <a href="/kpt/reference/fn/run">functions</a>, or 2) <a href="/kpt/reference/pkg/update">updating</a> packages.</p>
channels with <a href="../reference/fn/run">functions</a>, or 2) <a href="../reference/pkg/update">updating</a> packages.</p>
<h4 id="q-is-there-a-container-image-that-contains-kpt"><strong>Q: Is there a container image that contains kpt?</strong></h4>
<p>A: Yes. <a href="https://gcr.io/kpt-dev/kpt">gcr.io/kpt-dev/kpt</a> contains the <code>kpt</code> binary.</p>
<h4 id="q-i-still-have-questions-how-do-i-contact-you"><strong>Q: I still have questions. How do I contact you?</strong></h4>
<p>A: <a href="/kpt/contact">Please reach out!</a></p>
<h3 id="heading"></h3>
<p>A: <a href="../contact">Please reach out!</a></p>
<h3 id="next-steps">Next Steps</h3>
<ul>
<li>Learn about kpt <a href="../concepts/architecture">architecture</a> including major influences and a high-level comparison with kustomize.</li>
<li>Consult the <a href="../reference">command reference</a> for how to use kpt.</li>
<li>Read kpt <a href="../guides">guides</a> for how to produce and consume packages and integrate with a wider ecosystem of tools.</li>
</ul>

<div class="section-index">

Expand Down Expand Up @@ -343,7 +347,7 @@ <h3 id="heading"></h3>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/consumer/apply/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ <h5 id="output-4">Output</h5>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/consumer/display/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ <h5 id="output-6">Output</h5>
<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kpt-users">
<a class="text-white" target="_blank" href="https://groups.google.com/g/kpt-users">
<i class="fa fa-envelope"></i>
</a>
</li>
Expand Down
54 changes: 41 additions & 13 deletions docs/guides/consumer/function/catalog/catalog/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
{
"image": "gcr.io/kpt-functions/read-yaml",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/read_yaml.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/read_yaml.ts",
"description": "Reads a directory of Kubernetes configuration recursively.",
"type": "source",
"demo": true,
Expand Down Expand Up @@ -37,22 +37,29 @@
},
{
"image": "gcr.io/kpt-functions/write-yaml",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/write_yaml.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/write_yaml.ts",
"description": "Writes a directory of Kubernetes configuration. It maintains the original directory structure as read by source functions.",
"type": "sink",
"demo": true,
"toolchain": "../../../producer/functions/ts"
},
{
"image": "gcr.io/kpt-functions/istioctl-analyze",
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/ts/src/istioctl_analyze.ts",
"description": "Istioctl analyze is a diagnostic tool that can detect potential issues with Istio configuration and output errors to the results field.",
"type": "validator",
"toolchain": "../../../producer/functions/ts"
},
{
"image": "gcr.io/kpt-functions/gatekeeper-validate",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/go/pkg/functions/gatekeeper/validate.go",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/go/pkg/functions/gatekeeper/validate.go",
"description": "Enforces OPA constraints on input objects. The constraints are also passed as part of the input to the function.",
"type": "validator",
"toolchain": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/go/pkg/framework"
},
{
"image": "gcr.io/kpt-functions/validate-rolebinding",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/validate_rolebinding.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/validate_rolebinding.ts",
"description": "Enforces a blacklist of subjects in RoleBinding objects.",
"type": "validator",
"demo": true,
Expand All @@ -74,31 +81,45 @@
},
{
"image": "gcr.io/kpt-functions/suggest-psp",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/suggest_psp.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/suggest_psp.ts",
"description": "Lints PodSecurityPolicy by suggesting 'spec.allowPrivilegeEscalation' field be set to 'false'.",
"type": "validator",
"demo": true,
"toolchain": "../../../producer/functions/ts"
},
{
"image": "gcr.io/kpt-functions/mutate-psp",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/mutate_psp.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/mutate_psp.ts",
"description": "Mutates PodSecurityPolicy objects by setting spec.allowPrivilegeEscalation to false.",
"type": "transformer",
"demo": true,
"toolchain": "../../../producer/functions/ts"
},
{
"image": "set_namespace.star",
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/starlark/set_namespace.star",
"description": "Sets the namespace field of all configs passed in.",
"type": "transformer",
"toolchain": "../../../producer/functions/starlark"
},
{
"image": "gcr.io/kubeflow-images-public/kustomize-fns/remove-namespace",
"source": "https://github.com/kubeflow/kfctl/blob/master/kustomize-fns/remove-namespace/main.go",
"description": "Removes the namespace field of cluster-scoped configs.",
"type": "transformer",
"toolchain": "../../../producer/functions/golang"
},
{
"image": "gcr.io/kpt-functions/label-namespace",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/hello-world/src/label_namespace.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/hello-world/src/label_namespace.ts",
"description": "Adds a label to all Namespaces.",
"type": "transformer",
"demo": true,
"toolchain": "../../../producer/functions/ts"
},
{
"image": "gcr.io/kpt-functions/helm-template",
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/ts/src/helm_template.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/ts/src/helm_template.ts",
"description": "Render chart templates locally using helm template. (See [usage](docs/helm-template/usage/index.html)).",
"type": "transformer",
"toolchain": "../../../producer/functions/ts"
Expand All @@ -110,17 +131,25 @@
"type": "transformer",
"toolchain": "../../../producer/functions/golang"
},
{
"image": "gcr.io/kpt-functions/annotate-config",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/annotate_config.ts",
"description": "Adds an annotation to all configs.",
"type": "transformer",
"demo": true,
"toolchain": "../../../producer/functions/ts"
},
{
"image": "gcr.io/kpt-functions/expand-team-cr",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/expand_team_cr.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/expand_team_cr.ts",
"description": "Reads custom resources of type Team and generates multiple Namespace and RoleBinding objects.",
"type": "generator",
"demo": true,
"toolchain": "../../../producer/functions/ts"
},
{
"image": "gcr.io/kpt-functions/helm-template",
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/ts/src/helm_template.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/ts/src/helm_template.ts",
"description": "Render chart templates locally using helm template. (See [usage](docs/helm-template/usage/index.html)).",
"type": "generator",
"toolchain": "../../../producer/functions/ts"
Expand All @@ -136,12 +165,11 @@
"image": "gcr.io/kustomize-functions/example-cockroachdb",
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/template-heredoc-cockroachdb/image/cockroachdb-template.sh",
"description": "Generate configuration from heredoc template using the functionConfig as the template input.",
"type": "generator",
"toolchain": "../../../producer/functions/golang"
"type": "generator"
},
{
"image": "gcr.io/kpt-functions/no-op",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/no_op.ts",
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/master/ts/demo-functions/src/no_op.ts",
"description": "No Op function for testing purposes",
"type": "misc",
"demo": true,
Expand Down
Loading

0 comments on commit e97fd38

Please sign in to comment.