Skip to content

Commit

Permalink
fix: Modify validation to check Analysis args passed through RO spec (a…
Browse files Browse the repository at this point in the history
…rgoproj#1215)

* fix: Modify validation to check Analysis args passed through RO spec

Signed-off-by: khhirani <[email protected]>
Signed-off-by: caoyang001 <[email protected]>
  • Loading branch information
khhirani authored and Hui Kang committed Sep 16, 2021
1 parent c26bd77 commit 7ca2446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/rollouts/validation/validation_references.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package validation
import (
"fmt"

appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

analysisutil "github.com/argoproj/argo-rollouts/utils/analysis"
"github.com/argoproj/argo-rollouts/utils/conditions"
istioutil "github.com/argoproj/argo-rollouts/utils/istio"
Expand Down
1 change: 1 addition & 0 deletions rollout/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ func (c *rolloutContext) getReferencedRolloutAnalyses() (*[]validation.AnalysisT
for i, step := range canary.Steps {
if step.Analysis != nil {
templates, err := c.getReferencedAnalysisTemplates(c.rollout, step.Analysis, validation.InlineAnalysis, i)
templates.Args = step.Analysis.Args
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7ca2446

Please sign in to comment.