1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00
Files
openshift-docs/modules/serverless-functions-adding-annotations.adoc
Maxim Svistunov b92a72ff41 Add docs on the function annotations feature
Several improvements

Improve wording

Co-authored-by: Ashleigh Brennan <abrennan@redhat.com>

Improve wording

Co-authored-by: Ashleigh Brennan <abrennan@redhat.com>

Improve wording

Include an annotation example
2021-07-14 17:09:35 +00:00

36 lines
823 B
Plaintext

[id="serverless-functions-adding-annotations_{context}"]
= Adding annotations to a function
.Procedure
. Open the `func.yaml` file for your function.
. For every annotation that you want to add, add the following YAML to the `annotations` section:
+
[source,yaml]
----
name: test
namespace: ""
runtime: go
...
annotations:
<annotation_name>: "<annotation_value>" <1>
----
<1> Substitute `<annotation_name>: "<annotation_value>"` with your annotation.
+
For example, to indicate that a function was authored by Alice, you might include the following annotation:
+
[source,yaml]
----
name: test
namespace: ""
runtime: go
...
annotations:
author: "alice@example.com"
----
. Save the configuration.
The next time you deploy your function to the cluster, the annotations are added to the corresponding Knative service.