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 created / updated into API for sorting / auditing #59

Open
alexellis opened this issue Mar 7, 2021 · 4 comments
Open

Add created / updated into API for sorting / auditing #59

alexellis opened this issue Mar 7, 2021 · 4 comments

Comments

@alexellis
Copy link
Member

alexellis commented Mar 7, 2021

Schema change

Add created / updated into API for sorting / auditing

I had a use-case where I wanted to sort the functions by time created, and I couldn't find a way to do that with the function spec. This could also be useful for auditing purposes.

faas-netes

This is available in the Deployment spec already

faasd

The container creation date is probably available, but there isn't a way to update a container without re-creating it, so the created and modified dates would be the same.

@jsiebens
Copy link

for faas-netes: a creation timestamp is available in the Deployment spec, but a modification date is not. Unless we drill down in the status part of the Deployment spec.

@alexellis
Copy link
Member Author

Related: kubernetes/kubernetes#12430

For the time being, CreatedAt time.Date would be sufficient for sorting and can be added whilst we consider if modified date is worth the additional custom work.

As a side-note, it looks like containerd does have an updated at

i,err:= c.Info(context.Background())

i.CreatedAt
i.UpdatedAt

@jsiebens to prevent duplicated work, are you taking this?

alexellis added a commit that referenced this issue Mar 11, 2021
Enables contributors to proceed with changes for #59 in
the various back-ends

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis
Copy link
Member Author

To unblock folks so they can start with faasd and faas-netes, and because nobody has volunteered to take the schema change yet, I've gone ahead and added a field for CreatedAt and cut a release. https://github.com/openfaas/faas-provider/releases/tag/v0.17.2

Please feel free to populate in faasd + faas-netes in separate PRs.

alexellis added a commit to openfaas/faasd that referenced this issue Mar 11, 2021
Populates the CreatedAt value from the container's info
field.

Ref: openfaas/faas-provider#59

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
alexellis added a commit to openfaas/faasd that referenced this issue Mar 11, 2021
Populates the CreatedAt value from the container's info
field.

Ref: openfaas/faas-provider#59

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@Waterdrips
Copy link

@alexellis I think this is done and released in our supported providers.

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

No branches or pull requests

3 participants