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/07/13 20:41:17 UTC

[incubator-openwhisk-deploy-kube] branch master updated: Improvement in default chart values and make #251 work by just pulling the chart (#254)

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 81792fe  Improvement in default chart values and make #251 work by just pulling the chart (#254)
81792fe is described below

commit 81792fef9feeb7fc0973ca7af35cd6a0f56bfbae
Author: Carlos Duque <cd...@gmail.com>
AuthorDate: Fri Jul 13 21:41:14 2018 +0100

    Improvement in default chart values and make #251 work by just pulling the chart (#254)
    
    * Changed ingress.yaml to be used in a generic way that instead of specific for ibm ingress
    * updated default image pull policy to always for images using the lastest release tag
    * updated gitignore to ignore myruntimes.json and.DS_Store
---
 .gitignore                            |  2 ++
 helm/openwhisk/templates/_helpers.tpl |  6 +++++
 helm/openwhisk/templates/ingress.yaml | 48 ++++++++++++++++++-----------------
 helm/openwhisk/values.yaml            |  8 +++---
 4 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/.gitignore b/.gitignore
index 26940cf..097f99e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
 kubernetes/nginx/certs
 helm/mycluster.yaml
 mycluster.yaml
+myruntimes.json
+.DS_Store
 *~
diff --git a/helm/openwhisk/templates/_helpers.tpl b/helm/openwhisk/templates/_helpers.tpl
index d950380..49279a8 100644
--- a/helm/openwhisk/templates/_helpers.tpl
+++ b/helm/openwhisk/templates/_helpers.tpl
@@ -92,3 +92,9 @@
       name: db.config
       key: db_whisk_auths
 {{- end -}}
+
+
+{{/* tlssecretname for ingress */}}
+{{- define "tls_secret_name" -}}
+{{ .Values.whisk.ingress.tlssecretname | default "ow-ingress-tls-secret" | quote }}
+{{- end -}}
\ No newline at end of file
diff --git a/helm/openwhisk/templates/ingress.yaml b/helm/openwhisk/templates/ingress.yaml
index bb3fc6c..9145f30 100644
--- a/helm/openwhisk/templates/ingress.yaml
+++ b/helm/openwhisk/templates/ingress.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.
 
-{{- if eq .Values.whisk.ingress.type "ibm.standard" }}
+{{- if eq .Values.whisk.ingress.type "standard" }}
 ---
 apiVersion: extensions/v1beta1
 kind: Ingress
@@ -9,32 +9,20 @@ metadata:
   name: {{ .Values.whisk.ingress.name | quote }}
   namespace: {{ .Release.Namespace | quote }}
   annotations:
-    # A blocking request is held open by the controller for slightly more than 60 seconds
-    # before it is responded to with HTTP status code 202 (accepted) and closed.
-    # Set to 75s to be on the safe side.
-    # See https://console.bluemix.net/docs/containers/cs_annotations.html#proxy-connect-timeout
-    # See http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout
-    ingress.bluemix.net/proxy-read-timeout: "75s"
-
-    # Allow up to 50 MiB body size to support creation of large actions and large
-    # parameter sizes.
-    # See https://console.bluemix.net/docs/containers/cs_annotations.html#client-max-body-size
-    # See http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
-    ingress.bluemix.net/client-max-body-size: "size=50m"
-
-    # Add the request_id, generated by nginx, to the request against the controllers. This id will be used as tid there.
-    # https://console.bluemix.net/docs/containers/cs_annotations.html#proxy-add-headers
-    ingress.bluemix.net/proxy-add-headers: |
-      serviceName=controller {
-        'X-Request-ID' $request_id;
-      }
+    {{- range $key, $value := .Values.whisk.ingress.annotations }}
+      {{ $key }}: {{ $value | quote }}
+    {{- end }}
 spec:
+  {{- if .Values.whisk.ingress.tls.enabled }}
   tls:
   - hosts:
-    - {{ .Values.whisk.ingress.ibmdomain }}
-    secretName: {{ .Values.whisk.ingress.ibmtlssecret }}
+    - {{ .Values.whisk.ingress.domain }}
+    {{- if .Values.whisk.ingress.tls.secretenabled }}
+    secretName: {{ .Values.whisk.ingress.tls.secretname | quote }}
+    {{- end }}
+  {{- end }}
   rules:
-  - host: {{ .Values.whisk.ingress.ibmdomain }}
+  - host: {{ .Values.whisk.ingress.domain }}
     http:
       paths:
       - path: /api/v1/web
@@ -64,4 +52,18 @@ spec:
         backend:
           serviceName: nginx
           servicePort: http
+
+{{- if .Values.whisk.ingress.tls.createsecret }}
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ .Values.whisk.ingress.tls.secretname | quote }}
+  namespace: {{ .Release.Namespace | quote }}
+type: {{ .Values.whisk.ingress.tls.secrettype | quote }}
+data:
+  tls.crt: {{ .Values.whisk.ingress.tls.crt }}
+  tls.key: {{ .Values.whisk.ingress.tls.key }}
+{{- end}}
+
 {{- end }}
diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml
index 5a71a4f..b3ee424 100644
--- a/helm/openwhisk/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -95,7 +95,7 @@ db:
   image: "openwhisk/kube-couchdb:latest"
   # NOTE: setting replicaCount > 1 will not work.
   replicaCount: 1
-  imagePullPolicy: "IfNotPresent"
+  imagePullPolicy: "Always"
   restartPolicy: "Always"
   host: nil
   port: 5984
@@ -133,7 +133,7 @@ controller:
   name: "controller"
   image: "openwhisk/controller:latest"
   replicaCount: 1
-  imagePullPolicy: "IfNotPresent"
+  imagePullPolicy: "Always"
   restartPolicy: "Always"
   port: 8080
   options: ""
@@ -150,7 +150,7 @@ controller:
 invoker:
   name: "invoker"
   image: "openwhisk/invoker:latest"
-  imagePullPolicy: "IfNotPresent"
+  imagePullPolicy: "Always"
   restartPolicy: "Always"
   port: 8080
   pullRuntimesImage: "openwhisk/kube-docker-pull:latest"
@@ -179,7 +179,7 @@ apigw:
   image: "openwhisk/apigateway:latest"
   # NOTE: setting replicaCount > 1 is not tested and may not work
   replicaCount: 1
-  imagePullPolicy: "IfNotPresent"
+  imagePullPolicy: "Always"
   restartPolicy: "Always"
   apiPort: 9000
   mgmtPort: 8080