From e5e2c64bb4c665f5a8467c9ad290a501110333f8 Mon Sep 17 00:00:00 2001 From: David Grove Date: Tue, 18 Aug 2020 14:15:11 -0400 Subject: [PATCH] remove nodejs:6, nodejs:8 and cloudant-provider from helm chart 1. Remove nodejs:6 and nodejs:8 from runtime.json. 2. Remove support for deploying the cloudant-provider since it is not being actively maintained and still utilizes nodejs:6 actions. --- docs/configurationChoices.md | 6 +- docs/private-docker-registry.md | 1 - .../configMapFiles/installPackages/myTask.sh | 15 --- .../tests/packageChecker/myTask.sh | 3 - helm/openwhisk/runtimes-minimal-travis.json | 10 -- helm/openwhisk/runtimes.json | 28 ----- .../templates/install-packages-job.yaml | 6 - .../templates/provider-cloudant-pod.yaml | 106 ------------------ .../templates/provider-cloudant-pvc.yaml | 34 ------ .../templates/provider-kafka-pod.yaml | 2 +- .../templates/tests/package-checker-pod.yaml | 2 - helm/openwhisk/values.schema.json | 14 +-- helm/openwhisk/values.yaml | 15 --- tools/travis/collect-logs.sh | 1 - tools/travis/deploy-chart.sh | 1 - 15 files changed, 6 insertions(+), 238 deletions(-) delete mode 100644 helm/openwhisk/templates/provider-cloudant-pod.yaml delete mode 100644 helm/openwhisk/templates/provider-cloudant-pvc.yaml diff --git a/docs/configurationChoices.md b/docs/configurationChoices.md index 3c352ffa..5f7afe11 100644 --- a/docs/configurationChoices.md +++ b/docs/configurationChoices.md @@ -43,7 +43,7 @@ components is not currently supported: - couchdb. For production deployments of OpenWhisk on Kubernetes, we strongly recomend running CouchDB externally to OpenWhisk as described below. An external CouchDB instance enables better management of the database and decouples its lifecycle from that of the OpenWhisk deployment. -- The event providers: alarmprovider, cloudantprovider, and kafkaprovider. +- The event providers: alarmprovider and kafkaprovider. ### Using an external database @@ -179,8 +179,8 @@ k8s: ### Selectively Deploying Event Providers -The default settings of the Helm chart will deploy OpenWhisk's alarm, -cloudant, and kafka event providers. If you want to disable the +The default settings of the Helm chart will deploy OpenWhisk's alarm +and kafka event providers. If you want to disable the deployment of one or more event providers, you can add a stanza to your `mycluster.yaml` for example: ```yaml diff --git a/docs/private-docker-registry.md b/docs/private-docker-registry.md index 1a274d62..69ffbc23 100644 --- a/docs/private-docker-registry.md +++ b/docs/private-docker-registry.md @@ -34,7 +34,6 @@ By default, helm charts currently use docker hub to download images to deploy Op - busybox - openwhisk/alarmprovider - openwhisk/kafkaprovider - - openwhisk/cloudantprovider - Add details of your docker registry information in mycluster.yml. diff --git a/helm/openwhisk/configMapFiles/installPackages/myTask.sh b/helm/openwhisk/configMapFiles/installPackages/myTask.sh index 7263f6ef..bb390434 100644 --- a/helm/openwhisk/configMapFiles/installPackages/myTask.sh +++ b/helm/openwhisk/configMapFiles/installPackages/myTask.sh @@ -106,21 +106,6 @@ if [ "$OW_INSTALL_ALARM_PROVIDER" == "yes" ]; then fi -##### -# Install the catalog for the Cloudant provider -##### - -if [ "$OW_INSTALL_CLOUDANT_PROVIDER" == "yes" ]; then - cd / - git clone https://github.com/apache/openwhisk-package-cloudant.git - - pushd /openwhisk-package-cloudant - git checkout $OW_GIT_TAG_OPENWHISK_PACKAGE_CLOUDANT - ./installCatalog.sh $WHISK_AUTH $WHISK_API_HOST_URL $PROVIDER_DB_URL $CLOUDANT_DB_PREFIX $WHISK_API_HOST_URL || exit 1 - popd -fi - - ##### # Install the catalog for the Kafka provider ##### diff --git a/helm/openwhisk/configMapFiles/tests/packageChecker/myTask.sh b/helm/openwhisk/configMapFiles/tests/packageChecker/myTask.sh index f77ff8f6..3993eedd 100644 --- a/helm/openwhisk/configMapFiles/tests/packageChecker/myTask.sh +++ b/helm/openwhisk/configMapFiles/tests/packageChecker/myTask.sh @@ -61,9 +61,6 @@ packageListingCheck "websocket" if [ "$OW_INSTALL_ALARM_PROVIDER" == "yes" ]; then packageListingCheck "alarms" fi -if [ "$OW_INSTALL_CLOUDANT_PROVIDER" == "yes" ]; then - packageListingCheck "cloudant" -fi if [ "$OW_INSTALL_KAFKA_PROVIDER" == "yes" ]; then packageListingCheck "messaging" fi diff --git a/helm/openwhisk/runtimes-minimal-travis.json b/helm/openwhisk/runtimes-minimal-travis.json index d737d1ce..62f4e7c4 100644 --- a/helm/openwhisk/runtimes-minimal-travis.json +++ b/helm/openwhisk/runtimes-minimal-travis.json @@ -2,16 +2,6 @@ { "runtimes": { "nodejs": [ - { - "kind": "nodejs:6", - "default": false, - "image": { - "prefix": "openwhisk", - "name": "nodejs6action", - "tag": "1.14.0-incubating" - }, - "deprecated": false - }, { "kind": "nodejs:10", "default": true, diff --git a/helm/openwhisk/runtimes.json b/helm/openwhisk/runtimes.json index d43afc06..3a0bfbbd 100644 --- a/helm/openwhisk/runtimes.json +++ b/helm/openwhisk/runtimes.json @@ -1,34 +1,6 @@ { "runtimes": { "nodejs": [ - { - "kind": "nodejs:6", - "default": false, - "image": { - "prefix": "openwhisk", - "name": "nodejs6action", - "tag": "1.14.0-incubating" - }, - "deprecated": false, - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - } - }, - { - "kind": "nodejs:8", - "default": false, - "image": { - "prefix": "openwhisk", - "name": "action-nodejs-v8", - "tag": "1.15.0" - }, - "deprecated": false, - "attached": { - "attachmentName": "codefile", - "attachmentType": "text/plain" - } - }, { "kind": "nodejs:10", "default": true, diff --git a/helm/openwhisk/templates/install-packages-job.yaml b/helm/openwhisk/templates/install-packages-job.yaml index de12aa66..71b2d37a 100644 --- a/helm/openwhisk/templates/install-packages-job.yaml +++ b/helm/openwhisk/templates/install-packages-job.yaml @@ -120,16 +120,12 @@ spec: # Provider database table prefixes - name: "ALARM_DB_PREFIX" value: {{ .Values.providers.alarm.dbPrefix | quote }} - - name: "CLOUDANT_DB_PREFIX" - value: {{ .Values.providers.cloudant.dbPrefix | quote }} - name: "KAFKA_DB_PREFIX" value: {{ .Values.providers.kafka.dbPrefix | quote }} # Should each of the providers be installed? - name: "OW_INSTALL_ALARM_PROVIDER" value: {{ if .Values.providers.alarm.enabled }} "yes" {{ else }} "no" {{ end }} - - name: "OW_INSTALL_CLOUDANT_PROVIDER" - value: {{ if .Values.providers.cloudant.enabled }} "yes" {{ else }} "no" {{ end }} - name: "OW_INSTALL_KAFKA_PROVIDER" value: {{ if .Values.providers.kafka.enabled }} "yes" {{ else }} "no" {{ end }} @@ -140,7 +136,5 @@ spec: value: {{ .Values.whisk.versions.openwhiskCatalog.gitTag | quote }} - name: "OW_GIT_TAG_OPENWHISK_PACKAGE_ALARMS" value: {{ .Values.whisk.versions.openwhiskPackageAlarms.gitTag | quote }} - - name: "OW_GIT_TAG_OPENWHISK_PACKAGE_CLOUDANT" - value: {{ .Values.whisk.versions.openwhiskPackageCloudant.gitTag | quote }} - name: "OW_GIT_TAG_OPENWHISK_PACKAGE_KAFKA" value: {{ .Values.whisk.versions.openwhiskPackageKafka.gitTag | quote }} diff --git a/helm/openwhisk/templates/provider-cloudant-pod.yaml b/helm/openwhisk/templates/provider-cloudant-pod.yaml deleted file mode 100644 index 2b0274df..00000000 --- a/helm/openwhisk/templates/provider-cloudant-pod.yaml +++ /dev/null @@ -1,106 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -{{- if .Values.providers.cloudant.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-cloudantprovider - labels: - name: {{ .Release.Name }}-cloudantprovider -{{ include "openwhisk.label_boilerplate" . | indent 4 }} -spec: - replicas: {{ .Values.providers.cloudant.replicaCount }} - selector: - matchLabels: - name: {{ .Release.Name }}-cloudantprovider - template: - metadata: - labels: - name: {{ .Release.Name }}-cloudantprovider -{{ include "openwhisk.label_boilerplate" . | indent 8 }} - spec: - restartPolicy: {{ .Values.providers.cloudant.restartPolicy }} - volumes: - - name: cloudant-logs -{{- if .Values.k8s.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Release.Name }}-cloudantprovider-pvc -{{- else }} - emptyDir: {} -{{- end }} - initContainers: - # Wait for a controller to be up (which implies couchdb is up as well). -{{ include "openwhisk.readiness.waitForController" . | indent 6 }} -{{ include "openwhisk.docker.imagePullSecrets" . | indent 6 }} - containers: - - name: cloudantprovider - image: "{{- .Values.docker.registry.name -}}{{- .Values.providers.cloudant.imageName -}}:{{- .Values.providers.cloudant.imageTag -}}" - imagePullPolicy: {{ .Values.providers.cloudant.imagePullPolicy | quote }} - ports: - - name: cludntprovider - containerPort: {{ .Values.providers.cloudant.apiPort }} - env: - {{- if .Values.providers.db.external }} - # Config database using the external instance - - name: "DB_PROTOCOL" - value: {{ .Values.providers.db.protocol | quote }} - - name: "DB_HOST" - value: "{{ .Values.providers.db.host }}:{{ .Values.providers.db.port }}" - - name: "DB_USERNAME" - value: {{ .Values.providers.db.username | quote }} - - name: "DB_PASSWORD" - value: {{ .Values.providers.db.password | quote }} - {{- else }} - # Config database using the same openwhisk cloudant instance - - name: "DB_PROTOCOL" - valueFrom: - configMapKeyRef: - name: {{ .Release.Name }}-db.config - key: db_protocol - - name: "DB_HOST" - valueFrom: - configMapKeyRef: - name: {{ .Release.Name }}-db.config - key: db_host_port - - name: "DB_USERNAME" - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-db.auth - key: db_username - - name: "DB_PASSWORD" - valueFrom: - secretKeyRef: - name: {{ .Release.Name }}-db.auth - key: db_password - {{- end }} - - name: "DB_PREFIX" - value: {{ .Values.providers.cloudant.dbPrefix | quote }} - - name: "ROUTER_HOST" - valueFrom: - configMapKeyRef: - name: {{ .Release.Name }}-whisk.config - key: whisk_api_host_nameAndPort - - name: "ENDPOINT_AUTH" - valueFrom: - configMapKeyRef: - name: {{ .Release.Name }}-whisk.config - key: whisk_api_host_nameAndPort - volumeMounts: - - name: cloudant-logs - mountPath: /logs -{{- end }} diff --git a/helm/openwhisk/templates/provider-cloudant-pvc.yaml b/helm/openwhisk/templates/provider-cloudant-pvc.yaml deleted file mode 100644 index ebbd5912..00000000 --- a/helm/openwhisk/templates/provider-cloudant-pvc.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -{{- if and .Values.providers.cloudant.enabled .Values.k8s.persistence.enabled }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Release.Name }}-cloudantprovider-pvc - labels: -{{ include "openwhisk.label_boilerplate" . | indent 4 }} -spec: -{{- if not .Values.k8s.persistence.hasDefaultStorageClass }} - storageClassName: {{ .Values.k8s.persistence.explicitStorageClass }} -{{- end }} - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.providers.cloudant.persistence.size }} -{{- end }} diff --git a/helm/openwhisk/templates/provider-kafka-pod.yaml b/helm/openwhisk/templates/provider-kafka-pod.yaml index 872f732d..2688f42f 100644 --- a/helm/openwhisk/templates/provider-kafka-pod.yaml +++ b/helm/openwhisk/templates/provider-kafka-pod.yaml @@ -56,7 +56,7 @@ spec: - name: "DB_PASS" value: {{ .Values.providers.db.password | quote }} {{- else }} - # Config database using the same openwhisk cloudant instance + # Config database using the same openwhisk couchdb instance - name: "DB_URL" valueFrom: configMapKeyRef: diff --git a/helm/openwhisk/templates/tests/package-checker-pod.yaml b/helm/openwhisk/templates/tests/package-checker-pod.yaml index dd2c5952..72432a1b 100644 --- a/helm/openwhisk/templates/tests/package-checker-pod.yaml +++ b/helm/openwhisk/templates/tests/package-checker-pod.yaml @@ -57,8 +57,6 @@ spec: # Which of the providers was installed (and thus should be checked)? - name: "OW_INSTALL_ALARM_PROVIDER" value: {{ if .Values.providers.alarm.enabled }} "yes" {{ else }} "no" {{ end }} - - name: "OW_INSTALL_CLOUDANT_PROVIDER" - value: {{ if .Values.providers.cloudant.enabled }} "yes" {{ else }} "no" {{ end }} - name: "OW_INSTALL_KAFKA_PROVIDER" value: {{ if .Values.providers.kafka.enabled }} "yes" {{ else }} "no" {{ end }} {{- end }} diff --git a/helm/openwhisk/values.schema.json b/helm/openwhisk/values.schema.json index d1c46395..288e0ed4 100644 --- a/helm/openwhisk/values.schema.json +++ b/helm/openwhisk/values.schema.json @@ -219,9 +219,8 @@ "openwhiskCli": { "type": "object", "properties": { "gitTag": { "type": "string" }, "required": ["gitTag"] } }, "openwhiskCatalog": { "type": "object", "properties": { "gitTag": { "type": "string" }, "required": ["gitTag"] } }, "openwhiskPackageAlarms": { "type": "object", "properties": { "gitTag": { "type": "string" }, "required": ["gitTag"] } }, - "openwhiskPackageCloudant": { "type": "object", "properties": { "gitTag": { "type": "string" }, "required": ["gitTag"] } }, "openwhiskPackageKafka": { "type": "object", "properties": { "gitTag": { "type": "string" }, "required": ["gitTag"] } }, - "required": ["openwhisk", "openwhiskCli", "openwhiskCatalog", "openwhiskPackageAlarms", "openwhiskPackageCloudant", "openwhiskPackageKafka"] + "required": ["openwhisk", "openwhiskCli", "openwhiskCatalog", "openwhiskPackageAlarms", "openwhiskPackageKafka"] } }, "required": [ "ingress", "auth", "systemNameSpace", "versions" ] @@ -427,14 +426,6 @@ ] }, - "cloudant": { - "allOf": [ - { "$ref": "#/definitions/podspec" }, - { "properties": { "apiPort": { "type": "integer", "minimum": 0 } }, "required": ["apiPort"] }, - { "properties": { "replicaCount": { "const": 1 } } } - ] - }, - "kafka": { "allOf": [ { "$ref": "#/definitions/podspec" }, @@ -515,8 +506,7 @@ "prometheus": { "$ref": "#/definitions/pvSizeValid" }, "providers": { "properties": { - "alarm": { "$ref": "#/definitions/pvSizeValid" }, - "cloudant": { "$ref": "#/definitions/pvSizeValid" } + "alarm": { "$ref": "#/definitions/pvSizeValid" } } } } diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml index e60dd666..3f417ef7 100644 --- a/helm/openwhisk/values.yaml +++ b/helm/openwhisk/values.yaml @@ -138,8 +138,6 @@ whisk: gitTag: "0.11.0" openwhiskPackageAlarms: gitTag: "2.2.0" - openwhiskPackageCloudant: - gitTag: "2.0.0-incubating" openwhiskPackageKafka: gitTag: "2.1.0" @@ -388,19 +386,6 @@ providers: dbPrefix: "alm" persistence: size: 1Gi - # Cloudant provider configurations - cloudant: - enabled: true - imageName: "openwhisk/cloudantprovider" - imageTag: "2.0.0-incubating" - imagePullPolicy: "IfNotPresent" - # NOTE: replicaCount > 1 doesn't work because of the PVC - replicaCount: 1 - restartPolicy: "Always" - apiPort: 8080 - dbPrefix: "cldt" - persistence: - size: 1Gi # Kafka provider configurations kafka: enabled: true diff --git a/tools/travis/collect-logs.sh b/tools/travis/collect-logs.sh index bdea73b3..57254973 100755 --- a/tools/travis/collect-logs.sh +++ b/tools/travis/collect-logs.sh @@ -39,7 +39,6 @@ kubectl -n openwhisk logs -lname=ow4travis-install-packages >& logs/install-pack kubectl -n openwhisk logs -lname=ow4travis-init-couchdb >& logs/init-couchdb.log kubectl logs -n openwhisk -low-testpod=true --tail=-1 >& logs/helm-tests.log kubectl -n openwhisk logs -lname=ow4travis-alarmprovider >& logs/kafkaprovider.log -kubectl -n openwhisk logs -lname=ow4travis-cloudantprovider >& logs/cloudantprovider.log kubectl -n openwhisk logs -lname=ow4travis-kafkaprovider >& logs/kafkaprovider.log kubectl -n openwhisk logs -lname=ow4travis-user-events >& logs/user-events.log kubectl -n openwhisk logs -lname=ow4travis-prometheus >& logs/prometheus.log diff --git a/tools/travis/deploy-chart.sh b/tools/travis/deploy-chart.sh index d7b1c409..9778e518 100755 --- a/tools/travis/deploy-chart.sh +++ b/tools/travis/deploy-chart.sh @@ -247,5 +247,4 @@ jobHealthCheck "ow4travis-install-packages" # Verify that the providers deployed successfully deploymentHealthCheck "ow4travis-alarmprovider" -deploymentHealthCheck "ow4travis-cloudantprovider" deploymentHealthCheck "ow4travis-kafkaprovider"