Closed kadisi closed 3 years ago
There are quite a few clean ups in this change. Which is the part of the code that resolves the problem mentioned in the PR title?
There are quite a few clean ups in this change. Which is the part of the code that resolves the problem mentioned in the PR title?
@Fei-Guo
this is the part of the code:
func Initialize(mgr manager.Manager, stopCh <-chan struct{}) error {
cli, err := client.NewDelegatingClient(client.NewDelegatingClientInput{
CacheReader: mgr.GetAPIReader(),
Client: mgr.GetClient(),
})
if err != n
The "Initialize" method is executed when the cache is not yet synchronized, so it gets an cache not started
error when it gets the secret。 so the CacheReader
doesn't have to be assigned with mgr.GetCache()
.
when upgrade the version of controll-runtime to 0.7.0. yurt-app-amanger will come the error:
the cache is not started, can not read objects
this pr fix this error.
Signed-off-by: kadisi iamkadisi@163.com
@charleszheng44