-
Notifications
You must be signed in to change notification settings - Fork 38
Allow multiple nodes have templates (use local storage) #467
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
base: main
Are you sure you want to change the base?
Conversation
TestsPlease note that running unit and e2e tests requires manual approval from a team member. e2e testsWe use labels to control which e2e tests contexts are run:
ℹ️ Ask a team member to add the requested labels if you don't have enough permissions. |
internal/service/vmservice/vm.go
Outdated
for k, v := range m { | ||
return k, v | ||
} | ||
return "", 0 // Fallback (should not happen if len(m) == 1) |
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.
If this should not happen then perhaps it ought to return an error instead of failing silently.
did more intensive testing, not all cases now work, so will be making some changes there. |
fully reworked logic is now pushed, also updated description. |
Issue #, if available:
fixes #451
Adjusted order of how scheduling happens
If we have usable template, determine how we need to schedule
Target
is provided schedule on that node if template is thereTarget
andallowedNodes
missing assume we want all nodes to use in scheduling (discover all nodes)allowedNodes
schedule only onallowedNodes
allowedNodes
still continue to schedule on nodes where template exists.LocalStorage:
options.Target
as we will use template from same node.Fixed existing tests to reflect multiple scenarios (moving out
templateID
andSourceNode
fromsetupReconcilerTest
createVM
had became too complex (gocyclo) as i've written in code for now it should be function to revisit and get into smaller chunks.