Quellcode durchsuchen

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

Signed-off-by: thomasvn <thomasnguyen96@gmail.com>
Thomas Nguyen vor 2 Jahren
Ursprung
Commit
782e9d9c26
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  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)
 			}