Skip to content

Commit 3947a85

Browse files
authored
Merge pull request #35959 from abrennan89/SRVOCF-311
SRVOCF-311: Updated kn func commands, add missing link
2 parents 1b70f6b + 195350e commit 3947a85

6 files changed

+16
-46
lines changed

modules/describe-function-kn.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
// Module included in the following assemblies
2-
3-
// * /serverless/cli_reference/kn-func-ref.adoc
4-
51
[id="describe-function-kn_{context}"]
62
= Describing a function
73

8-
The `kn func describe` command prints information about a deployed function, such as the function name, image, namespace, information about the Knative service, route information, and event subscriptions.
4+
The `kn func info` command prints information about a deployed function, such as the function name, image, namespace, Knative service information, route information, and event subscriptions.
95

106
.Procedure
117

128
* Describe a function:
139
+
1410
[source,termnal]
1511
----
16-
$ kn func describe [-f <format> -n <namespace> -p <path>]
12+
$ kn func info [-f <format> -n <namespace> -p <path>]
1713
----
1814
+
1915
.Example command
2016
[source,terminal]
2117
----
22-
$ kn func describe -p function/example-function
18+
$ kn func info -p function/example-function
2319
----
2420
+
2521
.Example output

modules/serverless-build-func-kn.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Module included in the following assemblies:
2-
//
3-
// * serverless/serverless-functions-getting-started.adoc
4-
51
[id="serverless-build-func-kn_{context}"]
62
= Building functions
73

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,33 @@
1-
// Module included in the following assemblies:
2-
//
3-
// * serverless/serverless-functions-getting-started.adoc
4-
51
[id="serverless-create-func-kn_{context}"]
62
= Creating functions
73

84
You can create a basic serverless function using the `kn` CLI.
95

10-
You can specify the runtime, trigger, image, and namespace as flags on the command line, or use the `-c` flag to start the interactive experience using the CLI prompt.
11-
12-
The values provided for image and registry are persisted to the `func.yaml` file, so that subsequent invocations do not require the user to specify these again.
13-
14-
.Example `func.yaml`
15-
[source,yaml]
16-
----
17-
name: example-function
18-
namespace: default
19-
runtime: node
20-
image: <image_from_registry>
21-
imageDigest: ""
22-
trigger: http
23-
builder: default
24-
builderMap:
25-
default: quay.io/boson/faas-nodejs-builder
26-
envs: {}
27-
----
6+
You can specify the path, runtime, and template as flags on the command line, or use the `-c` flag to start the interactive experience in the terminal.
287

298
.Procedure
309

3110
* Create a function project:
3211
+
3312
[source,terminal]
3413
----
35-
$ kn func create <path> -r <registry> -l <runtime> -t <trigger> -i <image> -n <namespace>
14+
$ kn func create <path> -l <runtime> -t <template>
3615
----
37-
** Supported runtimes include `node`, `go`, `python`, and `quarkus`.
38-
** If the image is unspecified, you are prompted for a registry name. The image name is derived from this registry and the function name.
16+
** Supported runtimes include `node`, `go`, `python`, `quarkus`, and `typescript`.
17+
** Supported templates include `http` and `events`.
3918
+
4019
.Example command
4120
[source,terminal]
4221
----
43-
$ kn func create functions/example-function
22+
$ kn func create -l typescript -t events examplefunc
4423
----
4524
+
4625
.Example output
4726
[source,terminal]
4827
----
49-
Project path: /home/user/functions/example-function
50-
Function name: example-function
51-
Runtime: node
52-
Trigger: http
28+
Project path: /home/user/demo/examplefunc
29+
Function name: examplefunc
30+
Runtime: typescript
31+
Template: events
32+
Writing events to /home/user/demo/examplefunc
5333
----

modules/serverless-deploy-func-kn.adoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Module included in the following assemblies:
2-
//
3-
// * serverless/serverless-functions-getting-started.adoc
4-
51
[id="serverless-deploy-func-kn_{context}"]
62
= Deploying functions
73

serverless/functions/serverless-functions-about.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The `kn func` CLI is provided as a plug-in for the Knative `kn` CLI. {FunctionsP
2323
* xref:../../serverless/functions/serverless-developing-python-functions.adoc#serverless-developing-python-functions[Python]
2424
* xref:../../serverless/functions/serverless-developing-go-functions.adoc#serverless-developing-go-functions[Golang]
2525
* xref:../../serverless/functions/serverless-developing-quarkus-functions.adoc#serverless-developing-quarkus-functions[Quarkus]
26+
* xref:../../serverless/functions/serverless-developing-typescript-functions.adoc#serverless-developing-typescript-functions[TypeScript]
2627

2728
[id="next-steps_serverless-functions-about"]
2829
== Next steps

serverless/functions/serverless-functions-reference-guide.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ include::modules/technology-preview.adoc[leveloffset=+2]
1515
* xref:../../serverless/functions/serverless-developing-nodejs-functions.adoc#serverless-developing-nodejs-functions[Node.js]
1616
* xref:../../serverless/functions/serverless-developing-python-functions.adoc#serverless-developing-python-functions[Python]
1717
* xref:../../serverless/functions/serverless-developing-go-functions.adoc#serverless-developing-go-functions[Golang]
18-
* Quarkus
18+
* xref:../../serverless/functions/serverless-developing-quarkus-functions.adoc#serverless-developing-quarkus-functions[Quarkus]
19+
* xref:../../serverless/functions/serverless-developing-typescript-functions.adoc#serverless-developing-typescript-functions[TypeScript]
1920
//* SpringBoot - TBC
2021
2122
This guide provides reference information that you can use to develop functions.

0 commit comments

Comments
 (0)