forked from openfaas/faas-netes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add owners change {[ template “openfaas.name” . }} ito {{ template “faas-netesd.name” }} update _helpers.tpl Signed-off-by: Rimas Mocevicius <[email protected]>
- Loading branch information
Showing
18 changed files
with
146 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
description: Enable Kubernetes as a backend for OpenFaaS (Functions as a Service) | ||
name: openfaas | ||
version: 1.0.1 | ||
sources: | ||
- https://github.com/openfaas/faas | ||
- https://github.com/openfaas/faas-netes | ||
home: https://www.openfaas.com | ||
icon: https://raw.githubusercontent.com/openfaas/media/master/OpenFaaS_logo_stacked_opaque.png | ||
keywords: | ||
- functions | ||
- service | ||
maintainers: | ||
- name: alexellis | ||
email: [email protected] | ||
- name: rimusz | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
approvers: | ||
- alexellis | ||
- rimusz | ||
- LucasRoesler | ||
reviewers: | ||
- alexellis | ||
- rimusz | ||
- LucasRoesler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# OpenFaaS - Serverless Functions Made Simple | ||
|
||
 | ||
|
||
[OpenFaaS](https://github.com/openfaas/faas) (Functions as a Service) is a framework for building serverless functions with Docker and Kubernetes which has first class support for metrics. Any process can be packaged as a function enabling you to consume a range of web events without repetitive boiler-plate coding. | ||
|
||
**Highlights** | ||
|
||
* Ease of use through UI portal and *one-click* install | ||
* Write functions in any language for Linux or Windows and package in Docker/OCI image format | ||
* Portable - runs on existing hardware or public/private cloud - [Kubernetes](https://github.com/openfaas/faas-netes) and Docker Swarm native | ||
* [CLI](https://github.com/openfaas/faas-cli) available with YAML format for templating and defining functions | ||
* Auto-scales as demand increases | ||
|
||
## Deploy OpenFaaS | ||
|
||
**Note:** You must also pass `--set rbac=false` if your cluster is not configured with role-based access control. For further information, see [here](https://kubernetes.io/docs/admin/authorization/rbac/). | ||
|
||
--- | ||
|
||
To use defaults including the `default` Kubernetes namespace (recommended) | ||
|
||
``` | ||
$ helm upgrade --install --debug --reset-values --set async=false openfaas openfaas/ | ||
``` | ||
|
||
Optional: you can also a separate namespace for functions: | ||
|
||
``` | ||
$ kubectl create ns openfaas | ||
$ kubectl create ns openfaas-fn | ||
$ helm upgrade --install --debug --namespace openfaas \ | ||
--reset-values --set async=false --set functionNamespace=openfaas-fn openfaas openfaas/ | ||
``` | ||
|
||
If you would like to enable asynchronous functions then use `--set async=true`. You can read more about asynchronous functions in the [OpenFaaS guides](https://github.com/openfaas/faas/tree/master/guide). | ||
|
||
By default you will have NodePorts available for each service such as the API gateway and Prometheus | ||
|
||
### Deploy with an IngressController | ||
|
||
In order to make use of automatic ingress settings you will need an IngressController in your cluster such as Traefik or Nginx. | ||
|
||
Add `--set ingress.enabled` to enable ingress: | ||
|
||
``` | ||
$ helm upgrade --install --debug --reset-values --set async=false --set ingress.enabled=true openfaas openfaas/ | ||
``` | ||
|
||
By default services will be exposed with following hostnames (can be changed, see values.yaml for details): | ||
* `faas-netesd.openfaas.local` | ||
* `gateway.openfaas.local` | ||
* `prometheus.openfaas.local` | ||
* `alertmanager.openfaas.local` | ||
|
||
### Additional OpenFaaS options: | ||
|
||
* `functionNamespace=defaults` - to the deployed namespace, kube namespace to create function deployments in | ||
* `async=true/false` - defaults to false, deploy nats if true | ||
* `armhf=true/false` - defaults to false, use arm images if true (missing images for async) | ||
* `exposeServices=true/false` - defaults to true, will always create `ClusterIP` services, and expose `NodePorts/LoadBalancer` if true (based on serviceType) | ||
* `serviceType=NodePort/LoadBalancer` - defaults to NodePort, type of external service to use when exposeServices is set to true | ||
* `rbac=true/false` - defaults to true, if true create roles | ||
* `ingress.enabled=true/false` - defaults to false, set to true to create ingress resources. See openfaas/values.yaml for detailed Ingress configuration. | ||
|
||
### Removing the OpenFaaS | ||
|
||
All control plane components can be cleaned up with helm with: | ||
|
||
``` | ||
$ helm delete --purge openfaas | ||
``` | ||
|
||
Individual functions will need to be either deleted before deleting the chart with `faas-cli` or manually deleted using `kubectl delete`. |
2 changes: 1 addition & 1 deletion
2
openfaas/templates/NOTES.txt → chart/openfaas/templates/NOTES.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
To verify that openfaas has started, run: | ||
|
||
kubectl --namespace={{ .Release.Namespace }} get deployments -l "release={{ .Release.Name }}, app={{ template "faas-netesd.name" . }}" | ||
kubectl --namespace={{ .Release.Namespace }} get deployments -l "release={{ .Release.Name }}, app={{ template "openfaas.name" . }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "openfaas.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "openfaas.fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
openfaas/values.yaml → chart/openfaas/values.yaml
100755 → 100644
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.