--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CANw6fcFgi%3DPC9CEiguDamcnqyNU6peefL7E-4ycyd_kcJwzEXA%40mail.gmail.com.
I don't know that it's obvious that consensus exists. Conditions are currently a flexible status reporting mechanism with a consistent schema for inspection. Trying to constrain that flexibility with opinionated recommendations that even this group doesn't entirely agree upon suggests that the flexibility is useful and exercised. It also suggests that the constraints the KEP proposes work against the discovered utility of conditions as a concept.As a group, I think we should be ok with the idea that consensus may not be found. Regarding the particulars of the last comment:
- Polarity recommendations are inherently opinionated. I don't think that one size fits all and I would recommend against creating an opinionated recommendation guide in this instance.
- Recommending conditions as high level status. My read of the PR comments suggests there isn't uniform agreement that this is a goal. However, we do like being able to combine .status.conditions from multiple sources is useful. A recommendation to use domain specifiers outside of "primary" ownership could be helpful.
- A library to help with this. The request here is a little too vague. Enforcing the semantics of the KEP in question seems too opinionated. Simply providing generic Find, Add, Remove probably doesn't need a KEP. If more than that is needed, a separate write up makes sense, but I wouldn't expect discussion about it in this change.
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/4b82f00e-ef40-4f6c-9eab-422827d6ec9eo%40googlegroups.com.
This hasn't moved for a while, and I'm kind of stuck waiting, so here are some thoughts. Sorry this turned out longer than I hoped.The tl;dr is that if https://github.com/kubernetes/community/pull/4521 isn't going to merge, then *something* needs to be done to bring the api conventions in line with actual practice, so that people adding new Conditions to the world can be confident they're useful.Without recommendations around polarity and the associated behavior, the api conventions around Conditions are much less useful, and don't reflect the current state of the world. The fact is, some projects are already using positive polarity. All we have at the moment is confusion because the conventions doc doesn't reflect what's happening.
For example:
In the current conventions doc, it's recommended that that conditions indicate state in the `abnormal-true` polarity. At the same time, the conditions document says that the absence of a condition should be treated the same as `Unknown` - meaning "this condition *may* exist."
However, for abnormal-true polarity Conditions, in practice, there's not much difference between `Unknown` and `False`, because if anything is going to take an action based on the state of the condition, it's only going to be on the `True` state. The difference between "there's no error" and "I don't know if there's an error" is less relevant when you only care when there's *definitely* an error.This means that it's kind of implied by the current conventions document that it's okay for conditions to appear when they are `True`, and disappear otherwise. This is how I *assumed* Conditions worked until pretty recently, and it's not really addressed by the API conventions doc.For positive conditions, though, they *must* always be present, since the distinction between `Unknown` and `False` is relevant (and is usually analogous to the distinction between `hasn't failed or succeeded yet` and `definitely failed`.
What do I want here?
As the owner of a CRD that I'm trying to add Conditions to, what I need to know is:
- what's the expected lifecycle of Conditions? Should a relevant Condition be added as `Unknown` by a relevant controller as soon as it first sees the object? And then updated between the states?
- If I do decide to implement positive conditions, how do I signal that to naive consumers of my CRD?
If there's not going to be consensus about the recommended polarity, that's fine, but in the absence, since some people are using positive-polarity conditions, there *should* be a recommended way to signal that a particular condition is a positive one.
Ways that I've seen suggested to handle this situation, given lack of consensus are:
- add an optional, but recommended field to the upstream condition that indicates the polarity. `polarity`, `isProblem`, or whatever name, absence indicates `abnormal-true` polarity, but you can set it to indicate `normal-true` (positive) polarity. The advantage of this approach is that if can be backported to the `Ready` condition and any other outliers, and also it allows for the same containing object to hold conditions with different polarities.
- Add an apigroup level mechanism (by convention) to determine the polarity of conditions for objects under that apigroup. I'm thinking here of a package-level constant or method that tells you how the Conditions registered under that package would behave. This does not allow easy coordination of conditions on a single containing object, though.
Especially for CRDs, Conditions are becoming the place where the rubber meets the road in terms of actually exposing state to the users of an object. We, as a project, really need a consistent story for how they work to enable people to build things on top of them.I acknowledge that adding actual status fields is an option, but the commonality between the structure of Conditions means that it's a good way to extensibly add relevant information without making tooling to consume that information much harder.--On Mon, 22 Jun 2020 at 08:24, James Peach <jor...@gmail.com> wrote:--
On Thursday, June 18, 2020 at 10:31:20 PM UTC+10, David Eads wrote:I don't know that it's obvious that consensus exists. Conditions are currently a flexible status reporting mechanism with a consistent schema for inspection. Trying to constrain that flexibility with opinionated recommendations that even this group doesn't entirely agree upon suggests that the flexibility is useful and exercised. It also suggests that the constraints the KEP proposes work against the discovered utility of conditions as a concept.As a group, I think we should be ok with the idea that consensus may not be found. Regarding the particulars of the last comment:
- Polarity recommendations are inherently opinionated. I don't think that one size fits all and I would recommend against creating an opinionated recommendation guide in this instance.
- Recommending conditions as high level status. My read of the PR comments suggests there isn't uniform agreement that this is a goal. However, we do like being able to combine .status.conditions from multiple sources is useful. A recommendation to use domain specifiers outside of "primary" ownership could be helpful.
- A library to help with this. The request here is a little too vague. Enforcing the semantics of the KEP in question seems too opinionated. Simply providing generic Find, Add, Remove probably doesn't need a KEP. If more than that is needed, a separate write up makes sense, but I wouldn't expect discussion about it in this change.
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/4b82f00e-ef40-4f6c-9eab-422827d6ec9eo%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CA%2Bdr%3DDg8zMo23SDvB-yU2BDJDBGZcx-owh%2BvPOdFYa6whRqX%2BQ%40mail.gmail.com.
On Tue, Jun 23, 2020 at 6:20 PM Nick Young <ino...@gmail.com> wrote:This hasn't moved for a while, and I'm kind of stuck waiting, so here are some thoughts. Sorry this turned out longer than I hoped.The tl;dr is that if https://github.com/kubernetes/community/pull/4521 isn't going to merge, then *something* needs to be done to bring the api conventions in line with actual practice, so that people adding new Conditions to the world can be confident they're useful.Without recommendations around polarity and the associated behavior, the api conventions around Conditions are much less useful, and don't reflect the current state of the world. The fact is, some projects are already using positive polarity. All we have at the moment is confusion because the conventions doc doesn't reflect what's happening.
For example:
In the current conventions doc, it's recommended that that conditions indicate state in the `abnormal-true` polarity. At the same time, the conditions document says that the absence of a condition should be treated the same as `Unknown` - meaning "this condition *may* exist."
However, for abnormal-true polarity Conditions, in practice, there's not much difference between `Unknown` and `False`, because if anything is going to take an action based on the state of the condition, it's only going to be on the `True` state. The difference between "there's no error" and "I don't know if there's an error" is less relevant when you only care when there's *definitely* an error.This means that it's kind of implied by the current conventions document that it's okay for conditions to appear when they are `True`, and disappear otherwise. This is how I *assumed* Conditions worked until pretty recently, and it's not really addressed by the API conventions doc.For positive conditions, though, they *must* always be present, since the distinction between `Unknown` and `False` is relevant (and is usually analogous to the distinction between `hasn't failed or succeeded yet` and `definitely failed`.
What do I want here?
As the owner of a CRD that I'm trying to add Conditions to, what I need to know is:
- what's the expected lifecycle of Conditions? Should a relevant Condition be added as `Unknown` by a relevant controller as soon as it first sees the object? And then updated between the states?
- If I do decide to implement positive conditions, how do I signal that to naive consumers of my CRD?
If there's not going to be consensus about the recommended polarity, that's fine, but in the absence, since some people are using positive-polarity conditions, there *should* be a recommended way to signal that a particular condition is a positive one.
Ways that I've seen suggested to handle this situation, given lack of consensus are:
- add an optional, but recommended field to the upstream condition that indicates the polarity. `polarity`, `isProblem`, or whatever name, absence indicates `abnormal-true` polarity, but you can set it to indicate `normal-true` (positive) polarity. The advantage of this approach is that if can be backported to the `Ready` condition and any other outliers, and also it allows for the same containing object to hold conditions with different polarities.
- Add an apigroup level mechanism (by convention) to determine the polarity of conditions for objects under that apigroup. I'm thinking here of a package-level constant or method that tells you how the Conditions registered under that package would behave. This does not allow easy coordination of conditions on a single containing object, though.I think the first approach directly solves the problem without bells and whistles, and the second one is super complex.It's slightly silly to (effectively) repeat the schema for each condition in each instance of the condition, but the alternative is some sort of schema registry system which would add a lot of complexity. I don't think it's worth it right now, maybe in v2.I'd recommend the policy:* "Polarity is for people" - state the condition in a natural way for humans to understand.
* Absent means we don't know the value of the condition, and we *also* don't know if the setter of the condition is running/active.
* Setters of conditions should set the condition for the objects they're attempting to monitor, even if "Unknown" is the best they can do for a value at the moment. Otherwise, it's difficult to reason about the set of conditions that might suddenly show up on an object and change your opinion about it.
* [optional, up for debate] Add a `polarity: [AbnormalTrue | AbnormalFalse | InformationalOnly]` field. This is optional, we could also require consumers of the condition to understand by convention, as it is today.
* [optional, up for debate] Add a `modifies: [NameOfOtherCondition1, NameOfOtherCondition2]` field. This, along with polarity, allows consumers to aggregate conditions that they don't understand. It's basically the fully general form of pod readiness gates.
(I think (hope?) we can all agree on the first three; so below I'll discuss the last two.)
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAB_J3baPin4O75vfiSYh7NpJQ9AFGmV2mvBvi%2B1fiu6dFrnEiw%40mail.gmail.com.
> On 25 Jun 2020, at 2:56 am, Daniel Smith <dbs...@google.com> wrote:
>
>
>
[snip]
> I think the first approach directly solves the problem without bells and whistles, and the second one is super complex.
>
> It's slightly silly to (effectively) repeat the schema for each condition in each instance of the condition, but the alternative is some sort of schema registry system which would add a lot of complexity. I don't think it's worth it right now, maybe in v2.
>
> I'd recommend the policy:
> * "Polarity is for people" - state the condition in a natural way for humans to understand.
Perhaps I’m stating the obvious, but I think that part of the issue here is that there is an implicit (?) disagreement on this principle. If conditions are solely for humans, then the polarity doesn’t really matter, since it ought to be “obvious” to a native speaker.
If Conditions are truly for humans, then perhaps you could say thay they have arbitrary polarity, but also designate “Ready” as the well-known Condition that contains rolled-up status. “Ready” would have well-defined semantics and would have to be set by some controller that fully understands the semantics of any consituent Conditions.
To lay all my cards on the table - what I really hoped for Conditions was a way to programatically know whether I have successfully updated a resource of arbitrary type. AFAIK there is no other way in the Kubernetes API to genericaly know whether a resource mutation was successful.
J
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/5434d368-36b6-4569-ba3e-2d76fef2e84dn%40googlegroups.com.
Conditions summarize characteristics of object lifecycle that must be generic across multiple types, have a need to convey both state and human message, and can be extended by third parties to add more nuance to existing lifecycle.
An object in Kube is a distributed state machine. The state specified to that object should always be fields. Some objects have consistent fields that describe status of the state machine. One of those is observedGeneration. Another one is conditions. Some conditions define generic, multi-object state machine characteristics like Available, Progressing, Ready.
It sounds like you've done all the hard work :)I'd love to see a kstatus controller and/or mutating webhook that applied a quiescent condition!
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-architecture" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-arch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/a0cb34ad-de50-4e41-b513-207c2ef8affco%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CANw6fcGV_80ehC3hEn3bdm%2BzhniJfCntTJPdAV0iDSVvCshAUg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAB_J3bYGQrpn28Nadg3TmZeUM7HpHeJLbmfLWr52%3DiK9FdRNvA%40mail.gmail.com.