-
Notifications
You must be signed in to change notification settings - Fork 119
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
k8s: Age field to pod proto #1170
Conversation
api/k8s/v1/k8s.proto
Outdated
|
||
// human friendly, based off | ||
// https://github.com/lyft/lyftkube/blob/1394f8f8e17d9f3472a0387c901bdb506dde083a/lib/printers/time_format.go#L11 | ||
string age = 11; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is the plan to have start time
and age
as separate fields in Pod? Feels redundant to have both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove start time
for now.
CreationTimestamp comment in types.go:
// CreationTimestamp is a timestamp representing the server time when this object was
// created. It is not guaranteed to be set in happens-before order across separate operations.
// Clients may not set this value. It is represented in RFC3339 form and is in UTC.
//
// Populated by the system.
// Read-only.
// Null for lists.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
StartTime comment from types.go:
// RFC 3339 date and time at which the object was acknowledged by the Kubelet.
// This is before the Kubelet pulled the container image(s) for the pod.
In the local testing performed did you have a chance to run through the delete pod flow to ensure the serialization is done correctly? |
the twitter API used to do this, they would send the timestamp across in three formats. from memory it was something like:
they moved away from it and only send one timestamp now because the human readable version goes out-of-date. on the twitter app they want it to say 10s ago, then 30s ago, then 5 min ago if you look at the tweet several times, rather than whatever the age was when the API call was made. for our use case it's probably fine to add the human readable representation if we can't reasonably fix the serialization bug, knowing that we may end up having to pay the deprecation cost later. if we do decide to keep this i would keep the existing field (since we should still use it in the future and fix the bug) and call the new field |
This PR has been marked as stale after 7 or more days of inactivity. Please have a maintainer add the |
closing this for now, going to open one shortly with a different approach |
Add an age field representing a human friendly string that is the time elapsed since CreationTimestamp.
Description
This might be a bad idea, if it is, I'll close this PR but wanted to put this out as an attempt at fixing our problem.
In the k8s dash we want to display the age. Normally we would construct this from the timestamp. However, it might be easier to just do it like this, until protobufjs/protobuf.js#1495 is merged or something similar is done.
If it turns out this is a good idea, then I'll make a follow-up PR for doing the same thing in deployment, which can also use an Age field (similar to how lyftkube does it).
Testing Performed
local
GitHub Issue
Fixes #
TODOs