Преглед на файлове

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

Signed-off-by: thomasvn <thomasnguyen96@gmail.com>
Thomas Nguyen преди 2 години
родител
ревизия
782e9d9c26
променени са 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)
 			}