Skip to content

Commit

Permalink
Drop pod specs from prowjobs.js on request via url param
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmichalis committed Mar 23, 2018
1 parent b2363cf commit 0176810
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prow/cmd/deck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ func handleProwJobs(ja *JobAgent) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
setHeadersNoCaching(w)
jobs := ja.ProwJobs()
if v := r.URL.Query().Get("omit"); v == "pod_spec" {
for i := range jobs {
jobs[i].Spec.PodSpec = nil
}
}
jd, err := json.Marshal(struct {
Items []kube.ProwJob `json:"items"`
}{jobs})
Expand Down

0 comments on commit 0176810

Please sign in to comment.