The bug seems to be currently dormant but I managed to trigger it in
some manual tests.
When the bug is triggered it appends empty --prune-whitelist without any
value which in turn can capture the next flag and can cause addon
manager to fail.
E.g. when bug is not triggered the kubectl command looks like this
```
kubectl ... --prune-whitelist extensions/v1beta1/Ingress --recursive ...
```
When it's triggered it will be
```
kubectl ... --prune-whitelist --recursive ...
```
which will capture the --recursive flag and will make addon-manager to
fail as there are no yamls in the top directory.
Clean up useless functions, only keep the basic function Deal
and the function DealIntoHand which will be used by Priority
and Fairness.
Improve some comments for constants and functions.
Introduce Dealer to combine parameters and methods into a whole.
Use fixed-size slice to improve performance.
Use math.Ceil and math.Log2 to calculate required entropy bits.
Make the given hand adaptive to handSize in DealIntoHand.
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
update common controller
add comment
update to cached data
add cacheReadType type
update logic for disk reconcile loop to read from cache
update delete cache for node
review feedback
We create and use a dynamic certificate provider for the SNI serving
certificates. Currently we only use static serving certificate
providers, so the files are not reloaded, but we should be able to move
to a provider that is able to reload later on.
The tests were using a fake timer that only ticked when the test cases
told it to, so it would only be correctly testing the
BoundedFrequencyRunner functionality if the test cases made it tick
whenever the BFR timer was supposed to expire, and didn't make it tick
at any other time. But they didn't do that. Fix it to tick
automatically at the correct times, and update the test cases
accordingly (including adding a new helper method for asserting that
the runner did nothing in cases when it's expected to have done
nothing).
Also fix two unrelated minor bugs in fakeTimer.
Call DescribeVolumes less frequently so controller-manager is not throttled
by AWS. DescribeVolumes is basically the only Kubernetes call that suffers API
throttling by AWS.