Unable to deploy 'kubeless' functions in v3.7.0 cluster
Kubeless is a serverless function framework targeting Kubernetes (and Openshift). It's latest version v0.2.3 uses CustomResourceDefinition (CRD) so support for Openshift v3.6 (with Kubernetes 1.6) is dropped for a while. With Openshift v3.7.0 which has CRD, the support for Openshift could be added back. I've tried both Openshift v3.7.0-alpha.1 and v3.7.0-rc.0, unfortunately kubeless still unable to deploy functions, there is an error when creating resources from kubeless-controller:
time="2017-11-01T09:23:53Z" level=error msg="Error processing default/hello (giving up): configmaps \"hello\" is forbidden: cannot set blockOwnerDeletion in this case because cannot find RESTMapping for APIVersion k8s.io Kind Function: allowed by openshift authorizer, no matches for /, Kind=Function" pkg=controller
E1101 09:23:53.325926 1 controller.go:166] configmaps "hello" is forbidden: cannot set blockOwnerDeletion in this case because cannot find RESTMapping for APIVersion k8s.io Kind Function: allowed by openshift authorizer, no matches for /, Kind=Function
This issue has been reported in kubeless repo https://github.com/kubeless/kubeless/issues/390.
Version
$ oc version
oc v3.7.0-rc.0+e92d5c5
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://192.168.99.147:8443
openshift v3.7.0-rc.0+e92d5c5
kubernetes v1.7.6+a08f5eeb62
Steps To Reproduce
$ minishift start --openshift-version=v3.7.0-rc.0
...
$ eval $(minishift oc-env)
...
$ oc new-project kubeless
...
$ oc create -f https://github.com/kubeless/kubeless/releases/download/v0.2.3/kubeless-openshift-v0.2.3.yaml
clusterrole "kubeless-controller-deployer" created
clusterrolebinding "kubeless-controller-deployer" created
service "broker" created
statefulset "kafka" created
service "kafka" created
statefulset "zoo" created
deployment "kubeless-controller" created
serviceaccount "controller-acct" created
customresourcedefinition "functions.k8s.io" created
service "zoo" created
service "zookeeper" created
$ # wait until the kubeless-controller pod is running ...
$ # download & install kubeless CLI tool from 'https://github.com/kubeless/kubeless/releases/tag/v0.2.3'
$ cat <<EOF > hello.py
def hello():
return "Hello from kubeless!"
EOF
$ kubeless function deploy hello --runtime python2.7 --from-file hello.py --handler hello.hello --trigger-http
...
$ # check the log of kubeless-controller pod
Current Result
The deployment of function failed with the logs showed above.
Expected Result
Deployment should be successful without error messages (like on vanilla Kubernetes 1.7.x).
could this be similar to https://github.com/openshift/origin/issues/16860 ? run oc get crd to confirm ....
@karmab Here is the CRD.
$ oc get crd
NAME AGE
functions.k8s.io 48s
$ oc describe crd functions.k8s.io
Name: functions.k8s.io
Namespace:
Labels: <none>
Annotations: <none>
API Version: apiextensions.k8s.io/v1beta1
Kind: CustomResourceDefinition
Metadata:
Creation Timestamp: 2017-11-01T09:20:04Z
Resource Version: 4463
Self Link: /apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/functions.k8s.io
UID: d8902eb6-bee5-11e7-ab25-eaf83f141d96
Spec:
Group: k8s.io
Names:
Kind: Function
List Kind: FunctionList
Plural: functions
Singular: function
Scope: Namespaced
Version: v1
Status:
Accepted Names:
Kind: Function
List Kind: FunctionList
Plural: functions
Singular: function
Conditions:
Last Transition Time: <nil>
Message: no conflicts found
Reason: NoConflicts
Status: True
Type: NamesAccepted
Last Transition Time: 2017-11-01T09:20:04Z
Message: the initial names have been accepted
Reason: InitialNamesAccepted
Status: True
Type: Established
Events: <none>
i indeed believe the issue has to do with the format of the crd, functions.k8s.io, which openshift seems not to like
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten /remove-lifecycle stale
Any updates on this issue? rook.io has a similiar problem: https://github.com/rook/rook/issues/1533
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.
/close