Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Include Digest and ImageID in /services response #914

Closed
foot opened this issue Jan 24, 2018 · 3 comments
Closed

Include Digest and ImageID in /services response #914

foot opened this issue Jan 24, 2018 · 3 comments

Comments

@foot
Copy link

foot commented Jan 24, 2018

/images is returning Digest and ImageId which comes from the image repository, but we don't have the Digest/ImageId of the pods running in the cluster.

@foot foot changed the title imageid Include digest and ImageID in /services respones Jan 24, 2018
@foot foot changed the title Include digest and ImageID in /services respones Include Digest and ImageID in /services respones Jan 24, 2018
@foot foot changed the title Include Digest and ImageID in /services respones Include Digest and ImageID in /services response Jan 24, 2018
@foot
Copy link
Author

foot commented Feb 6, 2018

It would be great to get CreatedAt too but I'm not sure if that piece of information resides in the same place?

@squaremo
Copy link
Member

squaremo commented Feb 8, 2018

I looked into this. It's not straight-forward to get this info from kubernetes -- controllers don't keep track of the digest (unless you specify one in the manifest), since they are just a template for the pods.

Individual pods seem to have an image ID of some kind:

$ kubectl get pod -n kube-system =l name=flux -o yaml
apiVersion: v1
items:
- apiVersion: v1
  kind: Pod
  metadata:
# ...
  status:
    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2018-02-07T13:31:34Z
      status: "True"
      type: Initialized
    - lastProbeTime: null
      lastTransitionTime: 2018-02-08T18:24:54Z
      status: "True"
      type: Ready
    - lastProbeTime: null
      lastTransitionTime: 2018-02-07T13:31:34Z
      status: "True"
      type: PodScheduled
    containerStatuses:
    - containerID: docker://7733a0c9ab1f4048e6d1b43c41207a2ea3a6b13211afc91f4311fc661920c960
      image: quay.io/weaveworks/flux:feature-repo-sync-99acb551
      imageID: docker://sha256:a6a480bea993c2d9fa7f6d138a69f1a1525ae252498c03ebbba0818ab3b5be13

.. but there will usually be more than one pod that's attributable to a controller, and they may well have different images running (either because a rollout is in progress, or because for some reason the images at each host differ).

@foot
Copy link
Author

foot commented Feb 9, 2018

Gotcha.

If the new /images summary tells the UI what flux thinks the current image is that would be fine too.

This issue should be described as the problem really: The UI would like to know: currentImage.ID and currentImage.CreatedAt to show that information in https://github.com/weaveworks/service-ui/pull/1907. The solution proposed in #913 will probably solve that so we could close this.

@kingdonb kingdonb closed this as completed Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants