Skip to content

Commit

Permalink
Bug 2002539: Fix wrong rebase of PSP gatherer (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
tremes committed Sep 24, 2021
1 parent acf24a5 commit 4fdf365
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions pkg/gather/clusterconfig/0_gatherer.go
Expand Up @@ -115,6 +115,7 @@ var gatherFunctions = map[string]gathering{
"sap_pods": failable(GatherSAPPods),
"sap_datahubs": failable(GatherSAPDatahubs),
"olm_operators": failable(GatherOLMOperators),
"psps": failable(GatherPodSecurityPolicies),
}

var startTime time.Time
Expand Down
8 changes: 4 additions & 4 deletions pkg/gather/clusterconfig/pod_security_policies.go
Expand Up @@ -17,13 +17,13 @@ import (
// * Id in config: psps
// * Since versions:
// * 4.10+
func (g *Gatherer) GatherPodSecurityPolicies(ctx context.Context) ([]record.Record, []error) {
func GatherPodSecurityPolicies(g *Gatherer, c chan<- gatherResult) {
gatherPolicyClient, err := policyclient.NewForConfig(g.gatherKubeConfig)
if err != nil {
return nil, []error{err}
c <- gatherResult{errors: []error{err}}
}

return gatherPodSecurityPolicies(ctx, gatherPolicyClient)
records, errs := gatherPodSecurityPolicies(g.ctx, gatherPolicyClient)
c <- gatherResult{records: records, errors: errs}
}

func gatherPodSecurityPolicies(ctx context.Context, policyClient policyclient.PolicyV1beta1Interface) ([]record.Record, []error) {
Expand Down

0 comments on commit 4fdf365

Please sign in to comment.