Skip to content

Commit 8f936b6

Browse files
author
JC
authored
feat: add support for Argo Rollouts (#1)
1 parent 18685c1 commit 8f936b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vpa/target.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const (
2929
rs wellKnownControllerKind = "ReplicaSet"
3030
rc wellKnownControllerKind = "ReplicationController"
3131
sts wellKnownControllerKind = "StatefulSet"
32+
ro wellKnownControllerKind = "Rollout"
3233
)
3334

3435
// TargetController abstract a scalable controller
@@ -53,7 +54,7 @@ func NewTargetController(c client.Interface, ref *autoscalingv1.CrossVersionObje
5354
kind := obj.GetKind()
5455

5556
switch wellKnownControllerKind(kind) {
56-
case cj, ds, deploy, job, rs, rc, sts:
57+
case cj, ds, deploy, job, rs, rc, sts, ro:
5758
case node:
5859
// Some pods specify nodes as their owners,
5960
// but they aren't valid controllers that
@@ -204,7 +205,7 @@ func (tc *TargetController) ReplicasCount() (int64, error) {
204205

205206
func genericControllerSpecPath(kind string, fields []string) ([]string, error) {
206207
switch wellKnownControllerKind(kind) {
207-
case ds, deploy, job, rs, rc, sts:
208+
case ds, deploy, job, rs, rc, sts, ro:
208209
// Same default fields.
209210
case cj:
210211
prefix := []string{

0 commit comments

Comments
 (0)