Skip to content

Commit 4be5d83

Browse files
committed
Add structured results section and link to toolchain used to make catalog functions
1 parent 7bf1a36 commit 4be5d83

File tree

27 files changed

+541
-237
lines changed

27 files changed

+541
-237
lines changed

docs/concepts/api-conventions/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ <h2 id="next-steps">Next Steps</h2>
455455

456456

457457

458-
<div class="text-muted mt-5 pt-3 border-top">Last modified May 6, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/186760406e45268af6caa15e62624c2d78d6d259">kpt architecture docs (18676040)</a>
458+
<div class="text-muted mt-5 pt-3 border-top">Last modified June 19, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/7bf1a36d19747d493ad7972c23b53c7070f7ae57">Transfer kpt-functions sdk and catalog docs to kpt (7bf1a36d)</a>
459459
</div>
460460
</div>
461461

docs/concepts/architecture/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ <h3 id="targets">Targets</h3>
567567

568568

569569

570-
<div class="text-muted mt-5 pt-3 border-top">Last modified May 17, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/75a6f8670213bf4391b2b10221188b6348c5ba05">Minor suggestions to arch page doc (75a6f867)</a>
570+
<div class="text-muted mt-5 pt-3 border-top">Last modified June 19, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/7bf1a36d19747d493ad7972c23b53c7070f7ae57">Transfer kpt-functions sdk and catalog docs to kpt (7bf1a36d)</a>
571571
</div>
572572
</div>
573573

docs/concepts/functions/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ <h2 id="next-steps">Next Steps</h2>
441441

442442

443443

444-
<div class="text-muted mt-5 pt-3 border-top">Last modified April 22, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/66b3df8083d0e9a5db44f477077afadba63422ca">Move function docs to guides (66b3df80)</a>
444+
<div class="text-muted mt-5 pt-3 border-top">Last modified June 19, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/7bf1a36d19747d493ad7972c23b53c7070f7ae57">Transfer kpt-functions sdk and catalog docs to kpt (7bf1a36d)</a>
445445
</div>
446446
</div>
447447

docs/concepts/packaging/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h2 id="packaging">Packaging</h2>
376376

377377

378378

379-
<div class="text-muted mt-5 pt-3 border-top">Last modified May 6, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/186760406e45268af6caa15e62624c2d78d6d259">kpt architecture docs (18676040)</a>
379+
<div class="text-muted mt-5 pt-3 border-top">Last modified June 19, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/7bf1a36d19747d493ad7972c23b53c7070f7ae57">Transfer kpt-functions sdk and catalog docs to kpt (7bf1a36d)</a>
380380
</div>
381381
</div>
382382

docs/guides/consumer/function/catalog/catalog/catalog.json

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/read_yaml.ts",
1212
"description": "Reads a directory of Kubernetes configuration recursively.",
1313
"type": "source",
14-
"demo": true
14+
"demo": true,
15+
"toolchain": "../../../producer/functions/ts"
1516
},
1617
{
1718
"image": "gcr.io/cloud-builders/kubectl",
@@ -20,29 +21,12 @@
2021
"description": "Get one or many resources from a Kubernetes cluster.",
2122
"type": "source"
2223
},
23-
{
24-
"image": "gcr.io/kpt-functions/helm-template",
25-
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/helm-template/run.sh",
26-
"description": "Render chart templates locally using helm template. (See [usage](docs/helm-template/usage/index.html)).",
27-
"type": "source"
28-
},
2924
{
3025
"image": "gcr.io/kustomize-functions/create-application",
3126
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/application-cr/image/main.go",
3227
"description": "Add an Application CR to a group of resources.",
33-
"type": "source"
34-
},
35-
{
36-
"image": "gcr.io/kustomize-functions/example-nginx",
37-
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/template-go-nginx/image/main.go",
38-
"description": "Generate configuration from go templates using the functionConfig as the template input.",
39-
"type": "source"
40-
},
41-
{
42-
"image": "gcr.io/kustomize-functions/example-cockroachdb",
43-
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/template-heredoc-cockroachdb/image/cockroachdb-template.sh",
44-
"description": "Generate configuration from heredoc template using the functionConfig as the template input.",
45-
"type": "source"
28+
"type": "source",
29+
"toolchain": "../../../producer/functions/golang"
4630
},
4731
{
4832
"image": "gcr.io/kpt-dev/kpt",
@@ -56,71 +40,111 @@
5640
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/write_yaml.ts",
5741
"description": "Writes a directory of Kubernetes configuration. It maintains the original directory structure as read by source functions.",
5842
"type": "sink",
59-
"demo": true
43+
"demo": true,
44+
"toolchain": "../../../producer/functions/ts"
6045
},
6146
{
6247
"image": "gcr.io/kpt-functions/gatekeeper-validate",
6348
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/go/pkg/functions/gatekeeper/validate.go",
6449
"description": "Enforces OPA constraints on input objects. The constraints are also passed as part of the input to the function.",
65-
"type": "validator"
50+
"type": "validator",
51+
"toolchain": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/go/pkg/framework"
6652
},
6753
{
6854
"image": "gcr.io/kpt-functions/validate-rolebinding",
6955
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/validate_rolebinding.ts",
7056
"description": "Enforces a blacklist of subjects in RoleBinding objects.",
7157
"type": "validator",
72-
"demo": true
58+
"demo": true,
59+
"toolchain": "../../../producer/functions/ts"
7360
},
7461
{
7562
"image": "gcr.io/kustomize-functions/example-validator-kubeval",
7663
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/validator-kubeval/image/main.go",
7764
"description": "Validates that all containers have cpu and memory reservations set.",
78-
"type": "validator"
65+
"type": "validator",
66+
"toolchain": "../../../producer/functions/golang"
7967
},
8068
{
8169
"image": "gcr.io/kustomize-functions/example-validator",
8270
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/validator-resource-requests/image/main.go",
8371
"description": "Validates Kubernetes configuration files using schemas from the Kubernetes OpenAPI spec.",
84-
"type": "validator"
72+
"type": "validator",
73+
"toolchain": "../../../producer/functions/golang"
74+
},
75+
{
76+
"image": "gcr.io/kpt-functions/suggest-psp",
77+
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/suggest_psp.ts",
78+
"description": "Lints PodSecurityPolicy by suggesting 'spec.allowPrivilegeEscalation' field be set to 'false'.",
79+
"type": "validator",
80+
"demo": true,
81+
"toolchain": "../../../producer/functions/ts"
8582
},
8683
{
8784
"image": "gcr.io/kpt-functions/mutate-psp",
8885
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/mutate_psp.ts",
8986
"description": "Mutates PodSecurityPolicy objects by setting spec.allowPrivilegeEscalation to false.",
9087
"type": "transformer",
91-
"demo": true
88+
"demo": true,
89+
"toolchain": "../../../producer/functions/ts"
9290
},
9391
{
9492
"image": "gcr.io/kpt-functions/label-namespace",
9593
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/hello-world/src/label_namespace.ts",
9694
"description": "Adds a label to all Namespaces.",
9795
"type": "transformer",
98-
"demo": true
96+
"demo": true,
97+
"toolchain": "../../../producer/functions/ts"
9998
},
10099
{
101100
"image": "gcr.io/kpt-functions/helm-template",
102-
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/helm-template/run.sh",
101+
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/ts/src/helm_template.ts",
103102
"description": "Render chart templates locally using helm template. (See [usage](docs/helm-template/usage/index.html)).",
104-
"type": "transformer"
103+
"type": "transformer",
104+
"toolchain": "../../../producer/functions/ts"
105105
},
106106
{
107107
"image": "gcr.io/kustomize-functions/example-tshirt",
108108
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/injection-tshirt-sizes/image/main.go",
109109
"description": "Sets cpu and memory reservations on all containers for Resources annotated with tshirt size.",
110-
"type": "transformer"
110+
"type": "transformer",
111+
"toolchain": "../../../producer/functions/golang"
111112
},
112113
{
113114
"image": "gcr.io/kpt-functions/expand-team-cr",
114115
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/expand_team_cr.ts",
115116
"description": "Reads custom resources of type Team and generates multiple Namespace and RoleBinding objects.",
116117
"type": "generator",
117-
"demo": true
118+
"demo": true,
119+
"toolchain": "../../../producer/functions/ts"
120+
},
121+
{
122+
"image": "gcr.io/kpt-functions/helm-template",
123+
"source": "https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/ts/src/helm_template.ts",
124+
"description": "Render chart templates locally using helm template. (See [usage](docs/helm-template/usage/index.html)).",
125+
"type": "generator",
126+
"toolchain": "../../../producer/functions/ts"
127+
},
128+
{
129+
"image": "gcr.io/kustomize-functions/example-nginx",
130+
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/template-go-nginx/image/main.go",
131+
"description": "Generate configuration from go templates using the functionConfig as the template input.",
132+
"type": "generator",
133+
"toolchain": "../../../producer/functions/golang"
134+
},
135+
{
136+
"image": "gcr.io/kustomize-functions/example-cockroachdb",
137+
"source": "https://github.com/kubernetes-sigs/kustomize/blob/master/functions/examples/template-heredoc-cockroachdb/image/cockroachdb-template.sh",
138+
"description": "Generate configuration from heredoc template using the functionConfig as the template input.",
139+
"type": "generator",
140+
"toolchain": "../../../producer/functions/golang"
118141
},
119142
{
120143
"image": "gcr.io/kpt-functions/no-op",
121144
"source": "https://github.com/GoogleContainerTools/kpt-functions-sdk/tree/master/ts/demo-functions/src/no_op.ts",
122145
"description": "No Op function for testing purposes",
123146
"type": "misc",
124-
"demo": true
147+
"demo": true,
148+
"toolchain": "../../../producer/functions/ts"
125149
}
126150
]

docs/guides/consumer/function/catalog/catalog/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ const data = require('./catalog.json');
22
const table = require('markdown-table');
33

44
function tableByType(type) {
5-
let t = [['Image', 'Args', 'Description', 'Source']];
5+
let t = [['Image', 'Args', 'Description', 'Source', 'Toolchain']];
66
data.filter(r => r.type === type).forEach(r => {
77
let desc = r.description;
88
if (r.demo === true) {
99
desc = '[Demo] ' + desc;
1010
}
1111
const source = `[Link](${r.source})`;
12-
t.push([r.image, r.args, desc, source]);
12+
let toolchain = ``;
13+
if (r.toolchain) {
14+
toolchain = `[SDK](${r.toolchain})`;
15+
}
16+
t.push([r.image, r.args, desc, source, toolchain]);
1317
});
1418
return table(t);
1519
}
@@ -29,7 +33,7 @@ DO NOT EDIT. Generated by: "cd catalog; npm run gen-docs"
2933
3034
This repository documents a catalog of functions implementing [Configuration Functions Specification][spec].
3135
32-
These functions can be implemented using any toolchain such as the [KPT Functions SDK][sdk].
36+
These functions can be implemented using any toolchain such as the [Typescript SDK][ts sdk] or [Golang SDK][go sdk].
3337
3438
## Sources
3539
@@ -62,6 +66,7 @@ ${tableByType('misc')}
6266
[spec]: https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md
6367
[source]: ../../../../concepts/functions/#source-function
6468
[sink]: ../../../../concepts/functions/#sink-function
65-
[sdk]: https://github.com/GoogleContainerTools/kpt-functions-sdk/`;
69+
[ts sdk]: ../../../producer/functions/ts
70+
[go sdk]: ../../../producer/functions/golang`;
6671

6772
console.log(README);

docs/guides/consumer/function/catalog/catalog/node_modules/markdown-table/readme/index.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/guides/consumer/function/catalog/docs/helm-template/usage/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
" />
2626
<meta property="og:type" content="article" />
2727
<meta property="og:url" content="https://googlecontainertools.github.io/kpt/guides/consumer/function/catalog/docs/helm-template/usage/" />
28-
<meta property="og:site_name" content="Kpt" />
28+
<meta property="article:modified_time" content="2020-06-19T15:07:12-04:00" /><meta property="og:site_name" content="Kpt" />
2929
<meta itemprop="name" content="Helm-template Usage">
3030
<meta itemprop="description" content="Helm-template Usage.
3131
">
32-
32+
<meta itemprop="dateModified" content="2020-06-19T15:07:12-04:00" />
3333
<meta itemprop="wordCount" content="408">
3434

3535

@@ -1043,7 +1043,7 @@ <h3 id="how-can-i-set-arbitrary-values-in-my-chart">How can I set arbitrary valu
10431043
</code></pre></div>
10441044

10451045

1046-
<div class="text-muted mt-5 pt-3 border-top">Last modified January 1, 0001
1046+
<div class="text-muted mt-5 pt-3 border-top">Last modified June 19, 2020: <a href="https://github.com/GoogleContainerTools/kpt/commit/7bf1a36d19747d493ad7972c23b53c7070f7ae57">Transfer kpt-functions sdk and catalog docs to kpt (7bf1a36d)</a>
10471047
</div>
10481048
</div>
10491049

0 commit comments

Comments
 (0)