You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dg...@apache.org on 2018/08/28 14:01:00 UTC
[incubator-openwhisk-deploy-kube] branch master updated: update for
WorkloadAPI moving from beta to v1 in Kubernetes 1.9 (#287)
This is an automated email from the ASF dual-hosted git repository.
dgrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git
The following commit(s) were added to refs/heads/master by this push:
new 89f3f9d update for WorkloadAPI moving from beta to v1 in Kubernetes 1.9 (#287)
89f3f9d is described below
commit 89f3f9df5221bf820a11aed9ecb321d4d88e083c
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Tue Aug 28 09:58:58 2018 -0400
update for WorkloadAPI moving from beta to v1 in Kubernetes 1.9 (#287)
Switch to stable v1 API for Workload objects (Deployment, DaemonSet,
StatefulSet, ReplicatSet). This change requires Kubernetes version
1.9 or higher, so remove v1.8 from travisCI and documentation.
---
.travis.yml | 1 -
README.md | 3 +--
helm/openwhisk/templates/apigateway.yaml | 5 ++++-
helm/openwhisk/templates/controller.yaml | 5 ++++-
helm/openwhisk/templates/couchdb.yaml | 5 ++++-
helm/openwhisk/templates/invoker.yaml | 12 +++++++++---
helm/openwhisk/templates/kafka.yaml | 9 ++++++---
helm/openwhisk/templates/nginx.yaml | 5 ++++-
helm/openwhisk/templates/redis.yaml | 5 ++++-
helm/openwhisk/templates/zookeeper.yaml | 5 ++++-
helm/providers/charts/alarm/templates/pkgAlarmProvider.yaml | 5 ++++-
.../charts/cloudant/templates/pkgCloudantProvider.yaml | 5 ++++-
helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml | 5 ++++-
13 files changed, 52 insertions(+), 18 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 981aef1..0f3bdd1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,6 @@ env:
- secure: d7CuMXbhT83W2x78qiLwgogX1+3aPicd1PlTwwNNDN6QSkImbxareyKThnsqlHIiNj3o5l5DBuiYjy7wrF/xD1g8BQMmTwm99DRx5q3CI3Im3VCi/ZK8SaNjuOy24d7cf5k2tB/87Gk7zmKsMDYm+fpCl+GpgUmIEeIwthiAxuXSDWZ8eQPIptmxj56DeFRNouvXG+dEUtBfWiwN27UPxNKExCixFnegmdtffLbz6hhst7BHr5Ry9acbycre98PCwWZcu9lxFs+SJ1kvnzX2iue4otmDkF1WkJjxaOFPJVs/D3YItg+neLCSxjwBskPed+Fct8bOjcM/uVROJPNIq5icBmaPX2isH0lvtxOeVw/dmioWYXYPN9ygBOe4eO/vtPllN0bcAUo5xl9jXev8ciAozYrYpHVh9Fplfd81rcYTeYzALmRJBdoiWoc3KQGzwGc9sB1ffmy+KWgG9T0zbnS4fALSR4PS [...]
- secure: CJtnU94HTDqd4A6uvhFl8IpnmU+wTdlzb8bPBFUl/lI/VKXiRrYpgJdKUro5xEoxFKuqMprLhbyf66niyWLTIeogjUAEu/h/o2dBVeGgSGKoqC0hQgqvnxKFeGlzFJ0XuEs3vbStJGRnQszGsfnnDrscJtR0x9X+1w4aBKI7iPyyuFtVkDD1UsmBbSi+M8FTeq7G7A0reMDaey7uog3CFCpIMl4geshcohQEcKEGbnXQZoLPFpb7cBOE83VXBJ7Y7Dgf/U4keiLovvnuJThGKZm/SVV2KlELmBmtmbx3rMT6Vb5k9ChSdRWapromNnnzmJBIQ5Scc2mwV3A93/SMha1F3IlYpDKs5djfTw8jZfVnuiou7HhTaRjHkmmcwP12/k30gLe2kw0Vezg1TCY4zgtOpcmCxc8RHEy0ceA74rKvRi8LbexTCwX+iAMQFn/pSrh/OqAq/50JbLyczcoO1zXWS38txUQN [...]
matrix:
- - TRAVIS_KUBE_VERSION=v1.8.0 TRAVIS_MINIKUBE_VERSION=v0.25.2 OW_CONTAINER_FACTORY=docker
- TRAVIS_KUBE_VERSION=v1.9.0 TRAVIS_MINIKUBE_VERSION=v0.25.2 OW_CONTAINER_FACTORY=docker
- TRAVIS_KUBE_VERSION=v1.10.5 TRAVIS_MINIKUBE_VERSION=v0.28.2 OW_CONTAINER_FACTORY=docker
- TRAVIS_KUBE_VERSION=v1.10.5 TRAVIS_MINIKUBE_VERSION=v0.28.2 OW_CONTAINER_FACTORY=kubernetes
diff --git a/README.md b/README.md
index ee22178..5b7c4b6 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ This repository can be used to deploy OpenWhisk to a Kubernetes cluster.
### Requirements
Several requirements must be met for OpenWhisk to deploy on Kubernetes.
-* [Kubernetes](https://github.com/kubernetes/kubernetes) version 1.8+. However, multiple minor releases of Kubernetes, including 1.8.9 and 1.9.4 will not work for OpenWhisk due to bugs with volume mount subpaths (see[[kubernetes-61076](https://github.com/kubernetes/kubernetes/issues/61076)]). This bug will surface as a failure when deploying the nginx container.
+* [Kubernetes](https://github.com/kubernetes/kubernetes) version 1.9+. However, version 1.9.4 will not work for OpenWhisk due to a bug with volume mount subpaths (see[[kubernetes-61076](https://github.com/kubernetes/kubernetes/issues/61076)]). This bug will surface as a failure when deploying the nginx container.
* The ability to create Ingresses to make a Kubernetes service available outside of the cluster so you can actually use OpenWhisk.
* If you enable persistence (see [docs/configurationChoices.md](./docs/configurationChoices.md)), either your cluster is configured to support [Dynamic Volume Provision](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) or you must manually create any necessary PersistentVolumes when deploying the Helm chart.
* Endpoints of Kubernetes services must be able to loopback to themselves (the kubelet's `hairpin-mode` must not be `none`).
@@ -55,7 +55,6 @@ Travis CI testing.
| Kubernetes Version | Minikube Version |
--- | --- |
-1.8.0 | 0.25.2 |
1.9.0 | 0.25.2 |
1.10.5 | 0.28.2 |
diff --git a/helm/openwhisk/templates/apigateway.yaml b/helm/openwhisk/templates/apigateway.yaml
index 056c1bd..5f7e3c8 100644
--- a/helm/openwhisk/templates/apigateway.yaml
+++ b/helm/openwhisk/templates/apigateway.yaml
@@ -19,7 +19,7 @@ spec:
name: api
---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.apigw.name | quote }}
@@ -28,6 +28,9 @@ metadata:
name: {{ .Values.apigw.name | quote }}
spec:
replicas: {{ .Values.apigw.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.apigw.name | quote }}
template:
metadata:
labels:
diff --git a/helm/openwhisk/templates/controller.yaml b/helm/openwhisk/templates/controller.yaml
index 125d139..0135dad 100644
--- a/helm/openwhisk/templates/controller.yaml
+++ b/helm/openwhisk/templates/controller.yaml
@@ -16,7 +16,7 @@ spec:
- port: {{ .Values.controller.port }}
name: http
---
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Values.controller.name | quote }}
@@ -27,6 +27,9 @@ spec:
serviceName: {{ .Values.controller.name | quote }}
podManagementPolicy: "Parallel"
replicas: {{ .Values.controller.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.controller.name | quote }}
template:
metadata:
labels:
diff --git a/helm/openwhisk/templates/couchdb.yaml b/helm/openwhisk/templates/couchdb.yaml
index 65bb97e..23a72b9 100644
--- a/helm/openwhisk/templates/couchdb.yaml
+++ b/helm/openwhisk/templates/couchdb.yaml
@@ -17,7 +17,7 @@ spec:
name: couchdb
---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.db.name | quote }}
@@ -26,6 +26,9 @@ metadata:
name: {{ .Values.db.name | quote }}
spec:
replicas: {{ .Values.db.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.db.name | quote }}
template:
metadata:
labels:
diff --git a/helm/openwhisk/templates/invoker.yaml b/helm/openwhisk/templates/invoker.yaml
index 4dee803..c9d17af 100644
--- a/helm/openwhisk/templates/invoker.yaml
+++ b/helm/openwhisk/templates/invoker.yaml
@@ -3,10 +3,10 @@
---
{{- if eq .Values.invoker.containerFactory.impl "docker" }}
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: DaemonSet
{{- else if eq .Values.invoker.containerFactory.impl "kubernetes" -}}
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
kind: StatefulSet
{{- end }}
metadata:
@@ -19,6 +19,9 @@ spec:
podManagementPolicy: "Parallel"
replicas: {{ .Values.invoker.containerFactory.kubernetes.replicaCount }}
{{- end }}
+ selector:
+ matchLabels:
+ name: {{ .Values.invoker.name | quote }}
template:
metadata:
labels:
@@ -155,7 +158,7 @@ spec:
{{ if .Values.invoker.containerFactory.kubernetes.agent.enabled }}
---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ .Values.invoker.containerFactory.kubernetes.agent.name | quote }}
@@ -163,6 +166,9 @@ metadata:
labels:
name: {{ .Values.invoker.containerFactory.kubernetes.agent.name | quote }}
spec:
+ selector:
+ matchLabels:
+ name: {{ .Values.invoker.containerFactory.kubernetes.agent.name | quote }}
template:
metadata:
labels:
diff --git a/helm/openwhisk/templates/kafka.yaml b/helm/openwhisk/templates/kafka.yaml
index b55a767..75d8041 100644
--- a/helm/openwhisk/templates/kafka.yaml
+++ b/helm/openwhisk/templates/kafka.yaml
@@ -12,10 +12,10 @@ spec:
- name: broker
port: {{ .Values.kafka.port }}
selector:
- app: {{ .Values.kafka.name | quote }}
+ name: {{ .Values.kafka.name | quote }}
---
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Values.kafka.name | quote }}
@@ -24,10 +24,13 @@ spec:
serviceName: {{ .Values.kafka.name | quote }}
podManagementPolicy: "Parallel"
replicas: {{ .Values.kafka.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.kafka.name | quote }}
template:
metadata:
labels:
- app: {{ .Values.kafka.name | quote }}
+ name: {{ .Values.kafka.name | quote }}
spec:
restartPolicy: {{ .Values.kafka.restartPolicy }}
diff --git a/helm/openwhisk/templates/nginx.yaml b/helm/openwhisk/templates/nginx.yaml
index 0b002da..562ef7e 100644
--- a/helm/openwhisk/templates/nginx.yaml
+++ b/helm/openwhisk/templates/nginx.yaml
@@ -26,7 +26,7 @@ spec:
name: https-admin
---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.nginx.name | quote }}
@@ -35,6 +35,9 @@ metadata:
name: nginx
spec:
replicas: {{ .Values.nginx.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.nginx.name | quote }}
template:
metadata:
labels:
diff --git a/helm/openwhisk/templates/redis.yaml b/helm/openwhisk/templates/redis.yaml
index 087f7a0..e6939fd 100644
--- a/helm/openwhisk/templates/redis.yaml
+++ b/helm/openwhisk/templates/redis.yaml
@@ -17,7 +17,7 @@ spec:
name: redis
---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.redis.name | quote }}
@@ -26,6 +26,9 @@ metadata:
name: {{ .Values.redis.name | quote }}
spec:
replicas: {{ .Values.redis.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.redis.name | quote }}
template:
metadata:
labels:
diff --git a/helm/openwhisk/templates/zookeeper.yaml b/helm/openwhisk/templates/zookeeper.yaml
index 047da1e..56bfc1b 100644
--- a/helm/openwhisk/templates/zookeeper.yaml
+++ b/helm/openwhisk/templates/zookeeper.yaml
@@ -43,7 +43,7 @@ data:
{{- end }}
---
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Values.zookeeper.name | quote }}
@@ -52,6 +52,9 @@ spec:
serviceName: {{ .Values.zookeeper.name | quote }}
podManagementPolicy: "Parallel"
replicas: {{ .Values.zookeeper.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.zookeeper.name | quote }}
template:
metadata:
labels:
diff --git a/helm/providers/charts/alarm/templates/pkgAlarmProvider.yaml b/helm/providers/charts/alarm/templates/pkgAlarmProvider.yaml
index 040d2b9..1c760ef 100644
--- a/helm/providers/charts/alarm/templates/pkgAlarmProvider.yaml
+++ b/helm/providers/charts/alarm/templates/pkgAlarmProvider.yaml
@@ -1,7 +1,7 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.alarmprovider.name | quote }}
@@ -10,6 +10,9 @@ metadata:
name: alarmprovider
spec:
replicas: {{ .Values.alarmprovider.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.alarmprovider.name | quote }}
template:
metadata:
labels:
diff --git a/helm/providers/charts/cloudant/templates/pkgCloudantProvider.yaml b/helm/providers/charts/cloudant/templates/pkgCloudantProvider.yaml
index 3424b9e..bd54def 100644
--- a/helm/providers/charts/cloudant/templates/pkgCloudantProvider.yaml
+++ b/helm/providers/charts/cloudant/templates/pkgCloudantProvider.yaml
@@ -1,7 +1,7 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.cloudantprovider.name | quote }}
@@ -10,6 +10,9 @@ metadata:
name: cloudantprovider
spec:
replicas: {{ .Values.cloudantprovider.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.cloudantprovider.name | quote }}
template:
metadata:
labels:
diff --git a/helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml b/helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml
index 3717877..7fdc257 100644
--- a/helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml
+++ b/helm/providers/charts/kafka/templates/pkgKafkaProvider.yaml
@@ -1,7 +1,7 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.kafkaprovider.name | quote }}
@@ -10,6 +10,9 @@ metadata:
name: nginx
spec:
replicas: {{ .Values.kafkaprovider.replicaCount }}
+ selector:
+ matchLabels:
+ name: {{ .Values.kafkaprovider.name | quote }}
template:
metadata:
labels: