Skip to content

Commit

Permalink
feat: add support for Argo Rollouts (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
JC authored Nov 4, 2022
1 parent 18685c1 commit 8f936b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vpa/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
rs wellKnownControllerKind = "ReplicaSet"
rc wellKnownControllerKind = "ReplicationController"
sts wellKnownControllerKind = "StatefulSet"
ro wellKnownControllerKind = "Rollout"
)

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

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

func genericControllerSpecPath(kind string, fields []string) ([]string, error) {
switch wellKnownControllerKind(kind) {
case ds, deploy, job, rs, rc, sts:
case ds, deploy, job, rs, rc, sts, ro:
// Same default fields.
case cj:
prefix := []string{
Expand Down

0 comments on commit 8f936b6

Please sign in to comment.