-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨ Add identityRef and cloudName into OpenStackClusterStackReleaseSpec #21
Conversation
Signed-off-by: michal.gubricky <michal.gubricky@dnation.cloud>
326c038
to
bc39a36
Compare
CloudName string `json:"cloudName"` | ||
|
||
// IdentityRef is a reference to a identity to be used when reconciling this cluster | ||
IdentityRef OpenStackIdentityReference `json:"identityRef,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.
In the CAPO, there is *OpenStackIdentityReference, whats the difference?
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 I am correct *
in go is a pointer to the specified type. I think the primary difference is whether IdentityRef
is a pointer or a direct instance of OpenStackIdentityReference
. Using a pointer allows the possibility of a null value, while using an actual instance does not.
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.
Thank you, and why you don't use a pointer?
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, it is up to us. If we want to have possibility of a null
value for this field or not.
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 that it can also speed up code when we work with references so the object doesn't need to be copied
|
||
// OpenStackIdentityReference is a reference to an infrastructure | ||
// provider identity to be used to provision cluster resources. | ||
type OpenStackIdentityReference struct { |
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.
It is somehow possible to import this type from CAPO?
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 can check if it is possible
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.
Thank you
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.
Hey, I think you can import existing types, but let's do it after kubernetes-sigs/cluster-api-provider-openstack#1797 to reduce dependencies.
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.
The mentioned PR is merged in CAPO v1alpha8
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.
IMO this PR could be closed on behalf of #23.
Once CAPO v1alpha8 is available https://pkg.go.dev/sigs.k8s.io/cluster-api-provider-openstack@v0.9.0/api then the renovate
bot will do this job for us and reduce CAPO dependencies.
Closed in favor of #23 |
It is a common pattern in capo