Skip to content

Conversation

@anik120
Copy link
Contributor

@anik120 anik120 commented Sep 19, 2025

No description provided.

@anik120 anik120 force-pushed the olmv1-single-own-namespace branch from c9b7c0f to ac0ba97 Compare September 19, 2025 19:10
@anik120 anik120 changed the title OLMv1 single/own namespace install mode support OPRUN-4133: OLMv1 single/own namespace install mode support Sep 19, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 19, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 19, 2025

@anik120: This pull request references OPRUN-4133 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.21.0" version, but no target version was set.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@anik120 anik120 force-pushed the olmv1-single-own-namespace branch from ac0ba97 to 8d51ffd Compare October 3, 2025 02:40
Copy link
Contributor Author

@anik120 anik120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perdasilva addressed your feedback, PTAL

//
// inline must be set if configType is 'Inline'.
//
// +kubebuilder:validation:Type=object

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth calling out that adding this annotation ensures that inputs that are valid json, but not key/value config, are rejected. E.g. something like just true is valid JSON (a boolean), but it wouldn't be valid configuration. Enforcing an object ensures that we have something that resembles a configuration/values files, e.g. key: value.

We should also think about empty object mechanics here, e.g. {}. Maybe that should be treated as no configuration and defaults used (cc @joelanford wdyt?).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment about the key/value config.

We should also think about empty object mechanics here, e.g. {}. Maybe that should be treated as no configuration and defaults used

Or should we prevent empty objects in the first place?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my initial instinct. I just don't know if there's an use-case where you'd want to specifically set an empty configuration. I can't think of one, but that doesn't mean there isn't one XD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the doc strings upstream, so we may want to update this section a little for those changes (although I'm still waiting on an approval for that PR) ref

Or, just put a link to the upstream definition at main and say that this excerpt is at the time or writing and that doc strings may vary (but the structure itself it this - unless new types are added)

@anik120 anik120 force-pushed the olmv1-single-own-namespace branch from 8d51ffd to a93ffa3 Compare October 13, 2025 16:05
- Re-introducing multi-tenancy features or supporting multiple installations of the same operator
- Supporting MultiNamespace install mode (watching multiple namespaces)
- Modifying the fundamental OLM v1 architecture or adding complex multi-tenancy logic
- Supporting install mode switching after initial installation as a first-class feature
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are treating this as configuration, I think we would support install mode switching, right? Because, more generally, we're allowing configuration to be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perdasilva could you chime in here (I'm going off of Per's instruction to include this point here)

Copy link

@perdasilva perdasilva Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a distinction that could be better worded here. Supporting install mode switching could mean a couple of things:

  1. you can change the value of/remove watchNamespace
  2. that change will work

I think 1 is in scope and 2 is not. It would be up to the author to make that happen, or to be able to recover from that switch. OLMv1 will just compute the correct resources and pivot towards them.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2025
Copy link

@oceanc80 oceanc80 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve


**Installation Success Rate:**

* **RBAC Validation Complexity:** Namespace-scoped installations require more complex RBAC validation to ensure the ServiceAccount has appropriate permissions for the target namespace. RBAC misconfigurations that work in AllNamespaces mode may fail in Single/OwnNamespace modes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular OLMv1-specific concern here? Or are we trying to reiterate something about the existing complexity of registry+v1 bundles in general?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think more of the latter. Just calling out RBAC gets more complex for these install modes


**Installation Time:**

* **RBAC Generation Complexity:** Converting CSV `permission` to namespace-scoped Role/RoleBinding resources requires additional processing time. Complex operators with extensive permission requirements will see increased installation duration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true, is it?

  • When watching all namespaces: Create a ClusterRole/ClusterRoleBinding for each set of permissions
  • When watching a single namespace: Create a Role/RoleBinding in the watched namespace for each set of permissions

Either way the computational complexity is identical, is it not?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's remove this. I don't think the install time difference would be measurable/noticeable in any meaningful way

**Operator Availability:**

* **ServiceAccount Permission Dependencies:** Namespace-scoped operators depend on ServiceAccount permissions that may be modified by namespace administrators, creating additional failure points not present in cluster-scoped installations.
* Example: Namespace admin removes critical RoleBinding, causing operator to lose access to required resources.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't OLMv1 re-create this RoleBinding?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, how is this different than a cluster admin deleting a ClusterRoleBinding when an operator is watching all namespaces?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! Let's remove.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2025
Per Goncalves da Silva and others added 2 commits December 17, 2025 14:24
@anik120
Copy link
Contributor Author

anik120 commented Dec 17, 2025

@joelanford PTAL

@perdasilva
Copy link

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2025
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 5, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven, joelanford, oceanc80

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 5, 2026

@anik120: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 0a2f3cc into openshift:master Jan 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants