Add kubectl rollout history

This commit is contained in:
Janet Kuo
2016-01-20 15:48:52 -08:00
parent 5275c9421c
commit 8fb86a3d3b
13 changed files with 588 additions and 12 deletions

View File

@@ -18,6 +18,7 @@ package deployment
import (
"fmt"
"strconv"
"time"
"k8s.io/kubernetes/pkg/api"
@@ -202,3 +203,12 @@ func getPodsForRCs(c clientset.Interface, replicationControllers []*api.Replicat
}
return allPods, nil
}
// Revision returns the revision number of the input RC
func Revision(rc *api.ReplicationController) (int64, error) {
v, ok := rc.Annotations[RevisionAnnotation]
if !ok {
return 0, nil
}
return strconv.ParseInt(v, 10, 64)
}