I0912 00:00:28.627015 63437 round_trippers.go:466] curl -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.24.1 (linux/amd64) kubernetes/3ddd0f4" 'https://10.31.15.7:6443/apis/external.metrics.k8s.io/v1beta1?timeout=32s'
I0912 00:00:28.627947 63437 round_trippers.go:466] curl -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.24.1 (linux/amd64) kubernetes/3ddd0f4" 'https://10.31.15.7:6443/apis/projectcalico.org/v3?timeout=32s'
I0912 00:00:28.629477 63437 round_trippers.go:553] GET https://10.31.15.7:6443/apis/external.metrics.k8s.io/v1beta1?timeout=32s 503 Service Unavailable in 2 milliseconds
I0912 00:00:28.629554 63437 round_trippers.go:570] HTTP Statistics: GetConnection 0 ms ServerProcessing 1 ms Duration 2 ms
I0912 00:00:28.629596 63437 round_trippers.go:577] Response Headers:
I0912 00:00:28.629634 63437 round_trippers.go:580] Cache-Control: no-cache, private
I0912 00:00:28.629671 63437 round_trippers.go:580] Content-Type: text/plain; charset=utf-8
I0912 00:00:28.629706 63437 round_trippers.go:580] X-Content-Type-Options: nosniff
I0912 00:00:28.629744 63437 round_trippers.go:580] X-Kubernetes-Pf-Flowschema-Uid: d24d64c9-0ac8-4205-8348-bd562b45a666
I0912 00:00:28.629778 63437 round_trippers.go:580] X-Kubernetes-Pf-Prioritylevel-Uid: 3ac48240-d767-40fd-be50-5f9d375c7e30
I0912 00:00:28.629817 63437 round_trippers.go:580] Content-Length: 20
I0912 00:00:28.629853 63437 round_trippers.go:580] Date: Mon, 11 Sep 2023 16:00:28 GMT
I0912 00:00:28.629887 63437 round_trippers.go:580] Audit-Id: b63280a8-5111-4af1-a451-0539dbe852b3
I0912 00:00:28.633706 63437 request.go:1073] Response Body: service unavailable
I0912 00:00:28.633809 63437 round_trippers.go:553] GET https://10.31.15.7:6443/apis/projectcalico.org/v3?timeout=32s 503 Service Unavailable in 5 milliseconds
I0912 00:00:28.633820 63437 round_trippers.go:570] HTTP Statistics: GetConnection 0 ms ServerProcessing 0 ms Duration 5 ms
I0912 00:00:28.633837 63437 round_trippers.go:577] Response Headers:
I0912 00:00:28.633847 63437 round_trippers.go:580] Cache-Control: no-cache, private
I0912 00:00:28.633856 63437 round_trippers.go:580] Content-Type: text/plain; charset=utf-8
I0912 00:00:28.633865 63437 round_trippers.go:580] X-Content-Type-Options: nosniff
I0912 00:00:28.633874 63437 round_trippers.go:580] X-Kubernetes-Pf-Flowschema-Uid: d24d64c9-0ac8-4205-8348-bd562b45a666
I0912 00:00:28.633883 63437 round_trippers.go:580] X-Kubernetes-Pf-Prioritylevel-Uid: 3ac48240-d767-40fd-be50-5f9d375c7e30
I0912 00:00:28.633892 63437 round_trippers.go:580] Content-Length: 20
I0912 00:00:28.633898 63437 round_trippers.go:580] Date: Mon, 11 Sep 2023 16:00:28 GMT
I0912 00:00:28.633904 63437 round_trippers.go:580] Audit-Id: 838e15b2-c845-47d3-9abb-645564a45195
I0912 00:00:28.638017 63437 request.go:1073] Response Body: service unavailable
I0912 00:00:28.641820 63437 request.go:1264] body was not decodable (unable to check for Status): couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
I0912 00:00:28.641840 63437 cached_discovery.go:83] skipped caching discovery info due to the server is currently unable to handle the request
I0912 00:00:28.645336 63437 request.go:1264] body was not decodable (unable to check for Status): couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }
I0912 00:00:28.645353 63437 cached_discovery.go:83] skipped caching discovery info due to the server is currently unable to handle the request
I0912 00:00:28.646375 63437 request.go:1073] Request Body: {"apiVersion":"core.openfunction.io/v1beta2","kind":"Function","metadata":{"name":"function-sample","namespace":"default"},"spec":{"build":{"builder":"openfunction/builder-go:latest","env":{"FUNC_CLEAR_SOURCE":"true","FUNC_GOPROXY":"https://goproxy.cn","FUNC_NAME":"HelloWorld"},"srcRepo":{"revision":"main","sourceSubPath":"functions/knative/hello-world-go","url":"https://github.com/OpenFunction/samples.git"}},"image":"openfunctiondev/sample-go-func:v1","imageCredentials":{"name":"push-secret"},"serving":{"template":{"containers":[{"imagePullPolicy":"IfNotPresent","name":"function"}]},"triggers":{"http":{"port":8080}}},"version":"v2.0.0"}}
I0912 00:00:28.646427 63437 round_trippers.go:466] curl -v -XPOST -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: kubectl/v1.24.1 (linux/amd64) kubernetes/3ddd0f4" 'https://10.31.15.7:6443/apis/core.openfunction.io/v1beta2/namespaces/default/functions?fieldManager=kubectl-create&fieldValidation=Strict'
I0912 00:00:38.649930 63437 round_trippers.go:553] POST https://10.31.15.7:6443/apis/core.openfunction.io/v1beta2/namespaces/default/functions?fieldManager=kubectl-create&fieldValidation=Strict 500 Internal Server Error in 10003 milliseconds
I0912 00:00:38.649954 63437 round_trippers.go:570] HTTP Statistics: GetConnection 0 ms ServerProcessing 10003 ms Duration 10003 ms
I0912 00:00:38.649961 63437 round_trippers.go:577] Response Headers:
I0912 00:00:38.649969 63437 round_trippers.go:580] Audit-Id: ae032296-cec4-42b5-92f0-e611cfa1c5ec
I0912 00:00:38.649976 63437 round_trippers.go:580] Cache-Control: no-cache, private
I0912 00:00:38.649982 63437 round_trippers.go:580] Content-Type: application/json
I0912 00:00:38.649987 63437 round_trippers.go:580] X-Kubernetes-Pf-Flowschema-Uid: d24d64c9-0ac8-4205-8348-bd562b45a666
I0912 00:00:38.649994 63437 round_trippers.go:580] X-Kubernetes-Pf-Prioritylevel-Uid: 3ac48240-d767-40fd-be50-5f9d375c7e30
I0912 00:00:38.650003 63437 round_trippers.go:580] Content-Length: 619
I0912 00:00:38.650010 63437 round_trippers.go:580] Date: Mon, 11 Sep 2023 16:00:38 GMT
I0912 00:00:38.650350 63437 request.go:1073] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Internal error occurred: failed calling webhook \"mfunctions.of.io\": failed to call webhook: Post \"https://openfunction-webhook-service.openfunction.svc:443/mutate-core-openfunction-io-v1beta2-function?timeout=10s\": context deadline exceeded","reason":"InternalError","details":{"causes":[{"message":"failed calling webhook \"mfunctions.of.io\": failed to call webhook: Post \"https://openfunction-webhook-service.openfunction.svc:443/mutate-core-openfunction-io-v1beta2-function?timeout=10s\": context deadline exceeded"}]},"code":500}
I0912 00:00:38.652411 63437 helpers.go:222] server response object: [{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "error when creating \"function-sample.yaml\": Internal error occurred: failed calling webhook \"mfunctions.of.io\": failed to call webhook: Post \"https://openfunction-webhook-service.openfunction.svc:443/mutate-core-openfunction-io-v1beta2-function?timeout=10s\": context deadline exceeded",
"reason": "InternalError",
"details": {
"causes": [
{
"message": "failed calling webhook \"mfunctions.of.io\": failed to call webhook: Post \"https://openfunction-webhook-service.openfunction.svc:443/mutate-core-openfunction-io-v1beta2-function?timeout=10s\": context deadline exceeded"
}
]
},
"code": 500
}]
Error from server (InternalError): error when creating "function-sample.yaml": Internal error occurred: failed calling webhook "mfunctions.of.io": failed to call webhook: Post "https://openfunction-webhook-service.openfunction.svc:443/mutate-core-openfunction-io-v1beta2-function?timeout=10s": context deadline exceeded
use hello word sample.
apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
name: function-sample
spec:
version: "v2.0.0"
image: "openfunctiondev/sample-go-func:v1"
imageCredentials:
name: push-secret
build:
builder: openfunction/builder-go:latest
env:
FUNC_NAME: "HelloWorld"
FUNC_CLEAR_SOURCE: "true"
FUNC_GOPROXY: "https://goproxy.cn"
srcRepo:
url: "https://github.com/OpenFunction/samples.git"
sourceSubPath: "functions/knative/hello-world-go"
revision: "main"
serving:
template:
containers:
- name: function
imagePullPolicy: IfNotPresent
triggers:
http:
port: 8080