Bladeren bron

Update `/installInfo` endpoint. Adds startTime back in. (#2670) (#2674)

Thomas Nguyen 2 jaren geleden
bovenliggende
commit
b6ffc7d15a
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2 0
      pkg/costmodel/router.go

+ 2 - 0
pkg/costmodel/router.go

@@ -1204,6 +1204,7 @@ type InstallInfo struct {
 type ContainerInfo struct {
 type ContainerInfo struct {
 	ContainerName string `json:"containerName"`
 	ContainerName string `json:"containerName"`
 	Image         string `json:"image"`
 	Image         string `json:"image"`
+	StartTime     string `json:"startTime"`
 }
 }
 
 
 func (a *Accesses) GetInstallInfo(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
 func (a *Accesses) GetInstallInfo(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
@@ -1233,6 +1234,7 @@ func (a *Accesses) GetInstallInfo(w http.ResponseWriter, r *http.Request, _ http
 				c := ContainerInfo{
 				c := ContainerInfo{
 					ContainerName: container.Name,
 					ContainerName: container.Name,
 					Image:         container.Image,
 					Image:         container.Image,
+					StartTime:     pod.Status.StartTime.String(),
 				}
 				}
 				info.Containers = append(info.Containers, c)
 				info.Containers = append(info.Containers, c)
 			}
 			}