Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to stream logs #71

Merged
merged 1 commit into from
May 22, 2020
Merged

Add support to stream logs #71

merged 1 commit into from
May 22, 2020

Conversation

ricoberger
Copy link
Member

@ricoberger ricoberger commented May 22, 2020

Add a new options to the logs popover to stream log files. If the streaming option is selected a request is made to generate a session id. This session id can be used to retrieve the logs via Server Sent Events.

Unlike the other options, the stream logs option uses xterm to show the logs (for the other options we use Ace), because the editor would be rendered when retrieving a log line.

curl -i -H 'Content-Type: application/json' -X POST -d @api.json http://localhost:14122/api/kubernetes/logs
curl -i http://localhost:14122/api/kubernetes/logs/<ID>
{
  "server": "http://localhost:14122",
  "cluster": "<CONTEXT>",
  "method": "GET",
  "url": "https://<SERVER>/api/v1/namespaces/vault-secrets-operator/pods/vault-secrets-operator-54747b55df-697ct/log?container=vault-secrets-operator&follow=true&tailLines=10",
  "timeout": 60
}

Closes #60.

Add a new options to the logs popover to stream log files. If the
streaming option is selected a request is made to generate a session id.
This session id can be used to retrieve the logs via Server Sent Events.

Unlike the other options, the stream logs option uses xterm to show the
logs (for the other options we use Ace), because the editor would be
rerendered when retrieving a log line.
@ricoberger ricoberger added the enhancement New feature or request label May 22, 2020
@ricoberger ricoberger merged commit 78a78c5 into master May 22, 2020
@ricoberger ricoberger deleted the stream-logs branch May 22, 2020 21:19
@balthazar
Copy link

Hello @ricoberger, has this been removed from the latest? It seems that I can only get the last 5 minutes now

@ricoberger
Copy link
Member Author

Hi @balthazar, thanks for the hint. Yes this was accidentally removed, I will re-add it.

@ricoberger
Copy link
Member Author

Hi @balthazar, this should be available again in the next version. See #482

@balthazar
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants