Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Mandatory update needed for availableReplicas #3

Open
alexellis opened this issue Jul 27, 2018 · 9 comments
Open

Mandatory update needed for availableReplicas #3

alexellis opened this issue Jul 27, 2018 · 9 comments

Comments

@alexellis
Copy link
Member

Hi @kenfdev,

A mandatory update is needed for OpenFaaS providers to work with the newest changes proposed in the OpenFaaS UI.

A new field: availableReplicas will need to be populated in the endpoint /system/function/

Now the purpose of this field is to indicate which functions (containers) have a replica ready for a HTTP request - often when pulling a large image the function is not ready until several minutes in. That's the purpose of this change - to provide that information to the UI or new endpoint.

You may need to vendor the latest release of faas-provider, which adds a healthcheck endpoint also.

https://github.com/openfaas/faas-provider/releases

The easiest way to maintain compatibility will be to set the availableReplicas count to be the same as replicas - this will mean the UI continues to work as planned. Down the road updating availableReplicas to its true meaning would be best.

Let me know if you have questions or if I can help.

Alex

See also: hashicorp/faas-nomad#33

@kenfdev
Copy link
Member

kenfdev commented Jul 30, 2018

Thanks Alex, I'll try implementing this. Just need some time.

@roomthirteen
Copy link

any news on this issue?

@alexellis
Copy link
Member Author

@roomthirteen are you using Rancher 1.0 or 2.0? This provider is for Rancher 1.0 - no provider was needed for 2.0 since it uses the OpenFaaS Kubernetes provider.

https://github.com/openfaas/faas-netes

Alex

@roomthirteen
Copy link

@alexellis we are still using Rancher 1.0 as we could not yet upgrade our infrastructure... I've created my own fork for now (https://github.com/picibird/faas-rancher) until/if this will be fixed here.

@alexellis
Copy link
Member Author

Would you like to raise a PR against this repository if you've fixed the readiness check? I've sent you an invite for Slack, maybe we can chat more there too?

@alexellis
Copy link
Member Author

@roomthirteen I can't see any functional changes in your fork in the master branch.

I might be able to save you some work too. You don't need to rename the GitHub namespace, you can change the origin of your repo and when running within Docker it also doesn't matter.

@alexellis
Copy link
Member Author

cc @jgnagy

@roomthirteen
Copy link

@alexellis I'm still working in my local copy. As it seems there is more work to do than just adding the availableReplicas property in the function list response. There are new endpoints (most important the update endpoint) that I'm currently implementing. I have a working version locally build with my own docker hub image as my top priority was to make it work with 0.8.3 in our customer project. After that I will try to find the time to contribute the changes back.

@alexellis
Copy link
Member Author

Our early version update for Swarm was delete/create, it may help you get that endpoint in place sooner, but it shouldn't be permanent.

Let me know when you have a PR ready and I'll try to get the community together to review it?

Alex

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants