You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/09/20 01:17:55 UTC

[GitHub] daisy-ycguo closed pull request #301: travisCI improvements

daisy-ycguo closed pull request #301: travisCI improvements
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/301
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/helm/openwhisk/templates/_readiness.tpl b/helm/openwhisk/templates/_readiness.tpl
index f95752b..ac1c27b 100644
--- a/helm/openwhisk/templates/_readiness.tpl
+++ b/helm/openwhisk/templates/_readiness.tpl
@@ -43,3 +43,14 @@
     value: http://{{ include "controller_host" . }}:{{ .Values.controller.port }}/ping
   command: ["sh", "-c", "result=1; until [ $result -eq 0 ]; do echo 'Checking controller readiness'; wget -T 5 --spider $READINESS_URL; result=$?; sleep 1; done; echo 'Success: controller is ready'"]
 {{- end -}}
+
+{{/* Init container that waits for at least 1 healthy invoker */}}
+{{- define "readiness.waitForHealthyInvoker" -}}
+- name: "wait-for-healthy-invoker"
+  image: "busybox"
+  imagePullPolicy: "IfNotPresent"
+  env:
+  - name: "READINESS_URL"
+    value: "http://{{ include "controller_host" . }}:{{ .Values.controller.port }}/invokers/healthy/count"
+  command: ["sh", "-c", "echo 0 > /tmp/count.txt; while true; do echo 'waiting for healthy invoker'; wget -T 5 -qO /tmp/count.txt --no-check-certificate \"$READINESS_URL\"; NUM_HEALTHY_INVOKERS=$(cat /tmp/count.txt); if [ $NUM_HEALTHY_INVOKERS -gt 0 ]; then echo \"Success: there are $NUM_HEALTHY_INVOKERS healthy invokers\"; break; fi; echo '...not ready yet; sleeping 3 seconds before retry'; sleep 3; done;"]
+{{- end -}}
diff --git a/helm/openwhisk/templates/installCatalogJob.yaml b/helm/openwhisk/templates/installCatalogJob.yaml
index 6db70db..f893ce3 100644
--- a/helm/openwhisk/templates/installCatalogJob.yaml
+++ b/helm/openwhisk/templates/installCatalogJob.yaml
@@ -19,7 +19,7 @@ spec:
           name: install-catalog
       initContainers:
       # Wait for a controller to be up so we can perfom our CRUD actions with the CLI
-{{ include "readiness.waitForController" . | indent 6 }}
+{{ include "readiness.waitForHealthyInvoker" . | indent 6 }}
       containers:
       - name: catalog
         image: {{ .Values.utility.scriptRunnerImage | quote }}
diff --git a/helm/openwhisk/templates/installRouteMgmtJob.yaml b/helm/openwhisk/templates/installRouteMgmtJob.yaml
index 3bb36e8..3126b6b 100644
--- a/helm/openwhisk/templates/installRouteMgmtJob.yaml
+++ b/helm/openwhisk/templates/installRouteMgmtJob.yaml
@@ -19,7 +19,7 @@ spec:
           name: install-routemgmt
       initContainers:
       # Wait for a controller to be up so we can perfom our CRUD actions with the CLI
-{{ include "readiness.waitForController" . | indent 6 }}
+{{ include "readiness.waitForHealthyInvoker" . | indent 6 }}
       containers:
       - name: routemgmt
         image: {{ .Values.utility.scriptRunnerImage | quote }}
diff --git a/tools/travis/build-helm.sh b/tools/travis/build-helm.sh
index e4092f5..79cb2af 100755
--- a/tools/travis/build-helm.sh
+++ b/tools/travis/build-helm.sh
@@ -282,7 +282,7 @@ echo "PASSED! Deployed Kafka provider and package"
 ####
 # now test the installation of Alarm provider
 ####
-helm install helm/openwhisk-providers/charts/ow-alarm --namespace=openwhisk --name alarmp4travis
+helm install helm/openwhisk-providers/charts/ow-alarm --namespace=openwhisk --name alarmp4travis --set alarmprovider.persistence.storageClass=standard
 
 jobHealthCheck "install-package-alarm"
 
@@ -300,7 +300,7 @@ echo "PASSED! Deployed Alarms provider and package"
 ####
 # now test the installation of Cloudant provider
 ####
-helm install helm/openwhisk-providers/charts/ow-cloudant --namespace=openwhisk --name cloudantp4travis
+helm install helm/openwhisk-providers/charts/ow-cloudant --namespace=openwhisk --name cloudantp4travis --set cloudantprovider.persistence.storageClass=standard
 
 jobHealthCheck "install-package-cloudant"
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services