openfaas / faas

OpenFaaS - Serverless Functions Made Simple
https://www.openfaas.com
MIT License
25.17k stars 1.94k forks source link

Question about where to find availableReplicas #1557

Closed Willena closed 4 years ago

Willena commented 4 years ago

My actions before raising this issue

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

  1. Create a new swarm
  2. Deploy OpenFaas
  3. Build and deploy a simple function (for example named: example-func
  4. Wait for the function to deploy
  5. Call http://gateway:8080/system/function/example-func
  6. Observe the number of availableReplicas
  7. Call http://gateway:8080/system/functions
  8. Look at the array item that corresponds to example-func
  9. The availableReplicas value in the object corresponding to example-func is 0 and does not get updated

Context

Your Environment

alexellis commented 4 years ago

/add label: wontfix

alexellis commented 4 years ago

This is as designed, for the replica count you need to use the status URL

/system/function/NAME
alexellis commented 4 years ago

/set title: Question about where to find availableReplicas

Willena commented 4 years ago

Then why the availableReplicas property is also present in the returned objects of /system/functions if it is useless ?