-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cluster provisioning part 1 #12
Cluster provisioning part 1 #12
Conversation
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.
Looks relatively small, you're next on my list!
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 think other than my pedantry, it's good to test on Monday. Looking forward to it!
} | ||
|
||
// find rules to delete | ||
for id := range provisionedSet { |
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.
Okay so you can now do...
import (
"github.com/spjmurray/go-util/pkg/set"
)
func foo() {
// Nice data types!
actual := set.New[string]()
required := set.New[string]()
for _, rule := range rules {
actual.Add(rule.ID)
}
... etc
// Even nicer Cantor style set theory jazz!
return required.Difference(actual), actual.Difference(required)
}
Docs 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.
I'll get it updated before your Monday starts ;)
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.
You could even go as far as something like...
type RuleList []Rule
func (l RuleList) IDs() iter.Seq[string] {
return func(yield func(s string) bool) {
for _, r := range l {
if !yield(r.ID) {
return
}
}
}
}
then...
actual := set.New(slices.Collect(rules.IDs())...)
some of the new stuff in Go is bloody lovely 😻
Wing it, I can "create" a cluster in the UI and it says provisioned, I'll add in issues as I encounter them! |
This pull request implements the provisioning of compute clusters, integrating the latest version of the region service with a shift from physical networks to a more flexible generic network model. While the core provisioning functionality is in place, there are a few features still pending implementation, such as the image selector logic, OpenAPI cluster status support, and the logic to provide custom configuration options post-provisioning.