Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ved Ratan <[email protected]>
  • Loading branch information
VedRatan committed Sep 21, 2024
1 parent 2aef95b commit 897dbf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pkg/engine/handlers/validation/validate_pss.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ func (h validatePssHandler) validate(
} else {
msg := fmt.Sprintf(`Validation rule '%s' failed. It violates PodSecurity "%s:%s": %s`, rule.Name, podSecurity.Level, podSecurity.Version, pss.FormatChecksPrint(pssChecks))
ruleResponse := engineapi.RuleFail(rule.Name, engineapi.Validation, msg).WithPodSecurityChecks(podSecurityChecks)
var action kyvernov1.ValidationFailureAction
action = policyContext.Policy().GetSpec().ValidationFailureAction
action := policyContext.Policy().GetSpec().ValidationFailureAction

// process the old object for UPDATE admission requests in case of enforce policies
if action == kyvernov1.Enforce {
Expand Down
4 changes: 1 addition & 3 deletions pkg/engine/handlers/validation/validate_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ func (v *validator) validate(ctx context.Context) *engineapi.RuleResponse {
v.log.V(2).Info("invalid validation rule: podSecurity, cel, patterns, or deny expected")
}

var action kyvernov1.ValidationFailureAction

action = v.policyContext.Policy().GetSpec().ValidationFailureAction
action := v.policyContext.Policy().GetSpec().ValidationFailureAction

// process the old object for UPDATE admission requests in case of enforce policies
if action == kyvernov1.Enforce {
Expand Down

0 comments on commit 897dbf7

Please sign in to comment.