Add commend for printHistory function

Signed-off-by: Dinesh <dineshudt17@gmail.com>

Kubernetes-commit: 548b3a784bf2d05a8cfbaf289ce257d7b71efab2
This commit is contained in:
Dinesh 2020-09-05 21:43:22 +05:30 committed by Kubernetes Publisher
parent 88b59619ba
commit 55c16b433f
1 changed files with 2 additions and 0 deletions

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 {