Skip to content

Move cluster node addition/removal out of "experimental"#271

Merged
markmandel merged 2 commits intoagones-dev:masterfrom
markmandel:feature/add-remove-nodes
Jun 19, 2018
Merged

Move cluster node addition/removal out of "experimental"#271
markmandel merged 2 commits intoagones-dev:masterfrom
markmandel:feature/add-remove-nodes

Conversation

@markmandel
Copy link
Collaborator

Implemented workerqueue for node modifications in the PortAllocator, so that if the master happens to go
down, then the operations the PortAllocator has to do to keep things in check will retry and result in a correct state.

Closes #60

Implemented workerqueue for node modifications in the
PortAllocator, so that if the master happens to go
down, then the operations the PortAllocator has to do
to keep things in check will retry and result in a
correct state.

Closes agones-dev#60
@markmandel markmandel added the kind/feature New features for Agones label Jun 16, 2018
@markmandel markmandel added this to the 0.3.0 milestone Jun 16, 2018
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 821d23b9-e497-429d-8413-84eca82f3906

The following development artifacts have been built, and will exist for the next 30 days:

@markmandel markmandel requested a review from enocom June 19, 2018 18:55
Copy link
Contributor

@enocom enocom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor question. Otherwise, this looks good.

pa.nodeInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: pa.syncAddNode,
AddFunc: func(obj interface{}) {
node := obj.(*corev1.Node)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the semantics of the event handler, but is there a chance that obj isn't of *corev1.Node type? In other words, is this a safe type assertion?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good question - basically, there isn't really. But a good question!

If something other than a Node comes through a Node event handler, then something very weird has happened -- at which point, it really should panic.

Here another example in the Kubernetes sample-controller doing similar things:
https://github.com/kubernetes/sample-controller/blob/master/controller.go#L129

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then panicking is exactly the right thing to do.

Copy link
Contributor

@enocom enocom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@enocom
Copy link
Contributor

enocom commented Jun 19, 2018

@markmandel If you rebase onto master, I'll be happy to merge. 😄

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: ce29bafc-7668-4e57-bd1c-fb9795a8c526

The following development artifacts have been built, and will exist for the next 30 days:

@markmandel markmandel merged commit ad83f37 into agones-dev:master Jun 19, 2018
@markmandel markmandel deleted the feature/add-remove-nodes branch June 19, 2018 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New features for Agones

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants