Replies: 4 comments 15 replies
-
The current answer (where In #162 and for what's in scope in v0.1.0, the answer is the same (though in v0.1.0, we're introducing In the future, I imagine we'll iterate quite a bit on this answer. But regardless, my belief is that version specification (or lack thereof) should be modeled as a constraint on resolution. The initial set of possible versions is "any", and then various things contribute to that set being reduced:
The If we want an imperative upgrades and version selection UX that aligns with the APIs users are using, perhaps we should seriously consider a helm-like model where a client does off-cluster resolution based on off-cluster catalog configurations and then applies the result to the cluster. Addressing the specific options laid out above, my two cents are:
This is certainly an option that is fairly implementable in a declarative API. Though I have a couple of arguments against it:
In this scenario, the on-cluster resolver is essentially reduced to "yeah I double checked this for you, looks good on my end". It wouldn't actually do any version selection for you.
What does "nothing happens" mean here? At a minimum, something would need to happen to tell the user what's (not) happening. Usually "nothing happens" in the context of a declarative API is an anti-pattern because it sounds lot like "ignore user intent", unless we're saying that there's an In-N-Out Burger style secret menu in the Operator API where setting
By "latest", do you actually mean "best available", where "best" is "highest semver that meets all constraints"? If so, this is my favorite option. It seems the most intuitive and logical to me in the context of a declarative Operator API.
This sounds a lot like the idea that @bparees and I were tossing around in this slack thread: https://kubernetes.slack.com/archives/C0181L6JYQ2/p1680723779244959 A potential future avenue, one we likely need to explore, but one that needs some careful thought, some prototyping and demoing. And then maybe asking some unsuspecting users to use it in front of us to see if it makes sense to them. |
Beta Was this translation helpful? Give feedback.
-
At the risk of broadening this discussion, my belief is that we should treat this Right now the operator-controller upgrade policy is "anytime a reconciliation happens", but it doesn't have to be that way. In a future iteration, we can zero in on upgrade policy with the understanding that there are two separate concepts:
This is sort of the reason that I'm still somewhat adamant that we allow specifying a version range. On one hand, we all seem to be comfortable with the concept of specifying a channel, but a channel is literally just a subset of versions in a package. Mechanically, its the exact same as a version range except that it is defined by the operator author, not the cluster admin. So IMO arguments against version range are somewhat cluster-admin-hostile because they deny cluster admins a tunable knob that we're giving operator authors. Why should operator authors have more control over a cluster's version constraint configuration than a cluster admin? |
Beta Was this translation helpful? Give feedback.
-
I actually prefer (1), in that the version must be specified; even if it is |
Beta Was this translation helpful? Give feedback.
-
@bparees and I have had further discussions in this realm, and I think we have both formed a consensus (between the two of us, at least) that:
So the simplest workflow with minimum field setting would end up looking something like:
After this workflow, if a user wants to upgrade, they would need to change the upgrade policy field to something other than "never", at which point step (5) changes to handle the new upgrade policy semantics. With this sort of implementation, another way to trigger an "upgrade" would be to manually delete the underlying BD. At that point, the operator controller's view of the world is "this operator is not installed", so it would end up going down the path of an initial install resolution and another BD creation. IMO, it needs to work this way because it is typically an anti-pattern for controllers use the status of their primary CR (that they wrote in a previous reconciliation) as input. Status on primary CRs is reconciliation output. |
Beta Was this translation helpful? Give feedback.
-
What is the behavior of
spec.version
when not specified? There are multiple possibilities, some of which are listed here:spec.version
must be specified.spec.version
is optional, when not specified, nothing happens.spec.version
means "latest", such that it can be used to upgrade to the latest version of an operator when it becomes available.spec.version
means "any", such that when initially created, it will refer to any available version (for example, "latest"). On subsequent updates, a non-specifiedspec.version
will match the currently installed version, so no updates occur.EDIT: If you think there might be other behaviors, please list them, so we can discuss them!
Beta Was this translation helpful? Give feedback.
All reactions