From 41baa7b6bfc057e0e13ae81d16fdb948567a4434 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Thu, 16 Feb 2017 11:08:47 -0800 Subject: [PATCH] Add fission and fission-function namespaces to template variables Also, update readme. --- charts/fission/README.md | 40 +++++++++++++----------- charts/fission/templates/deployment.yaml | 22 +++++++------ charts/fission/templates/svc.yaml | 4 +-- charts/fission/values.yaml | 6 ++++ 4 files changed, 42 insertions(+), 30 deletions(-) diff --git a/charts/fission/README.md b/charts/fission/README.md index c9a3ce50..95fdf790 100644 --- a/charts/fission/README.md +++ b/charts/fission/README.md @@ -25,31 +25,35 @@ $ helm delete my-release ``` ## Configuration -The following tables lists the configurable parameters of the Fission chart and their default values. -| Parameter | Description | Default | -| ----------------------- | ---------------------------------- | ---------------------------------------------------------- | -| `serviceType` | Type service to use | `LoadBalancer`. If minikube `NodePort` | -| `image` | Fission image repository | `fission/fission-bundle` | -| `imageTag` | Fission image version | `alpha20170124` | -| `controllerPort` | Fission Controller Service Port | `31313` | -| `routerPort` | Fission Router Service Port | `31314` | +The following table lists the configurable parameters of the Fission chart and their default values. + +| Parameter | Description | Default | +|---------------------+--------------------------------------------+--------------------------| +| `serviceType` | Type of service to use | `LoadBalancer`. | +| `image` | Fission image | `fission/fission-bundle` | +| `imageTag` | Fission image tag | `alpha20170124` | +| `controllerPort` | Fission Controller Service Port | `31313` | +| `routerPort` | Fission Router Service Port | `31314` | +| `namespace` | Namespace for Fission deployments/services | `fission` | +| `functionNamespace` | Namespace for Fission functions | `fission-function` | + Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, ```bash -$ helm install --name my-release \ - --set image=custom/fission-bundle,imageTag=v1 \ - fission +$ helm install --name my-release --set image=custom/fission-bundle,imageTag=v1 fission ``` -Default values.yml can also ignored with custom file. +If you're using minikube, set serviceType to NodePort: + +```bash +$ helm install --name my-release --set serviceType=NodePort fission +``` + +You can also set parameters with a yaml file (see values.yaml for +what it should look like): + ```bash $ helm install --name my-release -f values.yaml fission ``` - -For reference check [values.yaml](values.yaml). - - - - diff --git a/charts/fission/templates/deployment.yaml b/charts/fission/templates/deployment.yaml index c5ef45ea..51e1e54c 100644 --- a/charts/fission/templates/deployment.yaml +++ b/charts/fission/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: fission + name: {{ .Values.namespace }} labels: name: fission chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" @@ -10,7 +10,7 @@ metadata: apiVersion: v1 kind: Namespace metadata: - name: fission-function + name: {{ .Values.functionNamespace }} labels: name: fission-function chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" @@ -20,7 +20,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: controller - namespace: fission + namespace: {{ .Values.namespace }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" spec: replicas: 1 template: @@ -39,7 +41,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: router - namespace: fission + namespace: {{ .Values.namespace }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" spec: @@ -60,7 +62,7 @@ apiVersion: v1 kind: Service metadata: name: poolmgr - namespace: fission + namespace: {{ .Values.namespace }} labels: svc: poolmgr chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" @@ -76,7 +78,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: poolmgr - namespace: fission + namespace: {{ .Values.namespace }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" spec: @@ -90,14 +92,14 @@ spec: - name: poolmgr image: "{{ .Values.image }}:{{ .Values.imageTag }}" command: ["/fission-bundle"] - args: ["--poolmgrPort", "8888"] + args: ["--poolmgrPort", "8888", "--namespace", "{{ .Values.functionNamespace }}"] --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: kubewatcher - namespace: fission + namespace: {{ .Values.namespace }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" spec: @@ -118,7 +120,7 @@ apiVersion: v1 kind: Service metadata: name: etcd - namespace: fission + namespace: {{ .Values.namespace }} labels: svc: etcd chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" @@ -134,7 +136,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: etcd - namespace: fission + namespace: {{ .Values.namespace }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" spec: diff --git a/charts/fission/templates/svc.yaml b/charts/fission/templates/svc.yaml index 89019c1d..d42da690 100644 --- a/charts/fission/templates/svc.yaml +++ b/charts/fission/templates/svc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: router - namespace: fission + namespace: {{ .Values.namespace }} labels: svc: router chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" @@ -20,7 +20,7 @@ apiVersion: v1 kind: Service metadata: name: controller - namespace: fission + namespace: {{ .Values.namespace }} labels: svc: controller chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" diff --git a/charts/fission/values.yaml b/charts/fission/values.yaml index 43170a54..2140b711 100644 --- a/charts/fission/values.yaml +++ b/charts/fission/values.yaml @@ -16,3 +16,9 @@ imageTag: alpha20170124 controllerPort: 31313 ## Port at which Fission controller service should be exposed routerPort: 31314 + +## Namespace in which to run fission deployments and services +fissionNamespace: fission + +## Namespace in which to run fission functions +fissionFunctionNamespace: fission-function