New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advertisement accept policies #181
Conversation
dd16edf
to
9d76d78
Compare
9d76d78
to
2c03b0f
Compare
4355399
to
95b7845
Compare
7d45e19
to
d61f2f7
Compare
e7d633c
to
86c3441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
ca70582
to
816f1e5
Compare
- AdvertisementConfig has been modified with 2 major fields, one for the broadcaster the other for the operator. - in AdvOperatorConfig, the autoAccept flag is now an enum with different types of acceptance policies
The approach now is "apply the config from now on": advertisements already accepted are not deleted if the config changes
added documentation for Cluster configuration
missing parameter in adv operator and peering request operator
816f1e5
to
f5abb20
Compare
|
||
const ( | ||
// AutoAcceptWithinMaximum means all the Advertisement received will be accepted until the MaxAcceptableAdvertisement limit is reached | ||
// AutoAcceptAll can be achieved by setting MaxAcceptableAdvertisement to infinite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fraborg Sorry for coming so late but... what's the value for "infinite" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the maximum value of int32 is 2147483647, but we can set the MaxAcceptableAdvertisement range from 0 to a value we decide, which can be our "infinite"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would write this in the code (or, better, the definition of the structure), so that users know what they can configure.
Btw, not sure if we're telling users if this number refers to the max number of contemporary advertisements accepted, or the total number over time. Just in case, make sure this is clearly explained.
Description
This PR modifies the
ClusterConfig
CRD to define a policy for the acceptance of Advertisements.The AdvertisementConfig has been split into 2 main fields:
AcceptPolicy
is an enum which can have the following valuesAutoAcceptAll
can be achieved by setting MaxAcceptableAdvertisement to infiniteAutoRefuseAll
can be achieved by setting MaxAcceptableAdvertisement to 0Further policies can be easily added
The general approach towards config updates has changed too:
Other fixes
How Has This Been Tested?
test/controller.go
totest/config-watcher.go
adding Advertisement creation on a test cluster