Skip to content

Commit 173d894

Browse files
Merge pull request #272 from tremes/co_names
Fix clusteroperators serialization
2 parents 07f3c56 + e6758ba commit 173d894

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/gather/clusterconfig/operators.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ func gatherClusterOperators(ctx context.Context, configClient configv1client.Con
7777
}
7878
resVer, _ := getOperatorResourcesVersions(discoveryClient)
7979
records := make([]record.Record, 0, len(config.Items))
80-
for _, co := range config.Items {
80+
for idx, co := range config.Items {
8181
records = append(records, record.Record{
82-
Name: fmt.Sprintf("config/clusteroperator/%s", co.Name),
83-
Item: ClusterOperatorAnonymizer{&co},
82+
Name: fmt.Sprintf("config/clusteroperator/%s", config.Items[idx].Name),
83+
Item: ClusterOperatorAnonymizer{&config.Items[idx]},
8484
})
8585
if resVer == nil {
8686
continue

0 commit comments

Comments
 (0)