Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Fix broken URL in kubeless function call #1229

Merged
merged 1 commit into from
May 3, 2021

Conversation

h-otter
Copy link
Contributor

@h-otter h-otter commented Apr 18, 2021

Issue Ref: #1226

Description:

First of all, thank you for the exciting project.

My kubeless is running on Kubernetes 1.21.
As a result of creating a function according to Quick Start (https://kubeless.io/docs/quick-start/), I confirmed that the function cannot be called with kubeless function call like #1226.
However, when I checked the function using kubectl proxy and curl, it was working properly.
So I guessed that there was a problem with the assembled URL in the command.

When I checked the assembled URL, it was as follows.

https://kubernetes/:http-function-port/proxy/

I fixed svc.ObjectMeta.SelfLink and svc.SelfLink to not be used because they were empty.
Then, I have confirmed that it works.

Thank you.

TODOs:

  • Ready to review
  • Automated Tests
  • Docs

@h-otter
Copy link
Contributor Author

h-otter commented Apr 22, 2021

Do I need to do anything else to get a review...?

@antgamdia
Copy link

Hi, I hope you can get it reviewed soon. Do you know if this change is also working in k8s versions prior to 1.21?

@h-otter
Copy link
Contributor Author

h-otter commented May 1, 2021

Thank you for your comment.
I have confirmed that my patch works on Kubernetes 1.16 deployed with kubeadm.

root@sandbox:~/kubeless# kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.15", GitCommit:"2adc8d7091e89b6e3ca8d048140618ec89b39369", GitTreeState:"clean", BuildDate:"2020-09-02T11:40:00Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.15", GitCommit:"2adc8d7091e89b6e3ca8d048140618ec89b39369", GitTreeState:"clean", BuildDate:"2020-09-02T11:31:21Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
root@sandbox:~/kubeless# ./kubeless function deploy hello --runtime python3.8 --from-file test.py --handler test.hello
INFO[0000] Deploying function...                        
INFO[0000] Function hello submitted for deployment      
INFO[0000] Check the deployment status executing 'kubeless function ls hello' 
root@sandbox:~/kubeless# ./kubeless function call hello --data 'Hello world!'
Hello world!

@andresmgot
Copy link
Contributor

Hi, I hope you can get it reviewed soon. Do you know if this change is also working in k8s versions prior to 1.21?

This CI is setup with Kubernetes 1.15 😅

@andresmgot andresmgot merged commit 5f94538 into vmware-archive:master May 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants