kubectl: enhance podtemplate describer

This commit is contained in:
Michail Kargakis
2016-03-21 14:45:31 +01:00
parent 590038dcf1
commit 8477699055
4 changed files with 52 additions and 38 deletions

View File

@@ -86,7 +86,9 @@ func (h *DeploymentHistoryViewer) History(namespace, name string) (HistoryInfo,
if historyInfo.RevisionToTemplate[v].Annotations == nil {
historyInfo.RevisionToTemplate[v].Annotations = make(map[string]string)
}
historyInfo.RevisionToTemplate[v].Annotations[ChangeCauseAnnotation] = changeCause
if len(changeCause) > 0 {
historyInfo.RevisionToTemplate[v].Annotations[ChangeCauseAnnotation] = changeCause
}
}
return historyInfo, nil
}