-
Notifications
You must be signed in to change notification settings - Fork 37
Feature/hash failure domain naming #147
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
Feature/hash failure domain naming #147
Conversation
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -63,7 +63,7 @@ type CloudStackMachineSpec struct { | |||
|
|||
// Optional affinitygroupids for deployVirtualMachine | |||
// +optional | |||
AffinityGroupIDs []string `json:"affinitygroupids,omitempty"` | |||
AffinityGroupIDs []string `json:"affinityGroupIDs,omitempty"` |
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.
Just a fixup for JSON tagging consistency.
|
||
// Check if the passed network was an isolated network or the network was missing. In either case, create a | ||
// CloudStackIsolatedNetwork to manage the many intricacies and wait until CloudStackIsolatedNetwork is ready. | ||
if r.ReconciliationSubject.Spec.Zone.Network.ID == "" || | ||
r.ReconciliationSubject.Spec.Zone.Network.Type == infrav1.NetworkTypeIsolated { | ||
netName := r.ReconciliationSubject.Spec.Zone.Network.Name | ||
if res, err := r.GenerateIsolatedNetwork(netName)(); r.ShouldReturn(res, err) { | ||
if res, err := r.GenerateIsolatedNetwork( | ||
netName, func() string { return r.ReconciliationSubject.Spec.Name })(); r.ShouldReturn(res, err) { |
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.
Need to pass failure domain name in here.
Codecov Report
@@ Coverage Diff @@
## main #147 +/- ##
==========================================
- Coverage 24.35% 24.17% -0.19%
==========================================
Files 43 43
Lines 3798 3748 -50
==========================================
- Hits 925 906 -19
+ Misses 2727 2699 -28
+ Partials 146 143 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -63,7 +63,7 @@ type CloudStackMachineSpec struct { | |||
|
|||
// Optional affinitygroupids for deployVirtualMachine | |||
// +optional | |||
AffinityGroupIDs []string `json:"affinitygroupids,omitempty"` | |||
AffinityGroupIDs []string `json:"affinityGroupIDs,omitempty"` |
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 don't think we should change this now. EKS-A is already and other customers may also be using this field and changing the serialization/deserialization patterns feels risky, with no gain. I'm inclined to keep these as they are and fix later on in an intentional way
Unless this is strictly for the v1beta2 types, and not v1beta1? Same for the other changes involving json
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.
Indeed, this is only on v1beta2 types.
That's why I wanted to jamb this into this release. It won't be easy to do outside of an API version bump.
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.
Why are all these test data files deleted?
They are generated files via |
/approved |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maxdrib, rejoshed, wongni The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue #, if available:
Description of changes:
Meta naming for failure domain custom resource objects currently follows
failureDomainName
+-
+clusterName
.This was to work around EKS-A's decision to put all clusters in a single namespace.
Unfortunately k8s object names can only be 64 characters long and this leads to the concern that CAPC will break for any combination of names that leads to >64 character failure domain naming.
This uses a hash of the failure domain name and the cluster name to predictably generate a failure domain's meta name.
Also should close #113 (comment)
Testing performed:
All unit tests passing locally.
Ran e2e PR-Blocking tests successfully.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.