Repository navigation
Add since_time parameter to read_namespaced_pod_log #1351
Description
Activity
- addedkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
on Jan 9, 2021 Would be happy to add this parameter myself, just not sure how - I saw the CoreV1Api code is generated so I figure I'm not supposed to edit that directly
actually, it's supported already,
read_namespaced_pod_log(self, name,namespace, **kwargs), just pass since_seconds in kwargs.Yeah I'm currently using since_seconds, this issue is about since_time though
/cc
both since_time and since_seconds were added years ago, https://github.com/kubernetes/kubernetes/blame/c5cc25d1cb075f84756db9bffecd3fafe12c5fab/pkg/apis/core/types.go#L4427
Interesting, it didn't seem to work for me with the Python client but I ended up not needing this feature anyway. I'm fine with closing the issue.
Yeah totally fine with closing it but just wondering, why is there no
since_timeparameter mentioned in the generated code here: https://raw.githubusercontent.com/kubernetes-client/python/master/kubernetes/client/api/core_v1_api.pyhttps://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json is the openapi spec used for generating python client in this repo. sinceseconds is present there, but sincetime is not.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with/remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.If this issue is safe to close now please do so with
/close.Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale- addedlifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.
on May 13, 2021 Stale issues rot after 30d of inactivity.
Mark the issue as fresh with/remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.If this issue is safe to close now please do so with
/close.Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten- addedlifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.and removedlifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.
on Jun 12, 2021 Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-contributor-experience at kubernetes/community.
/close@fejta-bot: Closing this issue.
Details
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-contributor-experience at kubernetes/community.
/closeInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
possibly a bug (or at least documentation error),
since_timeis referenced in the description ofsince_seconds, but the field itself does not exist.
{
"description": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
"in": "query",
"name": "sinceSeconds",
"type": "integer",
"uniqueItems": true
}Reacted by Gabriel Virga and Jelizaveta Lemeševa@yliaog @vdwees @neelsomani @pigletfly May I ask how to use this sinceSeconds? I could not understand what does it mean by
A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returnedFor example, i want to log from the beginning, (I can set it seconds in 10 years, which is way before the pod being created), then make a stop (enable logs timestamp, record this timestamp), then stream log from where I stopped. Any suggestion?Reacted by Jelizaveta Lemeševa and Moritz Weber@MoritzWeber0: You can't reopen an issue/PR unless you authored it or you are a collaborator.
Details
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
What happened (please include outputs or screenshots):
The docstring makes reference to both the
sinceSecondsandsinceTimeparameters which exist in the CLI, but I see that only thesince_secondskwarg is accepted by the Python clientWhat you expected to happen:
I expected the
since_timekwarg to be acceptedHow to reproduce it (as minimally and precisely as possible):
Pass
since_timeattribute to the CoreV1Api methodread_namespaced_pod_logAnything else we need to know?:
n/a
Environment:
kubectl version): v1.19.0python --version) 3.6.10pip list | grep kubernetes) 12.0.0