This repository was archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Please sign your commits following these rules: $ git clone -b "linker" [email protected]:chungers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353961264
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #678 +/- ##
==========================================
+ Coverage 48.61% 48.94% +0.33%
==========================================
Files 80 80
Lines 8350 8411 +61
==========================================
+ Hits 4059 4117 +58
- Misses 3975 3979 +4
+ Partials 316 315 -1
Continue to review full report at Codecov.
|
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Signed-off-by: David Chung <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a very preliminary draft of the Enrollment Controller.
An Enrollment Controller is a controller that ensures the membership of a list of instances is properly synchronized to a downstream Instance plugin. This list of membership can come from either
[]instance.Description
in the configProperties
, orlookup/groupID
, for example,us-east/workers
orgroup/workers
.)The applications of this controller include:
The controller is basically a control loop that periodically queries for membership information from the above source, as a
[]instance.Description
. This is compared to theDescribeInstances
results from querying the downstream Instance plugin. Some extra considerations such as specifying tags for the queries are also supported by the schema (seepkg/controller/enrollment/types/Properties
.) Once the two slices are retrieved, the controller compares the two sets and determine the necessary actions:The controller than invokes the downstream Instance plugin's
Provision
to add new entries, whileDestroy
would remove unmatched entries. I have considered the possibility that theinstance.ID
of each set are not the same (for example, host instance ID, with disk ID). So each side must provide akeyFunc
that can extract a comparable key from the instance.Descriptions. In addition, labels are added to the instances as well (the keyFunc can just extract from the labels).Finally, a single controller can have multiple control loops / rules. Each control loop described above can be accessed at the name
<controller_lookup>/<rule>
where the following are true:Note: One could see that the controller is responsible for a uni-directional sync of membership information into something else. We could implement a bi-directional controller as a separate controller, but at the moment I am not aware of any concrete use cases.
@kaufers
Signed-off-by: David Chung [email protected]