openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
794 stars 226 forks source link

[Feature] Support for logs in namespaces #801

Closed martindekov closed 4 years ago

martindekov commented 4 years ago

The faas-netes provider along with the SDK has a way in which you can specify namespaces for log requests. The namespaces support should be added for the logs.

Expected Behaviour

Check logs of figlet in dev namespace:

faas-cli logs figlet --namespace dev

or

faas-cli logs figlet.dev

And one of the commands should succeed.

Current Behaviour

Logs does not support this feature

Possible Solution

Imaplement --namespace flag in logs see list for example

Steps to Reproduce (for bugs)

  1. Try logs in dev namespace faas-cli logs figlet --namespace dev
  2. Check:
    Unknown flag: --namespace
  3. Try by naming convention faas-cli logs figlet.dev
  4. Check:
    WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates.
    Handling connection for 8080
    Server returned unexpected status code: 500 - unknown log request error (500)

Context

Logs on the server side now support namespaces, the client should follow.

Your Environment

alexellis commented 4 years ago

Fixed in #802