Skip to content

Commit

Permalink
oauthendpoints: filter only relevant configmaps and secrets to the OA…
Browse files Browse the repository at this point in the history
…uthRouteCheckController
  • Loading branch information
liouk committed Oct 3, 2023
1 parent 8f41a1d commit e3dfe2b
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions pkg/controllers/oauthendpoints/oauth_endpoints_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,29 @@ func NewOAuthRouteCheckController(
return getOAuthRouteTLSConfig(cmLister, secretLister, ingressLister, systemCABundle)
}

filterFunc := factory.NamesFilter(
// NS: openshift-authentication
"oauth-openshift",
"v4-0-config-system-router-certs",
"v4-0-config-system-custom-router-certs",

// NS: openshift-config-managed
"default-ingress-cert",
)

filteredInformers := []factory.Informer{
cmInformer,
secretInformer,
routeInformer,
ingressInformer,
}

return endpointaccessible.NewEndpointAccessibleController(
"OAuthServerRoute",
operatorClient,
endpointListFunc, getTLSConfigFunc,
[]factory.Informer{
cmInformer,
secretInformer,
routeInformer,
ingressInformer,
},
nil,
filteredInformers, filterFunc,
recorder,
wait.Jitter(time.Minute, 5.0))
}
Expand All @@ -93,6 +106,7 @@ func NewOAuthServiceCheckController(
kubeInformersForTargetNS.Core().V1().ConfigMaps().Informer(),
kubeInformersForTargetNS.Core().V1().Services().Informer(),
},
nil, nil,
recorder,
wait.Jitter(time.Minute, 1.0))
}
Expand Down Expand Up @@ -120,6 +134,7 @@ func NewOAuthServiceEndpointsCheckController(
kubeInformersForTargetNS.Core().V1().Endpoints().Informer(),
kubeInformersForTargetNS.Core().V1().ConfigMaps().Informer(),
},
nil, nil,
recorder,
wait.Jitter(time.Minute, 1.0))
}
Expand Down

0 comments on commit e3dfe2b

Please sign in to comment.