Skip to content

Commit

Permalink
update all Deployment API version to apps/v1 in k8s v1.9.0 and add ac…
Browse files Browse the repository at this point in the history
…curate (kubernetes#193)

Signed-off-by: LinWengang <[email protected]>
  • Loading branch information
david authored and ahmetb committed Feb 12, 2018
1 parent a9514d7 commit 0112841
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 28 deletions.
2 changes: 1 addition & 1 deletion cassandra/cassandra-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: "apps/v1" # for versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use apps/v1beta1
apiVersion: "apps/v1" # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: StatefulSet
metadata:
name: cassandra
Expand Down
6 changes: 5 additions & 1 deletion guestbook/all-in-one/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ spec:
app: guestbook
tier: frontend
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: frontend
spec:
selector:
matchLabels:
app: guestbook
tier: frontend
replicas: 3
template:
metadata:
Expand Down
20 changes: 17 additions & 3 deletions guestbook/all-in-one/guestbook-all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ spec:
tier: backend
role: master
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: redis-master
spec:
selector:
matchLabels:
app: redis
role: master
tier: backend
replicas: 1
template:
metadata:
Expand Down Expand Up @@ -54,11 +59,16 @@ spec:
tier: backend
role: slave
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: redis-slave
spec:
selector:
matchLabels:
app: redis
role: slave
tier: backend
replicas: 2
template:
metadata:
Expand Down Expand Up @@ -102,11 +112,15 @@ spec:
app: guestbook
tier: frontend
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: frontend
spec:
selector:
matchLabels:
app: guestbook
tier: frontend
replicas: 3
template:
metadata:
Expand Down
7 changes: 6 additions & 1 deletion guestbook/all-in-one/redis-slave.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ spec:
role: slave
tier: backend
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: redis-slave
spec:
selector:
matchLabels:
app: redis
role: slave
tier: backend
replicas: 2
template:
metadata:
Expand Down
2 changes: 1 addition & 1 deletion guestbook/frontend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: frontend
Expand Down
2 changes: 1 addition & 1 deletion guestbook/redis-master-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: redis-master
Expand Down
2 changes: 1 addition & 1 deletion guestbook/redis-slave-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: redis-slave
Expand Down
2 changes: 1 addition & 1 deletion mysql-wordpress-pd/mysql-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
requests:
storage: 20Gi
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: wordpress-mysql
Expand Down
2 changes: 1 addition & 1 deletion mysql-wordpress-pd/wordpress-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
requests:
storage: 20Gi
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: wordpress
Expand Down
2 changes: 1 addition & 1 deletion staging/cockroachdb/cockroachdb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
app: cockroachdb
minAvailable: 67%
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use apps/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: StatefulSet
metadata:
name: cockroachdb
Expand Down
5 changes: 4 additions & 1 deletion staging/newrelic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The DaemonSet definition instructs Kubernetes to place a newrelic sysmond agent
<!-- BEGIN MUNGE: EXAMPLE newrelic-daemonset.yaml -->

```yaml
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: DaemonSet
metadata:
name: newrelic-agent
Expand All @@ -79,6 +79,9 @@ metadata:
app: newrelic-agent
version: v1
spec:
selector:
matchLabels:
name: newrelic
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion staging/newrelic/newrelic-daemonset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: DaemonSet
metadata:
name: newrelic-agent
Expand Down
2 changes: 1 addition & 1 deletion staging/openshift-origin/etcd-controller.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: etcd
Expand Down
2 changes: 1 addition & 1 deletion staging/openshift-origin/etcd-discovery-controller.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: etcd-discovery
Expand Down
2 changes: 1 addition & 1 deletion staging/openshift-origin/openshift-controller.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
labels:
Expand Down
7 changes: 5 additions & 2 deletions staging/storage/hazelcast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,16 @@ Deployments will "adopt" existing pods that match their selector query, so let's
<!-- BEGIN MUNGE: EXAMPLE hazelcast-controller.yaml -->

```yaml
apiVersion: extensions/v1beta1
apiVersion: "apps/v1" # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: hazelcast
labels:
name: hazelcast
spec:
spec:
selector:
matchLabels:
name: hazelcast
template:
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion staging/storage/hazelcast/hazelcast-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: hazelcast
Expand Down
7 changes: 5 additions & 2 deletions staging/storage/minio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ A deployment encapsulates replica sets and pods — so, if a pod goes down,
This is the deployment description.

```sh
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
Expand Down Expand Up @@ -237,7 +240,7 @@ A StatefulSet provides a deterministic name and a unique identity to each pod, m
This is the Statefulset description.

```sh
# for versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use apps/v1beta1
# for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion staging/storage/minio/minio-distributed-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use apps/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: StatefulSet
metadata:
name: minio
Expand Down
5 changes: 4 additions & 1 deletion staging/storage/minio/minio-standalone-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
spec:
selector:
matchLabels:
app: minio
strategy:
type: Recreate
template:
Expand Down
2 changes: 1 addition & 1 deletion staging/sysdig-cloud/sysdig-daemonset.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Use this sysdig.yaml when Daemon Sets are enabled on Kubernetes (minimum version 1.1.1). Otherwise use the RC method.

apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
apiVersion: apps/v1 #for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: DaemonSet
metadata:
name: sysdig-agent
Expand Down
2 changes: 1 addition & 1 deletion staging/volumes/vsphere/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ vSphere volumes can be consumed by Stateful Sets.
selector:
app: nginx
---
# for versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use apps/v1beta1
# for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
apiVersion:apps/v1
kind: StatefulSet
metadata:
Expand Down
5 changes: 4 additions & 1 deletion staging/volumes/vsphere/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: deployment
spec:
selector:
matchLabels:
app: redis
replicas: 1
template:
metadata:
Expand Down
2 changes: 1 addition & 1 deletion staging/volumes/vsphere/simple-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
selector:
app: nginx
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use apps/v1beta1
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: StatefulSet
metadata:
name: web
Expand Down

0 comments on commit 0112841

Please sign in to comment.