Kubeadm: Change FetchConfigFromFileOrCluster parameters to improve cmd upgrade, join and reset tests

Created on 26 Oct 2018  路  11Comments  路  Source: kubernetes/kubeadm

Is this a BUG REPORT or FEATURE REQUEST?

Choose one: FEATURE REQUEST

What happened?

configutil.FetchConfigFromFileOrCluster and configutil.loadInitConfigurationFromFileuse the constants.KubernetesDir

What you expected to happen?

Make KubernetesDir a parameter in both so we can mock this on upgrade, join ad reset command tests.

lifecyclactive prioritbacklog

Most helpful comment

@yagonobre I am actually doing some experimental work in that field, trying to share more code between InitConfiguration funcs, optimize stuff a bit and reduce the unnecessary usage of InitConfiguration.
So, on my side, I reduced the calls to this func to a single one and largely got it replaced by a func, that has almost the same signature, but fetches config solely from the cluster.

All 11 comments

@timothysc I'll work on that

/lifecycle active
thanks @yagonobre

/assign

@neolit123 i think we can close this right?

i don't think we can yet.

@yagonobre I am actually doing some experimental work in that field, trying to share more code between InitConfiguration funcs, optimize stuff a bit and reduce the unnecessary usage of InitConfiguration.
So, on my side, I reduced the calls to this func to a single one and largely got it replaced by a func, that has almost the same signature, but fetches config solely from the cluster.

Thanks @rosti, I was off in the last 2 week due to kubecon, I'll take a look at this in a bit.

can we close this @rosti ,@yagonobre ?

@neolit123 unfortunately not, I'll have a pr this week.

Move to 1.15

Move to 1.15

done.

Was this page helpful?
0 / 5 - 0 ratings