Add commend for printHistory function

Signed-off-by: Dinesh <dineshudt17@gmail.com>
This commit is contained in:
Dinesh 2020-09-05 21:43:22 +05:30
parent fe1e72e792
commit 548b3a784b
No known key found for this signature in database
GPG Key ID: 3A4884625C0FB7BD

View File

@ -192,6 +192,8 @@ func (h *DaemonSetHistoryViewer) ViewHistory(namespace, name string, revision in
})
}
// printHistory returns the podTemplate of the given revision if it is non-zero
// else returns the overall revisions
func printHistory(history []*appsv1.ControllerRevision, revision int64, getPodTemplate func(history *appsv1.ControllerRevision) (*corev1.PodTemplateSpec, error)) (string, error) {
historyInfo := make(map[int64]*appsv1.ControllerRevision)
for _, history := range history {