From 3a981ac323638acd18f81cca7f6253bfd3ddfee6 Mon Sep 17 00:00:00 2001 From: Edward Viaene Date: Sun, 29 Sep 2019 14:46:53 +0200 Subject: [PATCH] deployment api version change --- affinity/node-affinity.yaml | 5 ++++- affinity/pod-affinity.yaml | 10 ++++++++-- affinity/pod-anti-affinity-5.yaml | 5 ++++- affinity/pod-anti-affinity.yaml | 20 +++++++++++++++---- autoscaling/hpa-example.yml | 7 +++++-- elb-tls/helloworld.yml | 5 ++++- external-dns/external-dns.yaml | 5 ++++- ingress/helloworld-v1.yml | 5 ++++- ingress/helloworld-v2.yml | 5 ++++- ingress/nginx-ingress-controller.yml | 2 +- .../nginx-ingress-controller-with-elb.yml | 4 ++-- metrics-server/metrics-server-deployment.yaml | 2 +- pod-presets/deployments.yaml | 12 ++++++++--- resourcequotas/helloworld-no-quotas.yml | 5 ++++- resourcequotas/helloworld-with-quotas.yml | 5 ++++- service-discovery/helloworld-db.yml | 5 ++++- tolerations/tolerations.yaml | 10 ++++++++-- volumes/helloworld-with-volume.yml | 5 ++++- wordpress-volumes/wordpress-web.yml | 5 ++++- ...wordpress-single-deployment-no-volumes.yml | 5 ++++- 20 files changed, 98 insertions(+), 29 deletions(-) diff --git a/affinity/node-affinity.yaml b/affinity/node-affinity.yaml index cb1016f..49970d8 100644 --- a/affinity/node-affinity.yaml +++ b/affinity/node-affinity.yaml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: node-affinity spec: replicas: 3 + selector: + matchLabels: + app: node-affinity template: metadata: labels: diff --git a/affinity/pod-affinity.yaml b/affinity/pod-affinity.yaml index bc9c34e..0b23587 100644 --- a/affinity/pod-affinity.yaml +++ b/affinity/pod-affinity.yaml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-1 spec: replicas: 1 + selector: + matchLabels: + app: pod-affinity-1 template: metadata: labels: @@ -16,12 +19,15 @@ spec: - name: nodejs-port containerPort: 3000 --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-2 spec: replicas: 1 + selector: + matchLabels: + app: pod-affinity-2 template: metadata: labels: diff --git a/affinity/pod-anti-affinity-5.yaml b/affinity/pod-anti-affinity-5.yaml index 76821bd..3a5b457 100644 --- a/affinity/pod-anti-affinity-5.yaml +++ b/affinity/pod-anti-affinity-5.yaml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-5 spec: replicas: 1 + selector: + matchLabels: + app: pod-affinity-5 template: metadata: labels: diff --git a/affinity/pod-anti-affinity.yaml b/affinity/pod-anti-affinity.yaml index 3e76aaa..17ef232 100644 --- a/affinity/pod-anti-affinity.yaml +++ b/affinity/pod-anti-affinity.yaml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-1 spec: replicas: 1 + selector: + matchLabels: + app: pod-affinity-1 template: metadata: labels: @@ -16,12 +19,15 @@ spec: - name: nodejs-port containerPort: 3000 --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-2 spec: replicas: 3 + selector: + matchLabels: + app: pod-affinity-2 template: metadata: labels: @@ -44,12 +50,15 @@ spec: - name: redis-port containerPort: 6379 --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-3 spec: replicas: 3 + selector: + matchLabels: + app: pod-affinity-3 template: metadata: labels: @@ -72,12 +81,15 @@ spec: - name: nodejs-port containerPort: 3000 --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: pod-affinity-4 spec: replicas: 1 + selector: + matchLabels: + app: pod-affinity-4 template: metadata: labels: diff --git a/autoscaling/hpa-example.yml b/autoscaling/hpa-example.yml index 357272e..c9ab8a9 100644 --- a/autoscaling/hpa-example.yml +++ b/autoscaling/hpa-example.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: hpa-example spec: replicas: 3 + selector: + matchLabels: + app: hpa-example template: metadata: labels: @@ -39,7 +42,7 @@ metadata: name: hpa-example-autoscaler spec: scaleTargetRef: - apiVersion: extensions/v1beta1 + apiVersion: apps/v1 kind: Deployment name: hpa-example minReplicas: 1 diff --git a/elb-tls/helloworld.yml b/elb-tls/helloworld.yml index 88d8da7..d786c24 100644 --- a/elb-tls/helloworld.yml +++ b/elb-tls/helloworld.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-deployment spec: replicas: 3 + selector: + matchLabels: + app: helloworld template: metadata: labels: diff --git a/external-dns/external-dns.yaml b/external-dns/external-dns.yaml index 6601bed..05a4261 100644 --- a/external-dns/external-dns.yaml +++ b/external-dns/external-dns.yaml @@ -34,11 +34,14 @@ subjects: name: external-dns namespace: default --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: external-dns spec: + selector: + matchLabels: + app: external-dns strategy: type: Recreate template: diff --git a/ingress/helloworld-v1.yml b/ingress/helloworld-v1.yml index 0118b6c..1e04ac6 100644 --- a/ingress/helloworld-v1.yml +++ b/ingress/helloworld-v1.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-v1-deployment spec: replicas: 1 + selector: + matchLabels: + app: helloworld-v1 template: metadata: labels: diff --git a/ingress/helloworld-v2.yml b/ingress/helloworld-v2.yml index 874fe1e..2e473a7 100644 --- a/ingress/helloworld-v2.yml +++ b/ingress/helloworld-v2.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-v2-deployment spec: replicas: 1 + selector: + matchLabels: + app: helloworld-v2 template: metadata: labels: diff --git a/ingress/nginx-ingress-controller.yml b/ingress/nginx-ingress-controller.yml index edc6a52..ae78e20 100644 --- a/ingress/nginx-ingress-controller.yml +++ b/ingress/nginx-ingress-controller.yml @@ -1,5 +1,5 @@ # updated this file with the latest ingress-controller from https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: DaemonSet metadata: name: nginx-ingress-controller diff --git a/kubeless/nginx-ingress-controller-with-elb.yml b/kubeless/nginx-ingress-controller-with-elb.yml index 74d5758..284d1c5 100644 --- a/kubeless/nginx-ingress-controller-with-elb.yml +++ b/kubeless/nginx-ingress-controller-with-elb.yml @@ -6,7 +6,7 @@ metadata: name: ingress-nginx --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: default-http-backend @@ -248,7 +248,7 @@ subjects: namespace: ingress-nginx --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: nginx-ingress-controller diff --git a/metrics-server/metrics-server-deployment.yaml b/metrics-server/metrics-server-deployment.yaml index dd963a0..932ea3b 100644 --- a/metrics-server/metrics-server-deployment.yaml +++ b/metrics-server/metrics-server-deployment.yaml @@ -5,7 +5,7 @@ metadata: name: metrics-server namespace: kube-system --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: metrics-server diff --git a/pod-presets/deployments.yaml b/pod-presets/deployments.yaml index db5dc67..87a3d63 100644 --- a/pod-presets/deployments.yaml +++ b/pod-presets/deployments.yaml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: deployment-1 spec: replicas: 3 + selector: + matchLabels: + app: myapp template: metadata: labels: @@ -16,16 +19,19 @@ spec: - name: nodejs-port containerPort: 3000 --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: deployment-2 spec: replicas: 3 + selector: + matchLabels: + app: myapp-2 template: metadata: labels: - app: myapp + app: myapp-2 spec: containers: - name: k8s-demo diff --git a/resourcequotas/helloworld-no-quotas.yml b/resourcequotas/helloworld-no-quotas.yml index 98daa88..9937e76 100644 --- a/resourcequotas/helloworld-no-quotas.yml +++ b/resourcequotas/helloworld-no-quotas.yml @@ -1,10 +1,13 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-deployment namespace: myspace spec: replicas: 3 + selector: + matchLabels: + app: helloworld template: metadata: labels: diff --git a/resourcequotas/helloworld-with-quotas.yml b/resourcequotas/helloworld-with-quotas.yml index eeb6f38..60a1060 100644 --- a/resourcequotas/helloworld-with-quotas.yml +++ b/resourcequotas/helloworld-with-quotas.yml @@ -1,10 +1,13 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-deployment namespace: myspace spec: replicas: 3 + selector: + matchLabels: + app: helloworld template: metadata: labels: diff --git a/service-discovery/helloworld-db.yml b/service-discovery/helloworld-db.yml index e0a9dae..1552412 100644 --- a/service-discovery/helloworld-db.yml +++ b/service-discovery/helloworld-db.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-deployment spec: replicas: 3 + selector: + matchLabels: + app: helloworld-db template: metadata: labels: diff --git a/tolerations/tolerations.yaml b/tolerations/tolerations.yaml index a02a020..2240a9b 100644 --- a/tolerations/tolerations.yaml +++ b/tolerations/tolerations.yaml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: tolerations-1 spec: replicas: 3 + selector: + matchLabels: + app: tolerations-1 template: metadata: labels: @@ -16,12 +19,15 @@ spec: - name: nodejs-port containerPort: 3000 --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: tolerations-2 spec: replicas: 3 + selector: + matchLabels: + app: tolerations-2 template: metadata: labels: diff --git a/volumes/helloworld-with-volume.yml b/volumes/helloworld-with-volume.yml index 13eaf63..f8765fc 100644 --- a/volumes/helloworld-with-volume.yml +++ b/volumes/helloworld-with-volume.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: helloworld-deployment spec: replicas: 1 + selector: + matchLabels: + app: helloworld template: metadata: labels: diff --git a/wordpress-volumes/wordpress-web.yml b/wordpress-volumes/wordpress-web.yml index ab5452a..8f8023c 100644 --- a/wordpress-volumes/wordpress-web.yml +++ b/wordpress-volumes/wordpress-web.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: wordpress-deployment spec: replicas: 2 + selector: + matchLabels: + app: wordpress template: metadata: labels: diff --git a/wordpress/wordpress-single-deployment-no-volumes.yml b/wordpress/wordpress-single-deployment-no-volumes.yml index 38058b4..6366bb6 100644 --- a/wordpress/wordpress-single-deployment-no-volumes.yml +++ b/wordpress/wordpress-single-deployment-no-volumes.yml @@ -1,9 +1,12 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: wordpress-deployment spec: replicas: 1 + selector: + matchLabels: + app: wordpress template: metadata: labels: