Просмотр исходного кода

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

Thomas Nguyen 2 лет назад
Родитель
Сommit
b6ffc7d15a
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      pkg/costmodel/router.go

+ 2 - 0
pkg/costmodel/router.go

@@ -1204,6 +1204,7 @@ type InstallInfo struct {
 type ContainerInfo struct {
 	ContainerName string `json:"containerName"`
 	Image         string `json:"image"`
+	StartTime     string `json:"startTime"`
 }
 
 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{
 					ContainerName: container.Name,
 					Image:         container.Image,
+					StartTime:     pod.Status.StartTime.String(),
 				}
 				info.Containers = append(info.Containers, c)
 			}