Merge pull request #37231 from janetkuo/stateful-set-example-files

Automatic merge from submit-queue

Update Stateful Set example files for 1.5

1. Remove initialized annotation from statefulset examples
2. Update storage class annotation to beta in statefulset examples
3. Remove alpha limitation on PetSet in cassandra example

cc @erictune @foxish @kow3ns @enisoc @chrislovecnm @kubernetes/sig-apps

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2016-11-30 21:11:08 -08:00 committed by GitHub
commit 5bba858b33
9 changed files with 2 additions and 18 deletions

View File

@ -11,8 +11,6 @@ spec:
replicas: 1
template:
metadata:
annotations:
pod.alpha.kubernetes.io/initialized: "true"
labels:
kubernetes.io/cluster-service: "true"
k8s-app: calico-etcd

View File

@ -66,7 +66,6 @@ spec:
labels:
app: cockroachdb
annotations:
pod.alpha.kubernetes.io/initialized: "true"
# Init containers are run only once in the lifetime of a pod, before
# it's started up for the first time. It has to exit successfully
# before the pod's main containers are allowed to start.

View File

@ -188,8 +188,6 @@ spec:
replicas: 3
template:
metadata:
annotations:
pod.alpha.kubernetes.io/initialized: "true"
labels:
app: cassandra
spec:
@ -398,16 +396,13 @@ functionality, like a Deployment, ReplicaSet, Replication Controller, or Job.
## Step 4: Delete Cassandra StatefulSet
There are some limitations with the Alpha release of PetSet in 1.3. From the [documentation](http://kubernetes.io/docs/user-guide/petset/):
"Deleting the StatefulSet will not delete any pods. You will either have to manually scale it down to 0 pods first, or delete the pods yourself.
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. Deleting the Persistent Volume Claims will result in a deletion of the associated volumes."
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. Deleting the Persistent Volume Claims may result in a deletion of the associated volumes, depending on the storage class and reclaim policy. You should never assume ability to access a volume after claim deletion.
Use the following commands to delete the StatefulSet.
```console
$ grace=$(kubectl get po cassandra-0 --template '{{.spec.terminationGracePeriodSeconds}}') \
&& kubectl delete statefulset,po -l app=cassandra \
&& kubectl delete statefulset -l app=cassandra \
&& echo "Sleeping $grace" \
&& sleep $grace \
&& kubectl delete pvc -l app=cassandra

View File

@ -7,8 +7,6 @@ spec:
replicas: 3
template:
metadata:
annotations:
pod.alpha.kubernetes.io/initialized: "true"
labels:
app: cassandra
spec:

View File

@ -27,8 +27,6 @@ spec:
metadata:
labels:
app: nginx-statefulset
annotations:
pod.alpha.kubernetes.io/initialized: "true"
spec:
terminationGracePeriodSeconds: 0
containers:

View File

@ -10,7 +10,6 @@ spec:
labels:
app: cockroachdb
annotations:
pod.alpha.kubernetes.io/initialized: "true"
# Init containers are run only once in the lifetime of a pod, before
# it's started up for the first time. It has to exit successfully
# before the pod's main containers are allowed to start.

View File

@ -10,7 +10,6 @@ spec:
labels:
app: mysql
annotations:
pod.alpha.kubernetes.io/initialized: "true"
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "install",

View File

@ -10,7 +10,6 @@ spec:
labels:
app: redis
annotations:
pod.alpha.kubernetes.io/initialized: "true"
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "install",

View File

@ -10,7 +10,6 @@ spec:
labels:
app: zk
annotations:
pod.alpha.kubernetes.io/initialized: "true"
pod.alpha.kubernetes.io/init-containers: '[
{
"name": "install",