Skip to content
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

SS concept #1719

Merged
merged 13 commits into from
Dec 2, 2016
Merged

SS concept #1719

merged 13 commits into from
Dec 2, 2016

Conversation

kow3ns
Copy link
Member

@kow3ns kow3ns commented Nov 18, 2016

Adds statefulsets.md to concepts and updates the concepts index.md to contain Stateful Sets


This change is Reviewable

Kenneth Owens added 4 commits November 17, 2016 16:12
StatefulSet referneces to Stateful Set and all PetSet references to Pet
Set
moves statefulset.md into controllers
update _data/concepts.yml to show a TOC based on the above
shortens intro in favor of another Components section
### Limitations
* Stateful Set is a beta resource, not available in any Kubernetes release prior to 1.5.
* As with all alpha/beta resources, it can be disabled through the `--runtime-config` option passed to the apiserver.
* The only mutable field on a Stateful Set is `replicas`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change the PodTemplateSpec IIRC. Perhaps we should remove this assertion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should.

@janetkuo janetkuo added this to the 1.5 milestone Nov 18, 2016
* As with all alpha/beta resources, it can be disabled through the `--runtime-config` option passed to the apiserver.
* The only mutable field on a Stateful Set is `replicas`
* The storage for a given Pod must either be provisioned by a [Persistent Volume Provisioner](http://releases.k8s.io/{{page.githubbranch}}/examples/experimental/persistent-volume-provisioning/README.md) based on the requested `storage class`, or pre-provisioned by an admin.
* Deleting and/or scaling a Stateful Set down will *not* delete the volumes associated with the Stateful Set. This is done to ensure safety first, your data is more valuable than an auto purge of all related Stateful Set resources. **Deleting the Persistent Volume Claims will result in a deletion of the associated volumes**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that if we provision our PVs manually, it does not exhibit this behavior?

- metadata:
name: www
annotations:
volume.alpha.kubernetes.io/storage-class: anything
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

volume.beta....

are created based on the `volumeClaimTemplates` field of the Stateful Set. In the
example above, each Pod will receive a single persistent volume with a storage
class of anything and 1 Gib of provisioned storage. When a Pod is (re)scheduled,
its volume(s) are available on the node on which it is launched. Note that, the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

volume(s) are available on the node
should probably be rephrased.

[Annotations](/docs/concepts/object-metadata/annotations/)

* [Annotations](/docs/concepts/object-metadata/annotations/)
* [Stateful Sets](/docs/concepts/controllers/statefulsets/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update this to reflect new nav

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that I follow. The link works. This is the correct location of the asset. Did you mean something else?

* The volumeClaimTemplates, will provide stable storage using [Persistent Volumes](/docs/user-guide/volumes/) provisioned by a
[Persistent Volume Provisioner](http://releases.k8s.io/{{page.githubbranch}}/examples/experimental/persistent-volume-provisioning/README.md).

```yaml
Copy link
Member

@janetkuo janetkuo Nov 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use something like {% include code.html language="yaml" file="petset.yaml" ghlink="/docs/user-guide/petset.yaml" %} instead. We may need to rename the file and/or move the file here also

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annotations example includes its YAML inline. I did the same so that the concepts pages are uniform in how they present structural examples. I'm in favor of using inline for concepts because the include produces a copy to clipboard button, and I don't think we want users copying and pasting from the concepts. If the consensus is that we want to use includes, then we should update the annotations concept for consistency.

@@ -0,0 +1,163 @@
---
Copy link
Contributor

@foxish foxish Nov 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add assignees here, so we know when this doc has issues raised against it:

---
assignees:
- bprashanth
- enisoc
- erictune
- foxish
- janetkuo
- kow3ns
- smarterclayton

---

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the list. We should have the same list of assignees in all StatefulSet docs

@enisoc
Copy link
Member

enisoc commented Nov 18, 2016

Reviewed 2 of 3 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 16 unresolved discussions.


docs/concepts/index.md, line 10 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote…

I'm not sure that I follow. The link works. This is the correct location of the asset. Did you mean something else?

I think she means since you added a Controllers section in `concepts.yml` you should also add a new `#### Controllers` heading here. Currently you've put Stateful Sets under the `Object Metadata` heading.

docs/concepts/controllers/statefulsets.md, line 13 at r2 (raw file):

{% capture overview %}
**Stateful Sets are a beta feature in 1.5. This feature replaces the deprecated 

Usually "deprecated" means it still exists but you should migrate away. It would be more honest to call Pet Sets "retired" or something like that. Personally I'm fond of the phrase "deprecated with extreme prejudice" but that's too obscure for public docs. :)


docs/concepts/controllers/statefulsets.md, line 18 at r2 (raw file):

for further information on how to upgrade existing Pet Sets to Stateful Sets.**

A Stateful Set is a Controller that ensures that provides a unique identity to 

Remove "ensures that".


docs/concepts/controllers/statefulsets.md, line 19 at r2 (raw file):

A Stateful Set is a Controller that ensures that provides a unique identity to 
its Pods, and provides garuantees about the ordering of deployment and scaling.

guarantees*


docs/concepts/controllers/statefulsets.md, line 28 at r2 (raw file):

following.

* Stable, unique network identifiers.

"Stable" is a bit of an overloaded term. We should at least note below this list that in this case "stable" means "survives pod rescheduling" or something like that.


docs/concepts/controllers/statefulsets.md, line 43 at r2 (raw file):

* Deleting and/or scaling a Stateful Set down will *not* delete the volumes associated with the Stateful Set. This is done to ensure safety first, your data is more valuable than an auto purge of all related Stateful Set resources. **Deleting the Persistent Volume Claims will result in a deletion of the associated volumes**.
* Stateful Sets currently require a [Headless Service](/docs/user-guide/services/#headless-services) to be responsible for the network identity of the Pods. The user is responsible for this Service.
* Updating an existing Stateful Set is currently a manual process, meaning you either need to deploy a new Stateful Set with the new image version, or orphan Pods one by one, update their image, and join them back to the cluster.

TODO: link to Task for doing manual updates (IIRC we plan to write one?).


docs/concepts/controllers/statefulsets.md, line 111 at r2 (raw file):

For a Stateful Set with N replicas, each Pod in the Stateful Set will be 
assigned a integer ordinal, in the range [0,N), that is unique over the Set. 

"an integer"*


docs/concepts/controllers/statefulsets.md, line 113 at r2 (raw file):

assigned a integer ordinal, in the range [0,N), that is unique over the Set. 

__Stable Network Id__

Either capitalize "ID" or use "Identity". Unless we are providing stable network id. :)


docs/concepts/controllers/statefulsets.md, line 144 at r2 (raw file):

are created based on the `volumeClaimTemplates` field of the Stateful Set. In the 
example above, each Pod will receive a single persistent volume with a storage 
class of anything and 1 Gib of provisioned storage. When a Pod is (re) scheduled onto

anything should be backtick quoted for clarity. BTW, I've seen both anything and default used here. Does anyone know the difference?


docs/concepts/controllers/statefulsets.md, line 146 at r2 (raw file):

class of anything and 1 Gib of provisioned storage. When a Pod is (re) scheduled onto
a node, its `volumeMounts` mount the Persistent Volumes associated with its 
Persistent Volume Claims. That is, the Note that, the Persistent Volumes associated with the 

"The is, the Note that," needs an edit.


Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 18, 2016

docs/concepts/index.md, line 10 at r1 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

I think she means since you added a Controllers section in concepts.yml you should also add a new #### Controllers heading here. Currently you've put Stateful Sets under the Object Metadata heading.

https://github.com/kow3ns/kubernetes.github.io/blob/7aa8c5d2e6253739a2da144d933b9daa1804ec36/_data/concepts.yml#L10-L13 It is already there

Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 18, 2016

docs/concepts/controllers/statefulsets.md, line 32 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote…

We should.

Done.

Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 18, 2016

docs/concepts/controllers/statefulsets.md, line 43 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

TODO: link to Task for doing manual updates (IIRC we plan to write one?).

The implementation of manual updates to an existing Stateful Set will differ based on the system.

Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 18, 2016

docs/concepts/controllers/statefulsets.md, line 90 at r1 (raw file):

Previously, foxish (Anirudh Ramanathan) wrote…

volume.beta....

Done.

Comments from Reviewable

@enisoc
Copy link
Member

enisoc commented Nov 18, 2016

Review status: all files reviewed at latest revision, 16 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 43 at r2 (raw file):

Previously, kow3ns (Kenneth Owens) wrote…

The implementation of manual updates to an existing Stateful Set will differ based on the system.

I checked and it is indeed in our plan for docs to write: "Task: updating an app that uses an SS"

If you don't think we should write one, comment on the doc plan.


Comments from Reviewable

Removes deprecation from comment wrt PetSets
Creates separate section in concepts/index.md for Controllers
Fixes grammer "an integer"
Removes claim about persistent storage being auto-deleted
Clarifies stability
Adds call out tick around attributes
@kow3ns
Copy link
Member Author

kow3ns commented Nov 18, 2016

docs/concepts/controllers/statefulsets.md, line 43 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

I checked and it is indeed in our plan for docs to write: "Task: updating an app that uses an SS"

If you don't think we should write one, comment on the doc plan.

We could write an example if it is in the plan, but we need to pick one system that is simple and apply the general concept. I would also think that the scope of this would be a tutorial ... we don't have a kubectl update that will do this atomically.

Comments from Reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 18, 2016
@kow3ns
Copy link
Member Author

kow3ns commented Nov 18, 2016

Review status: 1 of 3 files reviewed at latest revision, 16 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 32 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote…

Done.

Done.

docs/concepts/controllers/statefulsets.md, line 34 at r1 (raw file):

guarantees
Actually I looked into my GCP account and it never deletes the volumes. This should be removed.


docs/concepts/controllers/statefulsets.md, line 139 at r1 (raw file):

Previously, foxish (Anirudh Ramanathan) wrote…

volume(s) are available on the node

should probably be rephrased.

Done.

docs/concepts/controllers/statefulsets.md, line 13 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

Usually "deprecated" means it still exists but you should migrate away. It would be more honest to call Pet Sets "retired" or something like that. Personally I'm fond of the phrase "deprecated with extreme prejudice" but that's too obscure for public docs. :)

I'll just remove deprecated

docs/concepts/controllers/statefulsets.md, line 18 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

Remove "ensures that".

Done.

docs/concepts/controllers/statefulsets.md, line 19 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

guarantees*

Done.

docs/concepts/controllers/statefulsets.md, line 28 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

"Stable" is a bit of an overloaded term. We should at least note below this list that in this case "stable" means "survives pod rescheduling" or something like that.

Done.

docs/concepts/controllers/statefulsets.md, line 111 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

"an integer"*

Done.

docs/concepts/controllers/statefulsets.md, line 113 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

Either capitalize "ID" or use "Identity". Unless we are providing stable network id. :)

Done.

docs/concepts/controllers/statefulsets.md, line 144 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

anything should be backtick quoted for clarity. BTW, I've seen both anything and default used here. Does anyone know the difference?

I haven't found any direct documentation as to the difference between anything and default. I could make a guess based on what is in the documentation, but we should probably dig through the code for an answer.

docs/concepts/controllers/statefulsets.md, line 146 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote…

"The is, the Note that," needs an edit.

Done.

Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 21, 2016

Review status: 1 of 3 files reviewed at latest revision, 16 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 34 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > > guarantees > Actually I looked into my GCP account and it never deletes the volumes. This should be removed.
Done.

docs/concepts/controllers/statefulsets.md, line 46 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > The annotations example includes its YAML inline. I did the same so that the concepts pages are uniform in how they present structural examples. I'm in favor of using inline for concepts because the include produces a copy to clipboard button, and I don't think we want users copying and pasting from the concepts. If the consensus is that we want to use includes, then we should update the annotations concept for consistency.
Done.

docs/concepts/controllers/statefulsets.md, line 13 at r2 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > I'll just remove deprecated
Done.

docs/concepts/controllers/statefulsets.md, line 43 at r2 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > We could write an example if it is in the plan, but we need to pick one system that is simple and apply the general concept. I would also think that the scope of this would be a tutorial ... we don't have a kubectl update that will do this atomically.
Done.

Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 21, 2016

Reviewed 2 of 2 files at r3.
Review status: all files reviewed at latest revision, 16 unresolved discussions.


docs/concepts/index.md, line 10 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > https://github.com/kow3ns/kubernetes.github.io/blob/7aa8c5d2e6253739a2da144d933b9daa1804ec36/_data/concepts.yml#L10-L13 > It is already there
Done.

Comments from Reviewable

@enisoc
Copy link
Member

enisoc commented Nov 21, 2016

Review status: all files reviewed at latest revision, 10 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 90 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > Done.
It turns out the behavior we want here only works with the "alpha" annotation. See https://github.com/kubernetes/kubernetes/issues/37239

docs/concepts/controllers/statefulsets.md, line 18 at r2 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > Done.
You removed one too many *that*s.

docs/concepts/controllers/statefulsets.md, line 144 at r2 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > I haven't found any direct documentation as to the difference between anything and default. I could make a guess based on what is in the documentation, but we should probably dig through the code for an answer.
It turns out the value you give is irrelevant. All that matters is the existence of the alpha annotation.

Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Nov 22, 2016

Review status: all files reviewed at latest revision, 10 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 90 at r1 (raw file):

Previously, enisoc (Anthony Yeh) wrote… > It turns out the behavior we want here only works with the "alpha" annotation. See https://github.com/kubernetes/kubernetes/issues/37239
For the concept I'm getting rid of the annotation altogether. Its not really relevant here. I'm going to keep it as alpha for the tutorial.

Comments from Reviewable

Removes storage annotation
@kow3ns
Copy link
Member Author

kow3ns commented Nov 22, 2016

Review status: 2 of 3 files reviewed at latest revision, 10 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 90 at r1 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > For the concept I'm getting rid of the annotation altogether. Its not really relevant here. I'm going to keep it as alpha for the tutorial.
Done.

docs/concepts/controllers/statefulsets.md, line 18 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote… > You removed one too many *that*s.
Done.

docs/concepts/controllers/statefulsets.md, line 144 at r2 (raw file):

Previously, enisoc (Anthony Yeh) wrote… > It turns out the value you give is irrelevant. All that matters is the existence of the alpha annotation.
Done.

Comments from Reviewable

Copy link
Member

@erictune erictune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. couple comment.

In the above, by stable, we mean persistent across Pod (re) schedulings.
As it is generally easier to manage, if an application doesn't require any of
the above guarantees, and if it is feasible to do so, it should be deployed as
a set of stateless replicas.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"such as with Deployment (link to Deployment docs)".

* The storage for a given Pod must either be provisioned by a [Persistent Volume Provisioner](http://releases.k8s.io/{{page.githubbranch}}/examples/experimental/persistent-volume-provisioning/README.md) based on the requested `storage class`, or pre-provisioned by an admin.
* Deleting and/or scaling a Stateful Set down will *not* delete the volumes associated with the Stateful Set. This is done to ensure safety first, your data is more valuable than an auto purge of all related Stateful Set resources.
* Stateful Sets currently require a [Headless Service](/docs/user-guide/services/#headless-services) to be responsible for the network identity of the Pods. The user is responsible for this Service.
* Updating an existing Stateful Set is currently a manual process, meaning you either need to deploy a new Stateful Set with the new image version, or orphan Pods one by one, update their image, and join them back to the cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just say: "Updating an existing Stateful Set is currently a manual process: the pod template cannot be updated.". Leave the explanation of how you might manually update for later.

* A [Headless Service](/docs/user-guide/services/#headless-services), named nginx, is used to control the network domain.
* The Stateful Set, named web, has a Spec that indicates that 3 replicas of the nginx container will be launched in unique Pods.
* The volumeClaimTemplates, will provide stable storage using [Persistent Volumes](/docs/user-guide/volumes/) provisioned by a
[Persistent Volume Provisioner](http://releases.k8s.io/{{page.githubbranch}}/examples/experimental/persistent-volume-provisioning/README.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already linked to Persistent Volume Provisioner above. Not needed here?

@enisoc
Copy link
Member

enisoc commented Nov 29, 2016

Review status: 2 of 3 files reviewed at latest revision, 14 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 153 at r4 (raw file):

* For a Stateful Set with N replicas, when Pods are being deployed, they are created sequentially, in order from {0..N-1}. 
* When Pods are being deleted, they are terminated in reverse order, from {N-1..0}.
* Before a scaling operation is applied to a Pod, all of its predecessors must be Running and Ready. 

As discussed offline, this item is misleading as currently worded. The actual behavior is: Before any Pod is created, all existing Pods must be Running and Ready.

See: https://github.com/kubernetes/kubernetes/blob/1dfd64f4378ad9dd974bbfbef8e90127dce6aafe/pkg/controller/petset/pet.go#L128


Comments from Reviewable

Removes redundant hyperlinks
Makes statement about updates limitation more terse
@kow3ns
Copy link
Member Author

kow3ns commented Nov 29, 2016

Reviewed 1 of 3 files at r1, 1 of 1 files at r4, 1 of 1 files at r5.
Review status: all files reviewed at latest revision, 14 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 36 at r4 (raw file):

Previously, erictune (Eric Tune) wrote… > "such as with Deployment (link to Deployment docs)".
Done.

docs/concepts/controllers/statefulsets.md, line 44 at r4 (raw file):

Previously, erictune (Eric Tune) wrote… > Maybe just say: "Updating an existing Stateful Set is currently a manual process: the pod template cannot be updated.". Leave the explanation of how you might manually update for later.
Done.

docs/concepts/controllers/statefulsets.md, line 52 at r4 (raw file):

Previously, erictune (Eric Tune) wrote… > You already linked to Persistent Volume Provisioner above. Not needed here?
Done.

docs/concepts/controllers/statefulsets.md, line 153 at r4 (raw file):

Previously, enisoc (Anthony Yeh) wrote… > As discussed offline, this item is misleading as currently worded. The actual behavior is: Before any Pod is created, all existing Pods must be Running and Ready. > > See: https://github.com/kubernetes/kubernetes/blob/1dfd64f4378ad9dd974bbfbef8e90127dce6aafe/pkg/controller/petset/pet.go#L128
This item is true. We will have to add an additional limitation with respect to potential deadlock due to petSyncers current implementation.

Comments from Reviewable

@enisoc
Copy link
Member

enisoc commented Nov 29, 2016

Review status: all files reviewed at latest revision, 13 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 153 at r4 (raw file):

Previously, kow3ns (Kenneth Owens) wrote… > This item is true. We will have to add an additional limitation with respect to potential deadlock due to petSyncers current implementation.
The item is technically true, but my point is that phrasing it in terms of "scaling" is misleading. The actual logic is in terms of "creation" at any time, regardless of whether any scaling is happening. The fact that this item is true for scaling is just a coincidence because at that time there happen to not be any Pods with ordinal greater than N yet.

Comments from Reviewable

StatefulSet and Persistent Volume becomes PersistentVolume)
@kow3ns
Copy link
Member Author

kow3ns commented Dec 1, 2016

Reviewed 3 of 3 files at r6.
Review status: all files reviewed at latest revision, 11 unresolved discussions.


Comments from Reviewable

@devin-donnelly
Copy link
Contributor

This is solid; I have some writerly comments to be addressed.

Also, there is an "abstractions" directory under "concepts"; I'd like to nest "controllers" underneath there. This differentiates it from the "control-plane" stuff (which also has its own directory).


{% capture overview %}
**StatefulSets are a beta feature in 1.5. This feature replaces the
Pet Sets feature from 1.4. Users of Pet Sets are referred to the 1.5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address the user directly.

"If you've been using PetSet in your cluster in version 1.4, see the Upgrade Guide for further information on how to upgrade existing Pet Sets to StatefulSets."

* Ordered, graceful deployment and scaling.
* Ordered, graceful deletion and termination.

In the above, by stable, we mean persistent across Pod (re) schedulings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid "we" constructs. Rephrase:

"Both the unique network identifiers and the persistent storage associated with a StatefulSet are "stable" in the sense that they are persistent across Pod scheduling or re-scheduling."

* Ordered, graceful deletion and termination.

In the above, by stable, we mean persistent across Pod (re) schedulings.
As it is generally easier to manage, if an application doesn't require any of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If an application doesn't require any stable identifiers or ordered deployment, deletion, or scaling, you should deploy your application with a controller that provides a set of stateless replicas. Such controllers, such as [Deployment] or [ReplicaSet], are generally easier to manage and may be better suited to your needs."


### Limitations
* StatefulSet is a beta resource, not available in any Kubernetes release prior to 1.5.
* As with all alpha/beta resources, it can be disabled through the `--runtime-config` option passed to the apiserver.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid pronouns. "It" -> "StatefulSet".

Avoid passive voice. "It can be disabled" -> "You can disable StatefulSet through the --runtime-config option that you pass to the Kubernetes apiserver."

* StatefulSet is a beta resource, not available in any Kubernetes release prior to 1.5.
* As with all alpha/beta resources, it can be disabled through the `--runtime-config` option passed to the apiserver.
* The storage for a given Pod must either be provisioned by a [PersistentVolume Provisioner](http://releases.k8s.io/{{page.githubbranch}}/examples/experimental/persistent-volume-provisioning/README.md) based on the requested `storage class`, or pre-provisioned by an admin.
* Deleting and/or scaling a StatefulSet down will *not* delete the volumes associated with the StatefulSet. This is done to ensure safety first, your data is more valuable than an auto purge of all related StatefulSet resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This is done to ensure data safety, which is generally more valuable than an automatic purge of all related StatefulSet resources."

stable network identity, and stable storage. The identity sticks to the Pod,
regardless of which node it's (re) scheduled on.

__Ordinal Index__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a heading?

__Ordinal Index__

For a StatefulSet with N replicas, each Pod in the StatefulSet will be
assigned an integer ordinal, in the range [0,N), that is unique over the Set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing parenthesis should be a square bracket.


__Stable Network ID__

The hostname of a Pod in a StatefulSet is derived from the name of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod."


__Stable Storage__

[PersistentVolumes](/docs/user-guide/volumes/), one for each Volume Claim Template,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Kubernetes creates one [PersistentVolume] for each Volume Claim Template, as specified in the StatefulSet's volumeClaimTemplates field."

* [Annotations](/docs/concepts/object-metadata/annotations/)

#### Controllers
* [StatefulSets](/docs/concepts/controllers/statefulsets/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an "abstractions" directory inside concepts that I'd like "controllers" to be nested under.

@kow3ns
Copy link
Member Author

kow3ns commented Dec 2, 2016

Review status: all files reviewed at latest revision, 22 unresolved discussions.


docs/concepts/controllers/statefulsets.md, line 36 at r4 (raw file):

Previously, kow3ns (Kenneth Owens) wrote…

Done.

Done.


docs/concepts/controllers/statefulsets.md, line 109 at r6 (raw file):

Previously, devin-donnelly wrote…

Is this a heading?

Yes


docs/concepts/controllers/statefulsets.md, line 112 at r6 (raw file):

Previously, devin-donnelly wrote…

Trailing parenthesis should be a square bracket.

No it should not [ indicates that the interval includes 0
) indicates that N is not included


Comments from Reviewable

@kow3ns
Copy link
Member Author

kow3ns commented Dec 2, 2016

Reviewed 4 of 4 files at r7.
Review status: all files reviewed at latest revision, 22 unresolved discussions.


docs/concepts/index.md, line 12 at r6 (raw file):

Previously, devin-donnelly wrote…

There is an "abstractions" directory inside concepts that I'd like "controllers" to be nested under.

Done.


docs/concepts/controllers/statefulsets.md, line 14 at r6 (raw file):

Previously, devin-donnelly wrote…

PetSet as one word?

Done.


docs/concepts/controllers/statefulsets.md, line 33 at r6 (raw file):

Previously, devin-donnelly wrote…

Avoid "we" constructs. Rephrase:

"Both the unique network identifiers and the persistent storage associated with a StatefulSet are "stable" in the sense that they are persistent across Pod scheduling or re-scheduling."

Done.


docs/concepts/controllers/statefulsets.md, line 34 at r6 (raw file):

Previously, devin-donnelly wrote…

"If an application doesn't require any stable identifiers or ordered deployment, deletion, or scaling, you should deploy your application with a controller that provides a set of stateless replicas. Such controllers, such as [Deployment] or [ReplicaSet], are generally easier to manage and may be better suited to your needs."

Done.


docs/concepts/controllers/statefulsets.md, line 42 at r6 (raw file):

Previously, devin-donnelly wrote…

Avoid pronouns. "It" -> "StatefulSet".

Avoid passive voice. "It can be disabled" -> "You can disable StatefulSet through the --runtime-config option that you pass to the Kubernetes apiserver."

Done.


docs/concepts/controllers/statefulsets.md, line 44 at r6 (raw file):

Previously, devin-donnelly wrote…

"This is done to ensure data safety, which is generally more valuable than an automatic purge of all related StatefulSet resources."

Done.


docs/concepts/controllers/statefulsets.md, line 45 at r6 (raw file):

Previously, devin-donnelly wrote…

Address the user directly. "The user is responsible for this Service" -> "You must provide this service for your StatefulSet."

Done.


docs/concepts/controllers/statefulsets.md, line 116 at r6 (raw file):

Previously, devin-donnelly wrote…

"Each Pod in a StatefulSet derives its hostname from the name of the StatefulSet and the ordinal of the Pod."

Done.


docs/concepts/controllers/statefulsets.md, line 142 at r6 (raw file):

Previously, devin-donnelly wrote…

"Kubernetes creates one [PersistentVolume] for each Volume Claim Template, as specified in the StatefulSet's volumeClaimTemplates field."

Done.


Comments from Reviewable

@devin-donnelly
Copy link
Contributor

Awesome, @kow3ns . Thanks. Merging now.

@devin-donnelly devin-donnelly merged commit 1ecb7b5 into kubernetes:release-1.5 Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants