-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial StatefulSet updates proposal #503
Changes from 1 commit
fc36fec
708300f
ad19d35
68dae83
d5d445a
42f7e37
713d7c0
0426722
ae7047f
8caee79
d54be8f
ac00afd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,6 @@ The following modifications will be made to the StatefulSetSpec API object. | |
type StatefulSetSpec struct { | ||
// Replicas, Selector, Template, VolumeClaimsTemplate, and ServiceName | ||
// omitted for brevity. | ||
v1.PodTemplateSpec `json:"template"` | ||
|
||
// TemplateGeneration is a monotonically increasing, 64 bit, integer used to | ||
// indicate the version of the of the PodTemplateSpec. If nil, the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which component is going to increase this field? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. API Server There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why isn't this a generation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will update for consistency with DaemonSet. |
||
|
@@ -255,7 +254,7 @@ the largest ordinal will be deleted. | |
|
||
### StatefulSet Revision History | ||
The StatefulSet controller will use labeled, versioned PodTemplates to keep a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a final decision? In DaemonSets we didn't decided yet how to store a history. cc @Kargakis @janetkuo @smarterclayton There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we haven't yet. I think we need to get a quick list of options written up and discussed:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm obviously partial to 1. My primary reason is that controllers should not be special and require magic. If we get TPRs right then PodTemplates can be leveraged by arbitrary operators/controllers, and they, therefore, provide a primitive upon which others can build. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So for pod template here's what we need to handle:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the real issue is 1 - the rest of the problems apply to ReplicaSets owned by Deployments too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For clarity, I am talking about the UID of the parent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @smarterclayton @janetkuo @Kargakis @lukaszo Before we go forward with PodTemplate creation we should also discuss adding a History sub resource to the controllers (I believe that is something like option 3 above). Having a per Kind History sub resource mitigates History overlap across Kinds with the same Right now the category of controllers could loosely be defined like this.
I confirmed with @foxish that the plan to support third party controller and operators is to make these properties well supported. That is, we want them to create custom Kinds that contain these sub resources. Given that, adding a History sub resource might be the best fit. We could say that controllers that implement revision history must have
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There has been some discussion before and I think there is general agreement that we want a history subresource. I am not sure whether we need to have this discussion in this proposal or in a separate one since it 1. affects all of the workload controllers and 2. is not required for having StatefulSet upgrades. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a problem with putting uids in names of generated resources provided they are ONLY used for uniquification and NEVER used for discovery/searching. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prevention of mutation and deletion is also desired in other contexts (e.g., addons): kubernetes/kubernetes#10179 |
||
history of updates preformed on a StatefulSet. The number of stored PodTemplates | ||
history of updates performed on a StatefulSet. The number of stored PodTemplates | ||
is considered to be the size of the StatefulSet's revision history. The | ||
maximum size of a StatefulSet's revision history is two (these are the current | ||
and target PodTemplates) plus the history limit (represented by its | ||
|
@@ -621,7 +620,7 @@ spec: | |
volumeMounts: | ||
- name: www | ||
mountPath: /usr/share/nginx/html | ||
generationParition: 2 | ||
generationPartition: 2 | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: www | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need something like update strategy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be similar to what deployments currently provide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to add a struct as per @smarterclayton's suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add a rollback spec and a rollback subresource, otherwise every client needs to implement its own logic for rollback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kow3ns what is the conclusion here ? I am guessing we all are in agreement , that we need a struct for strategy and rollbackConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For rollback, if we are worried about spec mutation (the controller cleans up the rollback spec once it successfully rollbacks a controllee), could we still have a server-side implementation w/o using a struct in the spec (the rollback is performed by the api server and not the controller)?