Repository navigation
Update the API spec and overview to reflect ServingState intent. - #657
Conversation
I've reworded the description of a Revision in the overview docs to capture some of the key lifecycle stages a revision may be in. I also found the existing wording confusing, since it talked about "history", which is more a property of configuration that is enabled by retirement, and I think the new wording better captures this. I've updated the specification to include `servingState`, clarify where fields aren't available (pointing to issues), and tweak assorted cosmetic things (e.g. trailing whitespace). Fixes: knative/serving#644
| Revisions. Instead, the creation of immutable Revisions through a | ||
| Configuration provides: | ||
| The system will be configured to disallow users from creating or | ||
| changing Revisions. Instead, the creation of immutable Revisions |
There was a problem hiding this comment.
if this is not the current state of the system, maybe reference a related issue here?
There was a problem hiding this comment.
Changing revisions (besides ServingState) is now disallowed by anything.
I've opened #664 and linked it in an (NYI) trailing creating.
| readinessProbe: ... # Optional | ||
|
|
||
| # Name of the service account the code should run as. | ||
| serviceAccountName: ... |
There was a problem hiding this comment.
Created #662 to cover serviceAccountName in the conformance tests.
| # This may not be specified at creation (defaults to Active), | ||
| # and is used by the controllers and activator to enable | ||
| # scaling to/from 0. | ||
| servingState: Active | Reserve | Retired |
There was a problem hiding this comment.
Created #663 to cover servingState in the conformance tests.
There was a problem hiding this comment.
How do we enforce not specified at creation?
Also, does this need to be in spec, or can this be inferred by the state of the system, and stored in status?
There was a problem hiding this comment.
I think it's fine to allow this being set at creation; the system will shortly update it to the correct state if there is a change to be made.
It might be more clear to say that any changes to this field made by the user will likely be overwritten by the system.
There was a problem hiding this comment.
We've multiple extended discussions about whether this should be in spec or status on Slack. :)
The conclusion was that this should be in spec because of how the dependency graph works.
There was a problem hiding this comment.
tl;dr what we have today is insufficient
My longer thoughts (that try to minimally adapt this to something sufficient) are here. @grantr is also looking at variations on what we do that make use of the scale sub-resource, and more dramatically change this.
We are validating "not specified at creation" via pkg/webhook, and defaulting it to Active.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, vaikas-google The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/hold cancel |
|
/retest |
1 similar comment
|
/retest |
| container: # core.v1.Container | ||
| container: # corev1.Container | ||
| # We disallow the following fields from corev1.Container: | ||
| # name, resources, prots, and volumeMounts |
There was a problem hiding this comment.
"ports"?
I suspect we'll want to block additional items, such as securityContext, stdin, tty, and possibly also parts of lifecycle (TBD).
There was a problem hiding this comment.
Fixed the typo. I expect we'll revisit a number of pieces here as the runtime contract evolves and lands.
| # This may not be specified at creation (defaults to Active), | ||
| # and is used by the controllers and activator to enable | ||
| # scaling to/from 0. | ||
| servingState: Active | Reserve | Retired |
There was a problem hiding this comment.
How do we enforce not specified at creation?
Also, does this need to be in spec, or can this be inferred by the state of the system, and stored in status?
| # scaling to/from 0. | ||
| servingState: Active | Reserve | Retired | ||
|
|
||
| # NYI: https://github.com/elafros/elafros/issues/456 |
There was a problem hiding this comment.
Add a comment about what/why?
Some function or server frameworks or application code may be written to expect that each request will be granted a single-tenant process to run (i.e. that the request code is run single-threaded).
|
Not setting |
| The system will be configured to disallow users from creating | ||
| ([NYI](https://github.com/elafros/elafros/issues/664)) or changing | ||
| Revisions. Instead, the creation of immutable Revisions through a | ||
| Configuration provides: |
There was a problem hiding this comment.
This sentence is a bit unclear. Is "the creation of immutable Revisions..." a proposal?
What do you think about adding a sentence that clearly states how revisions are created?
The system will be configured to disallow... changing Revisions. Instead, immutable Revisions
are created indirectly when a Configuration is created or updated. This provides:
There was a problem hiding this comment.
I can't create a comment on line 71, but I find the (but doesn't mandate) clause a bit hard to follow. I suggest changing that bullet to
* PATCH semantics for revisions implemented server-side, minimizing...
There was a problem hiding this comment.
Done. cc @evankanderson for new wording.
|
Ping @josephburnett now that you are back :) |
|
/lgtm |
I've reworded the description of a Revision in the overview docs to capture some of the key lifecycle stages a revision may be in. I also found the existing wording confusing, since it talked about "history", which is more a property of configuration that is enabled by retirement, and I think the new wording better captures this.
I've updated the specification to include
servingState, clarify where fields aren't available (pointing to issues), and tweak assorted cosmetic things (e.g. trailing whitespace).Fixes: #644