소스 검색

feat: add support for revision

Soham Parekh 3 년 전
부모
커밋
ebdace2437
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      api/server/handlers/namespace/stream_pod_logs_loki.go
  2. 1 0
      api/types/incident.go

+ 1 - 0
api/server/handlers/namespace/stream_pod_logs_loki.go

@@ -64,6 +64,7 @@ func (c *StreamPodLogsLokiHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
 	err = agent.StreamPorterAgentLokiLog([]string{
 		fmt.Sprintf("pod=%s", request.PodSelector),
 		fmt.Sprintf("namespace=%s", request.Namespace),
+		fmt.Sprintf("helm_sh_revision=%s", request.Revision),
 	}, string(startTime), request.SearchParam, 0, safeRW)
 
 	if err != nil {

+ 1 - 0
api/types/incident.go

@@ -100,6 +100,7 @@ type GetLogRequest struct {
 	StartRange  *time.Time `schema:"start_range"`
 	EndRange    *time.Time `schema:"end_range"`
 	SearchParam string     `schema:"search_param"`
+	Revision    string     `schema:"revision"`
 	PodSelector string     `schema:"pod_selector" form:"required"`
 	Namespace   string     `schema:"namespace" form:"required"`
 	Direction   string     `schema:"direction"`