Knative Functions client API and CLI
Go to file
Luke K a0e9fcb11c
remove debug and cleanup
2020-05-25 08:56:46 +00:00
appsody Rename packages 2020-04-27 16:45:46 +02:00
cmd remove debug and cleanup 2020-05-25 08:56:46 +00:00
docker docker-based pusher implementation 2020-04-11 19:43:38 +00:00
k8s moved cluster config notes and yamls to dedicated config repo 2020-04-15 16:57:44 +00:00
kn references to client now faas root package 2020-05-11 00:21:17 +00:00
knative convert to/from kube subdomain encoding for service name in describe 2020-05-11 07:01:25 +00:00
kubectl final url print placeholder 2020-05-23 01:25:12 +00:00
mock flatten package structure 2020-05-10 23:55:04 +00:00
prompt prompt package 2020-05-25 08:42:40 +00:00
testdata add a previously-initialzied test example 2020-05-10 23:55:04 +00:00
.gitignore Initial Commit 2020-03-04 14:36:41 +00:00
README.md Rename packages 2020-04-27 16:45:46 +02:00
client.go final url print placeholder 2020-05-23 01:25:12 +00:00
client_test.go remove defaults to CWD, with name parameter available 2020-05-11 01:40:37 +00:00
client_unit_test.go separate function from client to enable contextless methods such as List 2020-05-11 00:12:19 +00:00
config.go final url print placeholder 2020-05-23 01:25:12 +00:00
function.go expose function derived name for cli default precalculation 2020-05-25 08:44:58 +00:00
function_unit_test.go separate function from client to enable contextless methods such as List 2020-05-11 00:12:19 +00:00
go.mod remove debug and cleanup 2020-05-25 08:56:46 +00:00
go.sum separate function from client to enable contextless methods such as List 2020-05-11 00:12:19 +00:00

README.md

faas

Function as a Service CLI

Setup and Configuration

With Go 1.13+ installed, build and install the binary to your path:

go install

Install dependent binaries:

Configure Boson appsody stack repository:

appsody repo add boson https://github.com/boson-project/stacks/releases/latest/download/boson-index.yaml

Configure Image repository:

Both the image repository and user/org namespace need to be defined either by using the --registry and --namespace flags on the create command, or by configuring as environment variables. For example to configure all images to be pushed to quay.io/alice, use:

export FAAS_REGISTRY=quay.io
export FAAS_NAMESPACE=alice

Cluster connection:

It is expected that kubectl and kn be configured to connect to a kubernetes cluster with the following configuration:

  • Knative Serving and Eventing
  • Knative Domains patched to enable your chosen domain
  • Knative Network patched to enable subdomains
  • Kourier
  • Cert-manager

see https://github.com/boson-project/config for cluster setup and configuration details.

Usage

See help:

faas

Examples

Create a new Service Function:

> mkdir -p example.com/www
> cd example.com/www
> faas create go
https://www.example.com
> curl https://www.example.com
OK