-
Notifications
You must be signed in to change notification settings - Fork 50
fix: Adding namespace when converting bundle from registryv1 to plain #678
fix: Adding namespace when converting bundle from registryv1 to plain #678
Conversation
e38fae1
to
4d391f4
Compare
Codecov Report
@@ Coverage Diff @@
## main #678 +/- ##
==========================================
- Coverage 21.24% 19.21% -2.03%
==========================================
Files 12 13 +1
Lines 772 1046 +274
==========================================
+ Hits 164 201 +37
- Misses 583 801 +218
- Partials 25 44 +19
|
Note: this PR updates the registry v1 provisioner to mirror OLM V0 behavior, in which the namespace is set to the installNamespace if the resource does not specify a namespace. |
This makes sense to me because its an implicit feature of the registry+v1 bundle format that objects without |
@awgreene, if a bundle object "A" hardcodes its namespace to "foo" and then someone creates a subscription resulting in the installation of that bundle in namespace "bar", where does "A" end up? "foo" or "bar"? |
@joelanford my impression was that the namespace is always set to the installNamespace. Let me double check. |
This is interesting @joelanford. Based on the ensure methods defined in step_ensurer.go, some objects end up in
|
NVM, @varshaprasad96 pointed out that the namespace for unstructured objects are set here, I thought that the ensure methods were responsible for setting the namespace as all ensure methods do other than EnsureUnstructureObject. All namespaced resources would be created in the |
@varshaprasad96 for both of your questions, for better or worse, I think we should make registry+v1 bundles in OLMv1 behave as closely as possible to OLMv0. Reasons being:
|
@joelanford does your answer change at all (maybe only from an implementation perspective) if/when we switch away from provisioners that are tied to bundle format? i.e. unpack-process-apply? |
I was thinking about that last night. The idea that came to mind first was to expose something like We probably have to stew on it more, but my instinct is that we should:
|
Currently, if the objects being passed through the bundle do not have their namespaces set, they were being created on the "rukpak-system" namespace. This PR fixes this issue for only "registryV1" bundles. It sets the namespaces to installNs if not provided by default. Signed-off-by: Varsha Prasad Narsing <[email protected]>
4d391f4
to
ad5b5d8
Compare
85bfd14
into
operator-framework:main
Currently, if the objects being passed through the bundle do not have their namespaces set, they were being created on the "rukpak-system" namespace. This PR fixes this issue for only "registryV1" bundles. It sets the namespace to installNs if not provided by default.