Skip to content

Commit

Permalink
PodResult to pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
jordandoig committed Dec 16, 2020
1 parent 7374d8b commit 717d9b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/validator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ValidateController(ctx context.Context, conf *conf.Configuration, controlle
Name: controller.ObjectMeta.GetName(),
Namespace: controller.ObjectMeta.GetNamespace(),
Results: controllerResult,
PodResult: podResult,
PodResult: &podResult,
}

return result, nil
Expand Down
5 changes: 5 additions & 0 deletions pkg/validator/fullaudit.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ func RunAudit(ctx context.Context, config conf.Configuration, kubeResources *kub
return AuditData{}, err
}

// results, err := ValidateIngresses(ctx, &config, kubeResources)
// if err != nil {
// return AuditData{}, err
// }

auditData := AuditData{
PolarisOutputVersion: PolarisOutputVersion,
AuditTime: kubeResources.CreationTime.Format(time.RFC3339),
Expand Down
2 changes: 1 addition & 1 deletion pkg/validator/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type ControllerResult struct {
Namespace string
Kind string
Results ResultSet
PodResult PodResult
PodResult *PodResult
CreatedTime time.Time
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (v *Validator) handleInternal(ctx context.Context, req admission.Request) (
if err != nil {
return nil, err
}
return &controllerResult.PodResult, nil
return controllerResult.PodResult, nil
}

// Handle for Validator to run validation checks.
Expand Down

0 comments on commit 717d9b2

Please sign in to comment.