-
Notifications
You must be signed in to change notification settings - Fork 8
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
Settle down on the naming condition: somethingRef vs somethingName #91
Comments
/cc @tuminoid @lentzi90 @elfosardo @Rozzii Looking for feedback here. |
Ref suffix is more flexible for future changes, or when it refers across namespaces, but when relationship is within same namespace and of known type, Name seems to be used. I quickly grepped the repos I have cloned (opinionated sample of course) for hits on Name: and Ref: in manifests and its roughly split 50/50, even within projects. Almost all repos have both. Lets also ping @adilGhaffarDev and @kashifest for this. |
Similarly, I'm starting to think that we need simple names for links to IronicDatabase, TLS and credentials secrets, and so on. |
As discussed in metal3-io#91, lets use simpler reference names and reserve the SomethingRef format for when the field can refer to different kinds or at least namespaces. This is quite a breaking change but I don't see a lot of value in going through deprecation since it's going to significantly complicate the code nobody should be using in production yet. Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
Not an expert in this regard but I am leaning towards Refs (although I don't have any strong points against names.) |
Hmm, we got a split here. I've just posted a WIP patch using names, so that you can compare two approaches. |
As discussed in metal3-io#91, lets use simpler reference names and reserve the SomethingRef format for when the field can refer to different kinds or at least namespaces. This is quite a breaking change but I don't see a lot of value in going through deprecation since it's going to significantly complicate the code nobody should be using in production yet. Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
To my understanding, Otherwise, I think it's always better to have your own |
regarding LocalObjectReference, after reading this:
it's better to have your own |
As discussed in metal3-io#91, lets use simpler reference names and reserve the SomethingRef format for when the field can refer to different kinds or at least namespaces. This is quite a breaking change but I don't see a lot of value in going through deprecation since it's going to significantly complicate the code nobody should be using in production yet. Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
bit late to the party here but I think the renaming makes sense in terms of semplification and clarity |
I've read somewhere (forgot where) that using SomethingRef of type corev1.LocalObjectReference is the preferred way to link to other objects.
On one hand, it allows adding Kind/Namespace later if needed without a breaking change.
On the other, it feels ugly, and does not seem to be used consistently in other major operators. Postgres uses SecretName/CaSecretName for TLS. CAPI operator has AdditionalManifestsRef. BMO is inconsistent: ConsumerRef, NetworkData, PreprovisioningNetworkDataName.
We need to decide before the MVP.
/triage accepted
The text was updated successfully, but these errors were encountered: