Closed cdjohnson closed 5 months ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: cdjohnson
Once this PR has been reviewed and has the lgtm label, please assign joelanford for approval by writing /assign @joelanford
in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Curious, what use case does this address?
Curious, what use case does this address?
Our larger customers want to create large deployment topologies within a single cluster that allow different isolation layers to allow different instances of Products (Operators and Operands). Our products are made up of many operators, some of which are shared and some are not, so it can get fairly complicated quickly. In the most complicated scenario, you may have a multiple Trees of Namespaces, where each layer in the tree represents a different Control Plane, or Isolation Layer.
The goal of this was to help developers and SREs visualize these more complex deployment scenarios and validate their configurations.
Wouldn't this question be best answered from the perspective of an operator configured / scoped via an OperatorGroup
? I.e. instead of listing the OperatorGroup
themselves, which are sort of an abstract concept rather, we could list all operators and their scope
@dmesser This is in the scope of the current OLM APIs and it's current capabilities. This is showing what the Deployment Environment/Topology that the Operators will be installed into. Although the OperatorGroup is an abstraction, customers need to set them up correctly and orchestrate the operators to install into that environment to have success.
So, this shows that the Namespaces are setup properly even before the first operator is provisioned.
So:
I guess I am trying to understand the situation in which a user would use this command. It's not obvious to me.
Let's say I want to install an operator or a set of related operators. Why is the question which operator groups already exist interesting to me? Wouldn't I be rather interest in:
1) discovering which operators are available for me to install (this plugin can do that)
2) select the version of the operator I want to install (this plugin cannot do this yet, but we have made in-roads into this with packageserver
)
3) installing the operator(s) which a specific scope (this tool can do this)
4) validate the operators are installed and healthy (this tool will check the install, install health needs more discussion)
I don't see OperatorGroups
in here as a primary concern. They are an implementation detail of how the operator got configured and installed. The plugin sets them up transparently in step 2. If there are 2 or 10 OperatorGroups
installed in other namespaces, potentially scoped the (partially) same way the next one is about to come down, doesn't really matter IMHO. What matters is that we notice when an operator has already be installed and configured to be available in the same namespace / namespaces you are targeting. I am not sure that we have made that yet.
The problem is that we can't rely on OLM to resolve and provision the dependent operators for us, because they live at different scopes. Some customers (big ones) want to use the principle of least privilege a the Namespace layer. This is an extremely "advanced" use case, but one that we need to support.
Primary goals:
Let's say we have 4 layers:
In order to realize this, we have a tree of namespaces and nested operator groups. 1 manages 2 manages 3 manages 4
Because of this, we need to design the Namespaces and their OperatorGroups ahead of time, essentially Modeling the desired topology, and then deploy the Operators and Operands into that topology, not depending on OLM to auto-provision dependencies.
Here's a picture:
@dmesser So, I think I can clarify what the benefit of this tool could be:
@cdjohnson: PR needs rebase.
This is a new feature:
kubectl-operator list-operatorgroups
The goal here is to:
Example output using a set of test data found in
assets/operatorgroup-list-test
:$ bin/kubectl-operator list-operatorgroups -A -g