@@ -29,6 +29,7 @@ const (
29
29
rs wellKnownControllerKind = "ReplicaSet"
30
30
rc wellKnownControllerKind = "ReplicationController"
31
31
sts wellKnownControllerKind = "StatefulSet"
32
+ ro wellKnownControllerKind = "Rollout"
32
33
)
33
34
34
35
// TargetController abstract a scalable controller
@@ -53,7 +54,7 @@ func NewTargetController(c client.Interface, ref *autoscalingv1.CrossVersionObje
53
54
kind := obj .GetKind ()
54
55
55
56
switch wellKnownControllerKind (kind ) {
56
- case cj , ds , deploy , job , rs , rc , sts :
57
+ case cj , ds , deploy , job , rs , rc , sts , ro :
57
58
case node :
58
59
// Some pods specify nodes as their owners,
59
60
// but they aren't valid controllers that
@@ -204,7 +205,7 @@ func (tc *TargetController) ReplicasCount() (int64, error) {
204
205
205
206
func genericControllerSpecPath (kind string , fields []string ) ([]string , error ) {
206
207
switch wellKnownControllerKind (kind ) {
207
- case ds , deploy , job , rs , rc , sts :
208
+ case ds , deploy , job , rs , rc , sts , ro :
208
209
// Same default fields.
209
210
case cj :
210
211
prefix := []string {
0 commit comments