@@ -266,7 +266,7 @@ func (d *ProjectStatusDescriber) Describe(namespace, name string) (string, error
266
266
267
267
allMarkers := osgraph.Markers {}
268
268
allMarkers = append (allMarkers , createForbiddenMarkers (forbiddenResources )... )
269
- for _ , scanner := range getMarkerScanners (d .LogsCommandName , d .SecurityPolicyCommandFormat , d .SetProbeCommandName ) {
269
+ for _ , scanner := range getMarkerScanners (d .LogsCommandName , d .SecurityPolicyCommandFormat , d .SetProbeCommandName , forbiddenResources ) {
270
270
allMarkers = append (allMarkers , scanner (g , f )... )
271
271
}
272
272
@@ -374,13 +374,19 @@ func createForbiddenMarkers(forbiddenResources sets.String) []osgraph.Marker {
374
374
return markers
375
375
}
376
376
377
- func getMarkerScanners (logsCommandName , securityPolicyCommandFormat , setProbeCommandName string ) []osgraph.MarkerScanner {
377
+ func getMarkerScanners (logsCommandName , securityPolicyCommandFormat , setProbeCommandName string , forbiddenResources sets. String ) []osgraph.MarkerScanner {
378
378
return []osgraph.MarkerScanner {
379
379
func (g osgraph.Graph , f osgraph.Namer ) []osgraph.Marker {
380
380
return kubeanalysis .FindRestartingPods (g , f , logsCommandName , securityPolicyCommandFormat )
381
381
},
382
382
kubeanalysis .FindDuelingReplicationControllers ,
383
- kubeanalysis .FindMissingSecrets ,
383
+ func (g osgraph.Graph , f osgraph.Namer ) []osgraph.Marker {
384
+ // do not attempt to add markers for missing secrets if dealing with forbidden errors
385
+ if forbiddenResources .Has ("secrets" ) {
386
+ return []osgraph.Marker {}
387
+ }
388
+ return kubeanalysis .FindMissingSecrets (g , f )
389
+ },
384
390
kubeanalysis .FindHPASpecsMissingCPUTargets ,
385
391
kubeanalysis .FindHPASpecsMissingScaleRefs ,
386
392
kubeanalysis .FindOverlappingHPAs ,
0 commit comments