update Solo to load remote config near entry point #1171
Labels
Multiple Cluster Support
Issues which are only required to enable Solo support for multi-cluster deployments.
P1
High priority issue. Required to be completed in the assigned milestone.
released
Currently the remote config is loaded usually after a commands initialize method. The problem here is that lease create is called at the top of the command and lease needs to know which cluster/context to create the lease on. In the case of multi-cluster, we will have multiple leases and multiple K8 instances (not implemented currently), so to avoid possible issues we need to load the remote config as close to the entry point of Solo as possible.
Solution:
In
src/index.ts:main(argv: any)
add a property that stores a function, similar to processArguments. This function will load the remote config. Then below the current.middleware(processArguments, false)
add another middleware call for the function that will load the remote config.Certain commands do not need to call K8 nor load the remote config. We should check the argv and not load the remote config in these conditions.
-h
,--help
-v
,--version
init
node
and subcommandkeys
Then remove all of the existing calls that load the remote config.
The text was updated successfully, but these errors were encountered: