Add kubectl rollout history
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user