mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
statefulSet kubectl rollout command
This commit is contained in:
33
hack/testdata/rollingupdate-statefulset-rv2.yaml
vendored
Normal file
33
hack/testdata/rollingupdate-statefulset-rv2.yaml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1beta2
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-statefulset
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
serviceName: "nginx"
|
||||
replicas: 0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-statefulset
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: nginx
|
||||
image: gcr.io/google_containers/nginx-slim:0.8
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: web
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- 'while true; do sleep 1; done'
|
||||
- name: pause
|
||||
image: gcr.io/google-containers/pause:2.0
|
||||
ports:
|
||||
- containerPort: 81
|
||||
name: web-2
|
@@ -1,26 +1,13 @@
|
||||
# A headless service to create DNS records
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
name: nginx
|
||||
labels:
|
||||
app: nginx-statefulset
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
name: web
|
||||
# *.nginx.default.svc.cluster.local
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: nginx-statefulset
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
apiVersion: apps/v1beta2
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-statefulset
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
serviceName: "nginx"
|
||||
replicas: 0
|
||||
template:
|
||||
@@ -28,7 +15,7 @@ spec:
|
||||
labels:
|
||||
app: nginx-statefulset
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: nginx
|
||||
image: gcr.io/google_containers/nginx-slim:0.7
|
Reference in New Issue
Block a user