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

Merge branch 'develop' into sth/cc-quierier-arg-update

Sean Holcomb 2 лет назад
Родитель
Сommit
48ea36b64d
2 измененных файлов с 2 добавлено и 8 удалено
  1. 1 1
      .github/ISSUE_TEMPLATE/opencost-bug-report.md
  2. 1 7
      pkg/costmodel/router.go

+ 1 - 1
.github/ISSUE_TEMPLATE/opencost-bug-report.md

@@ -8,7 +8,7 @@ assignees: ''
 ---
 ---
 
 
 **Describe the bug**
 **Describe the bug**
-A clear and concise description of what the OpenCost bug is. Please ensure this is an issue related to the OpenCost cost model, API, UI or specification. Public Kubecost bugs may be opened at https://github.com/kubecost/cost-analyzer-helm-chart/ 
+A clear and concise description of what the OpenCost bug is. Please ensure this is an issue related to the OpenCost cost model, API, UI or specification. Public Kubecost bugs may be opened at https://github.com/kubecost/features-bugs
 
 
 **To Reproduce**
 **To Reproduce**
 Steps to reproduce the behavior:
 Steps to reproduce the behavior:

+ 1 - 7
pkg/costmodel/router.go

@@ -1204,9 +1204,6 @@ 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"`
-	ImageID       string `json:"imageID"`
-	StartTime     string `json:"startTime"`
-	Restarts      int32  `json:"restarts"`
 }
 }
 
 
 func (a *Accesses) GetInstallInfo(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
 func (a *Accesses) GetInstallInfo(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
@@ -1232,13 +1229,10 @@ func (a *Accesses) GetInstallInfo(w http.ResponseWriter, r *http.Request, _ http
 	// chart or more likely we are running locally - in either case Images field will return as null
 	// chart or more likely we are running locally - in either case Images field will return as null
 	if len(pods.Items) > 0 {
 	if len(pods.Items) > 0 {
 		for _, pod := range pods.Items {
 		for _, pod := range pods.Items {
-			for _, container := range pod.Status.ContainerStatuses {
+			for _, container := range pod.Spec.Containers {
 				c := ContainerInfo{
 				c := ContainerInfo{
 					ContainerName: container.Name,
 					ContainerName: container.Name,
 					Image:         container.Image,
 					Image:         container.Image,
-					ImageID:       container.ImageID,
-					StartTime:     pod.Status.StartTime.String(),
-					Restarts:      container.RestartCount,
 				}
 				}
 				info.Containers = append(info.Containers, c)
 				info.Containers = append(info.Containers, c)
 			}
 			}