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/04/30 22:17:32 UTC

[GitHub] csantanapr closed pull request #188: Helm chart: install_catalog job now working

csantanapr closed pull request #188: Helm chart: install_catalog job now working
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/188
 
 
   

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/templates/apigateway_deployment.yaml b/helm/templates/apigateway_deployment.yaml
index 913b8e2..d3d5c63 100644
--- a/helm/templates/apigateway_deployment.yaml
+++ b/helm/templates/apigateway_deployment.yaml
@@ -58,3 +58,8 @@ spec:
             value: "127.0.0.1"
           - name: "REDIS_PORT"
             value: "6379"
+          - name: "PUBLIC_GATEWAY_URL"
+            valueFrom:
+              configMapKeyRef:
+                name: whisk.ingress
+                key: apigw_url
diff --git a/helm/templates/cluster_config.yaml b/helm/templates/cluster_config.yaml
new file mode 100644
index 0000000..7c71c7a
--- /dev/null
+++ b/helm/templates/cluster_config.yaml
@@ -0,0 +1,21 @@
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: whisk.ingress
+  namespace: {{ .Release.Namespace | quote }}
+data:
+  api_host: {{ required "A valid api_host is required" .Values.whisk.ingress.api_host }}
+  apigw_url: {{ required "A valid apigw_url is required" .Values.whisk.ingress.apigw_url }}
+
+---
+apiVersion: v1
+kind: Secret
+metadata:
+  name: whisk.auth
+  namespace: {{ .Release.Namespace | quote }}
+type: Opaque
+data:
+  system: {{ .Values.whisk.auth.system | b64enc }}
+  guest: {{ .Values.whisk.auth.guest | b64enc }}
+---
diff --git a/helm/templates/install_catalog_job.yaml b/helm/templates/install_catalog_job.yaml
new file mode 100644
index 0000000..c494f7b
--- /dev/null
+++ b/helm/templates/install_catalog_job.yaml
@@ -0,0 +1,31 @@
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: install-catalog
+  namespace: {{ .Release.Namespace | quote }}
+spec:
+  activeDeadlineSeconds: 600
+  template:
+    metadata:
+      name: install-catalog
+    spec:
+      initContainers:
+      # Wait for a controller to be up so we can perfom our CRUD actions with the CLI
+{{ include "readiness.waitForController" . | indent 6 }}
+      containers:
+      - name: catalog
+        image: openwhisk/kube-openwhisk-catalog
+        env:
+          - name: "WHISK_CLI_VERSION"
+            value: {{ .Values.whisk.versions.cli | quote }}
+          - name: "WHISK_AUTH"
+            valueFrom:
+              secretKeyRef:
+                name: whisk.auth
+                key: system
+          - name: "WHISK_API_HOST_NAME"
+            valueFrom:
+              configMapKeyRef:
+                name: whisk.ingress
+                key: api_host
+      restartPolicy: Never
diff --git a/helm/templates/invoker_daemonset.yaml b/helm/templates/invoker_daemonset.yaml
index 1e5c380..7b34d14 100644
--- a/helm/templates/invoker_daemonset.yaml
+++ b/helm/templates/invoker_daemonset.yaml
@@ -59,7 +59,10 @@ spec:
           - name: "PORT"
             value: "8080"
           - name: "WHISK_API_HOST_NAME"
-            value: "nginx.openwhisk"
+            valueFrom:
+              configMapKeyRef:
+                name: whisk.ingress
+                key: api_host
           - name: "INVOKER_CONTAINER_NETWORK"
             value: "bridge"
           - name: "CONFIG_whisk_docker_containerFactory_useRunc"
diff --git a/helm/values.yaml b/helm/values.yaml
index fa1bb11..7cdb21d 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -2,6 +2,17 @@
 # This is a YAML-formatted file.
 # Declare variables to be passed into your templates.
 
+# cluster configuration
+whisk:
+  # Production deployments _MUST_ override these default auth values
+  auth:
+    system: "789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP"
+    guest: "23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP"
+  versions:
+    cli: "latest"
+  systemNameSpace: "/whisk.system"
+  ingress:
+
 # zookeeper configurations
 zookeeper:
   deploymentName: "zookeeper"
@@ -92,8 +103,6 @@ global:
   controllerReplicaCount: 1
   couchdbUserName: "whisk_admin"
   couchdbPassword: "some_passw0rd"
-  redisServiceName: "redis"
-  redisServicePort: 6379
   # Resolve the pod/node affinity for invoker, controller and other components.
   affinity:
     enabled: true


 

----------------------------------------------------------------
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