forked from OpenFunction/samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
function-sample.yaml
38 lines (38 loc) · 1.22 KB
/
function-sample.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
apiVersion: core.openfunction.io/v1beta1
kind: Function
metadata:
name: function-sample
spec:
version: "v2.0.0"
image: "<image-registry>/sample-go-path-params-func:v1"
imageCredentials:
name: push-secret
port: 8080 # default to 8080
build:
builder: openfunction/builder-go:v2.4.0-1.17
env:
FUNC_NAME: "pathParametersFunction"
FUNC_CLEAR_SOURCE: "true"
# # Use FUNC_GOPROXY to set the goproxy if failed to fetch go modules
# FUNC_GOPROXY: "https://goproxy.cn"
srcRepo:
url: "https://github.com/OpenFunction/samples.git"
sourceSubPath: "functions/knative/path-parameters-function-go"
revision: "main"
serving:
template:
containers:
- name: function
imagePullPolicy: Always
runtime: "knative"
annotations:
# to enable dapr manually
# Dapr annotations: https://docs.dapr.io/reference/arguments-annotations-overview/
dapr.io/enabled: "true"
dapr.io/app-id: "function-sample-default"
dapr.io/app-port: "8080" # must equal to function port
dapr.io/dapr-grpc-port: "50001"
dapr.io/log-as-json: "true"
dapr.io/app-protocol: "grpc"
dapr.io/enable-metrics: "true"
dapr.io/metrics-port: "19090"