In last weeks sig-architecture review of RuntimeClass, there was an inconclusive discussion of how to reference alpha-APIs from stable objects. In this specific case, the question was how to reference the RuntimeClass instance from a Pod, but the problem applies generally to all stable API objects.I want to kick off the follow-up discussion, since I believe a lot of projects are currently blocked on this. The solutions discussed so far include:- Allow annotations, with better guidelines around best practices- Add support for feature-gated fields
- Add an "extensions" list to the ObjectMeta, which can reference arbitrary resources
- Parallel "sidecar" resources that hold the additional fields - either with names matching the extended resource, or a back reference. Either way, this runs into lifecycle issues (how does it work with replication? label-selector?).
We are planning to discuss this in this weeks sig-architecture meeting, but to help us reach a conclusion & unblock these projects, let's start the discussion here.
--
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 post to this group, send email to kubernetes-si...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAUnY2TF8i9_tXGGJcpC_qgVWO-zvWnq0O37G%2BKYvvBQgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Aug 13, 2018, at 8:07 PM, 'Tim Allclair' via kubernetes-sig-architecture <kubernetes-si...@googlegroups.com> wrote:In last weeks sig-architecture review of RuntimeClass, there was an inconclusive discussion of how to reference alpha-APIs from stable objects. In this specific case, the question was how to reference the RuntimeClass instance from a Pod, but the problem applies generally to all stable API objects.I want to kick off the follow-up discussion, since I believe a lot of projects are currently blocked on this. The solutions discussed so far include:- Allow annotations, with better guidelines around best practices- Add support for feature-gated fieldsWe already support and recommend this for most things - I’m not sure why this was not the preferred choice. Is it about discoverability of the field? Were there other options?
- Add an "extensions" list to the ObjectMeta, which can reference arbitrary resourcesDo we have any other example use cases where a pattern like this would have been useful?- Parallel "sidecar" resources that hold the additional fields - either with names matching the extended resource, or a back reference. Either way, this runs into lifecycle issues (how does it work with replication? label-selector?).For services and endpoints this already works, but the objects were designed with that parallelism in mind.Agree replication for pods makes this questionable.----We are planning to discuss this in this weeks sig-architecture meeting, but to help us reach a conclusion & unblock these projects, let's start the discussion here.
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 post to this group, send email to kubernetes-si...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAUnY2TF8i9_tXGGJcpC_qgVWO-zvWnq0O37G%2BKYvvBQgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
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 post to this group, send email to kubernetes-si...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/672E5EC7-2646-44A3-A198-D5FC64C781A0%40gmail.com.
Can we do better and kill two birds with one stone? Ie Mark fields with @alpha Gate and propagate?
On Aug 13, 2018, at 8:07 PM, 'Tim Allclair' via kubernetes-sig-architecture <kubernetes-sig-architecture@googlegroups.com> wrote:In last weeks sig-architecture review of RuntimeClass, there was an inconclusive discussion of how to reference alpha-APIs from stable objects. In this specific case, the question was how to reference the RuntimeClass instance from a Pod, but the problem applies generally to all stable API objects.I want to kick off the follow-up discussion, since I believe a lot of projects are currently blocked on this. The solutions discussed so far include:- Allow annotations, with better guidelines around best practices- Add support for feature-gated fieldsWe already support and recommend this for most things - I’m not sure why this was not the preferred choice. Is it about discoverability of the field? Were there other options?The gating support is incomplete. The field still shows up in schemas, documentation, etc.
- Add an "extensions" list to the ObjectMeta, which can reference arbitrary resourcesDo we have any other example use cases where a pattern like this would have been useful?- Parallel "sidecar" resources that hold the additional fields - either with names matching the extended resource, or a back reference. Either way, this runs into lifecycle issues (how does it work with replication? label-selector?).For services and endpoints this already works, but the objects were designed with that parallelism in mind.Agree replication for pods makes this questionable.
--We are planning to discuss this in this weeks sig-architecture meeting, but to help us reach a conclusion & unblock these projects, let's start the discussion here.
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-architecture+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-architecture@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAUnY2TF8i9_tXGGJcpC_qgVWO-zvWnq0O37G%2BKYvvBQgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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-architecture+unsub...@googlegroups.com.
To post to this group, send email to kubernetes-sig-architecture@googlegroups.com.
Clarification question: is "reference alpha-APIs from stable objects" the same as adding an alpha field to a stable object (i.e. the use case described here)?
(I assume it is, since I would assume that the field that references the alpha API object must itself be an alpha field, but just wanted to make sure.)On Mon, Aug 13, 2018 at 5:29 PM, Clayton <smarter...@gmail.com> wrote:Can we do better and kill two birds with one stone? Ie Mark fields with @alpha Gate and propagate?
Clarification question: is "reference alpha-APIs from stable objects" the same as adding an alpha field to a stable object (i.e. the use case described here)?Yes(I assume it is, since I would assume that the field that references the alpha API object must itself be an alpha field, but just wanted to make sure.)On Mon, Aug 13, 2018 at 5:29 PM, Clayton <smarter...@gmail.com> wrote:Can we do better and kill two birds with one stone? Ie Mark fields with @alpha Gate and propagate?Yes. Something like that was proposed but not yet built (or fully understood w.r.t. the implications to the way we decode into structs). The "clear before validate/persist" approach we have now was a minimal stop-gap to unblock work held up on the annotations-vs-fields decision.
I intended to send a very similar note, Tim. Thanks.
I took away 3 main topics from last week's call and the subsequent
chatter in hallways.
1) "Tag-along" resources. AKA external annotations. AKA Decorator
resources. We've seen this pattern in a bunch of places. It's
interesting. Define a CRD that is a sort of "subordinate" resource to
some primary resource. Generally this is a 1:1 relationship (by
name), but maybe we need more than that (e.g. by selector) E.g. a
CSINode is 1:1 with Node. I have seen people extend Service this way.
It allows someone to provide a structured, validated, (etc) block of
config that is not part of the main resource's API. Better than
annotations because of structure. I don't think this is the main
topic of the RuntimeClass proposal, but I want to pull this pattern to
the front of people's minds anyway. I like it. I think we should
endorse it and maybe formalize it (e.g. formalize a reference from
primary object to subordinate, so clients can auto-find them, and so
delete handline or GC can deal with them).
I'll give a RuntimeClass example, but I think this pattern is a common one for features that need to be added to the pod.The field I want to add to the pod for RuntimeClass is just a reference to a RuntimeClass that the pod should be run with. IIUC, what is being proposed is another CRD, let's call it "RuntimeClassRef", that has the same name/namespace as the pod it is adding the RuntimeClass for, and a reference to the desired RuntimeClass. More concretely:I have a pod "wordpress" that should reference the RuntimeClass "sandboxed", so I create a RuntimeClassRef named "wordpress", with a reference to "sandboxed".Now what happens when rather than a wordpress pod, I have a wordpress deployment? I suppose I could add a custom controller that creates RuntimeClassRefs for each replica, but now I need another CRD for ReplicaSets, DaemonSets, JobSets, and any other pod generator (still missing custom ones).
Hmm, I don't follow. Is the initializer on the pod or the ReplicaSet? Maybe we can chat offline.
>> To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-architecture+unsub...@googlegroups.com.
>> To post to this group, send email to kubernetes-sig-architecture@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAUnY2TF8i9_tXGGJcpC_qgVWO-zvWnq0O37G%2BKYvvBQgQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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-architecture+unsub...@googlegroups.com.
>> To post to this group, send email to kubernetes-sig-architecture@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAB_J3bbeeZW%2BNnxKPJUW%2B6kWQoQK%2BnjAKCW6aU7Ru-D5FX8xkQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAU0nGq_2ZsJ9WgVHUJouLp4Rmk3v7dzpnP9YNeVad21Fg%40mail.gmail.com.
On Aug 13, 2018, at 8:07 PM, 'Tim Allclair' via kubernetes-sig-architecture <kubernetes-si...@googlegroups.com> wrote:In last weeks sig-architecture review of RuntimeClass, there was an inconclusive discussion of how to reference alpha-APIs from stable objects. In this specific case, the question was how to reference the RuntimeClass instance from a Pod, but the problem applies generally to all stable API objects.I want to kick off the follow-up discussion, since I believe a lot of projects are currently blocked on this. The solutions discussed so far include:- Allow annotations, with better guidelines around best practices- Add support for feature-gated fieldsWe already support and recommend this for most things - I’m not sure why this was not the preferred choice. Is it about discoverability of the field? Were there other options?The gating support is incomplete. The field still shows up in schemas, documentation, etc.
In last weeks sig-architecture review of RuntimeClass, there was an inconclusive discussion of how to reference alpha-APIs from stable objects. In this specific case, the question was how to reference the RuntimeClass instance from a Pod, but the problem applies generally to all stable API objects.I want to kick off the follow-up discussion, since I believe a lot of projects are currently blocked on this. The solutions discussed so far include:- Allow annotations, with better guidelines around best practices- Add support for feature-gated fields- Add an "extensions" list to the ObjectMeta, which can reference arbitrary resources- Parallel "sidecar" resources that hold the additional fields - either with names matching the extended resource, or a back reference. Either way, this runs into lifecycle issues (how does it work with replication? label-selector?).
Clarification question: is "reference alpha-APIs from stable objects" the same as adding an alpha field to a stable object (i.e. the use case described here)?Yes(I assume it is, since I would assume that the field that references the alpha API object must itself be an alpha field, but just wanted to make sure.)On Mon, Aug 13, 2018 at 5:29 PM, Clayton <smarter...@gmail.com> wrote:Can we do better and kill two birds with one stone? Ie Mark fields with @alpha Gate and propagate?Yes. Something like that was proposed but not yet built (or fully understood w.r.t. the implications to the way we decode into structs). The "clear before validate/persist" approach we have now was a minimal stop-gap to unblock work held up on the annotations-vs-fields decision.It hasn’t worked out that badly in that we haven’t yet regretted it.The best benefit of the field is that it shows up in docs, has clear semantics, and can be validated. A generic metadata field can’t do that.
A sidecar policy resource isn’t necessarily discoverable (although we could also improve that, and I like sidecars like pod preset). An argument against would be that we can’t grow the scope of pod forever, but runtime class seems pretty fundamental to the pod.
On Aug 13, 2018, at 8:07 PM, 'Tim Allclair' via kubernetes-sig-architecture <kubernetes-si...@googlegroups.com> wrote:In last weeks sig-architecture review of RuntimeClass, there was an inconclusive discussion of how to reference alpha-APIs from stable objects. In this specific case, the question was how to reference the RuntimeClass instance from a Pod, but the problem applies generally to all stable API objects.I want to kick off the follow-up discussion, since I believe a lot of projects are currently blocked on this. The solutions discussed so far include:- Allow annotations, with better guidelines around best practices- Add support for feature-gated fieldsWe already support and recommend this for most things - I’m not sure why this was not the preferred choice. Is it about discoverability of the field? Were there other options?The gating support is incomplete. The field still shows up in schemas, documentation, etc.
- Add an "extensions" list to the ObjectMeta, which can reference arbitrary resourcesDo we have any other example use cases where a pattern like this would have been useful?- Parallel "sidecar" resources that hold the additional fields - either with names matching the extended resource, or a back reference. Either way, this runs into lifecycle issues (how does it work with replication? label-selector?).For services and endpoints this already works, but the objects were designed with that parallelism in mind.Agree replication for pods makes this questionable.
--We are planning to discuss this in this weeks sig-architecture meeting, but to help us reach a conclusion & unblock these projects, let's start the discussion here.
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 post to this group, send email to kubernetes-si...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAUnY2TF8i9_tXGGJcpC_qgVWO-zvWnq0O37G%2BKYvvBQgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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 post to this group, send email to kubernetes-si...@googlegroups.com.
> Why do we need to replicate them if they are all identical? Why couldn't they just share 1 instance?If we wanted to associate the "sidecar" resources by name, then they need to match the names of the replicas. If we have a single resource, we would do something like label selection, and then you just end up with specifying the api through labels, which isn't that different from annotations, except we offload the work to the user. (e.g. sandboxed runtime class get's bound to pods with the label "runtime-class.k8s.io = sandboxed".> We had discussed passing through opaque parameters to docker in the past.We have that today with annotations. If the parameters are opaque, you end up with fragmentation across CRI implementations (see untrusted annotations). If we want to standardize it, then it's an API as an annotation, and we're in the same boat.> How confident are we that this is the way we want to express this?I'm reasonably confident in the approach of pod -> RuntimeClass -> implementation. One question about the pod -> RuntimeClass that has been discussed is the idea of "fitting" a RuntimeClass to a pod, for instance through a label selector, with properties labeled on the RuntimeClass. In this case, I think we should treat it like scheduling, and then we still want the RuntimeClassName field to determine the actual RuntimeClass that was matched to the label selector. So in summary, I think that this approach is sufficiently general to inspire confidence.That said, isn't the point of making a field alpha that we can change it later, if need be?
Catching up all in one message
I wrote:
>> think we should endorse it and maybe formalize it (e.g. formalize a reference from primary object to subordinate, so clients can auto-find them, and so delete handline or GC can deal with them).
Daniel wrote:
> What's wrong with a regular OwnerReference? It would go on the CRD and reference the beta/stable object.
This doesn't enable generic clients to do forward references. If I
know about Pod and I want to list all of the tagalongs, how do I find
them?
Tim Allclair wrote:
> If we wanted to associate the "sidecar" resources by name, then they need to match the names of the replicas.
You could also have an annotation that names which tagalong to use,
facilitating tagalong reuse (as in replica sets) but not requiring it
(e.g. some other type of set).
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAO_RewbLkTCR%2BCr7_aea7R_28J9KqvqSR_5ZptG5o8cxycVM_g%40mail.gmail.com.