Commits on Dec 3, 2018
  1. Update comments as per PR review

    alexellis committed Dec 3, 2018
    - renames temp. variables and comments which were copied from
    Deployment block.
    Signed-off-by: Alex Ellis (VMware) <>
  2. Add informer for Service definitions

    alexellis committed Dec 2, 2018
    - adds informer for Service definitions to fix #61 and #60 -
    since it seemed that deleting Service definitions was not tracked
    or synchronized and the code was depending on the Deployment
    from being deleted or updated.
    Tested on K8s 1.10 on single node Linux cluster by deleting
    Service and seeing it re-created in the logs. Happy path of
    deploying from store also works unaffected.
    Signed-off-by: Alex Ellis (VMware) <>
  3. Fix rate limiting latency for list endpoint

    alexellis committed Dec 3, 2018
    - the list endpoint of the REST API was making too many API calls
    in a short period of time (1 per existing function in cluster)
    so we hit rate limiting and the Kubernetes API server started to
    rate limit us causing a huge delay to the end-user and timeouts.
    This issue was found when Bart S tried out OpenFaas Cloud with
    the Operator which makes use of the REST API. The UI would have
    had the same issue causing a poor and confusing experience for
    our users.
    An initial fix would have used List instead of Get to reduce API
    calls, but this fix follows an idea from Stefan to make use of
    a shared Informer which already has a cache of the state of
    Deployments in the cluster.
    Tested on Linux Kubernetes 1.10 cluster and could not reproduce
    reported issue.
    Signed-off-by: Alex Ellis (VMware) <>