40 Commits

Author SHA1 Message Date
Alex Ellis (OpenFaaS Ltd)
b87b96ae45 Migrate to Go 1.18 and update dependencies
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-08-05 09:03:31 +01:00
Alex Ellis (OpenFaaS Ltd)
88eea5f62e Feature for probing functions
Introduces a single-flight call to a function's health
endpoint to verify that it is registered with an Istio
sidecar (Envoy) before letting the invocation through.

Results are cached for 5 seconds, before a probe is
required again.

Tested without Istio, with probe_functions environment
variable set to true, I saw a probe execute in the logs.

Fixes: #1721 for Istio users.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-07-07 10:35:07 +01:00
Hilário Coelho
a530b9dd63 update prometheus client golang
update docker/distribution lib

Signed-off-by: Hilário Coelho <hilario.coelho@securityside.com>
2022-05-06 17:40:00 +01:00
Alex Ellis (OpenFaaS Ltd)
d85d5e7239 Export new metrics for OpenFaaS Pro scaling
* Add service target metric
* Add service min replicas metric
* Add scale type metric

These combined allow new auto-scaling modes and parameters
for OpenFaaS Pro customers.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-01-24 14:30:08 +00:00
Alex Ellis (OpenFaaS Ltd)
58394bb1de Migrate away from queue type in faas project
The queue type now resides in the provider, so that there is
no risk of a circular reference.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-07-26 17:31:09 +01:00
Alex Ellis (OpenFaaS Ltd)
06a51373e2 Upgrade NATS client
For compatibility with newer NATS streaming version

https://github.com/openfaas/faas-netes/pull/819

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-07-26 17:31:09 +01:00
Alex Ellis (OpenFaaS Ltd)
a6dbb4cd02 Update faas-provider to include new field
Includes CreatedAt

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-03-11 21:06:33 +00:00
Alex Ellis (OpenFaaS Ltd)
7ce266adc0 Migrate to Go modules
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-01-21 19:04:22 +00:00
Alex Ellis (OpenFaaS Ltd)
2bfca6d848 Publish to multiple topics
Enables publishing to various topics according to annotations
on the functions. The function cache is moved up one level so
that it can be shared between the scale from zero code and the
queue proxy.

Unit tests added for new internal methods.

Tested e2e with arkade and the newest queue-worker and RC
gateway image with two queues and an annotation on one of the
functions of com.openfaas.queue. It worked as expected including
with multiple namespace support.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-04-22 15:26:42 +01:00
Alex Ellis (OpenFaaS Ltd)
9bde25aedb Bump queue-worker and NATS
NATS moved its primary library to: github.com/nats-io/stan.go

This commit synchronises the library in the gateway to match the
queue worker.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-04-22 10:14:01 +01:00
Alex Ellis (OpenFaaS Ltd)
96812d2cd8 Record metrics for invocations when they start
* This experimental patch records metrics as invocations start
so that the metrics can be used to make better scale to zero
decisions in faas-idler.

Tested with Kubernetes on a single-node cluster, metrics
reported as expected. Existing metrics still report.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-03-12 13:51:43 +00:00
Bruno Miguel Custódio
03dc8824d2 Support customising the NATS Streaming channel.
Signed-off-by: Bruno Miguel Custódio <brunomcustodio@gmail.com>
2019-12-10 11:15:52 +00:00
Bruno Miguel Custódio
365f459b3f Allow for customizing the name of the target NATS Streaming cluster.
Signed-off-by: Bruno Miguel Custódio <brunomcustodio@gmail.com>
2019-11-25 10:52:39 +00:00
Alex Ellis (OpenFaaS Ltd)
040819b41c Bump faas-provider to 0.12.0
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-10-19 10:51:24 +01:00
Karthick Prabu
1c9e122370 Updated basic auth plugin faas provider
Signed-off-by: Karthick Prabu <karthikprabu.cs@gmail.com>
2019-10-15 22:25:26 +01:00
Alex Ellis (OpenFaaS Ltd)
d6cf72bb39 Update/delete vendor files
Refreshed / updated vendor dependencies

Tested with "make".

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-10-08 08:16:08 +01:00
Lucas Roesler
f62bcb0736 Add blog post about CICD with github actions
**What**
- Add blog post to lucasroesler.com about CI/CD with Github Actions

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-10-06 22:25:33 +01:00
Alex Ellis (OpenFaaS Ltd)
137b63e61f Add namespaces endpoint
This is being added because multiple namespaces can now be used
on Kubernetes. By listing namespaces, a client such as the UI
or CLI can then enumerate the namespaces to find functions
which may span across more than one namespace.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-09-21 18:07:38 +01:00
Alex Ellis (OpenFaaS Ltd)
0a90125aba Allow dot in function name
This patch enables the use-case for multiple namepsaces by
allowing a dot to be used in the function name.

dep has been run to update OpenFaaS projects and also to
prune unused files.

Tested by doing a build.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-09-20 11:23:57 +01:00
Alex Ellis
14677e0b9a Update alpine shipping versions
Alpine 3.10 is now availabe and is no-harm update.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-08-21 07:40:51 +01:00
Alex Ellis (OpenFaaS Ltd)
df97efafae Migrate away from requests package for Function structs
The function deployment and status structs have been moved away
into the faas-provider package.

Tested with a build, running tests, and CI.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-08-05 12:58:30 +01:00
Lucas Roesler
d8a5952cfe Upgrade faas-provider to 0.9.2
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2019-07-06 10:42:46 +01:00
Alex Ellis
701708fe0e Update faas-provider version
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-08 10:16:30 +01:00
Alex Ellis
c394b09ae6 Bump to nats-queue-worker 0.7.0
Includes fix for reconnection bug to NATS Streaming

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-02-12 17:46:00 +00:00
Alex Ellis (VMware)
b4a550327d Re-vendor queue-worker publisher for reconnect
- re-vendor queue-worker for publisher via 0.6.0
- bump queue-worker version to 0.6.0 in docker-compose.yml for
AMD64
- use new naming for NATS of nats -> NATS in variables where
required
- add default reconnect of 60 times, 2 seconds apart.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2019-01-29 15:15:48 +00:00
Alex Ellis (VMware)
e9cf708cb5 Bump Prometheus client version
- updates the Prometheus go client version and switches to the
promhttp handler to avoid conflicts with the new system-level
metrics.

Tested with Docker Swarm locally - no conflicts and new metrics
were gathered.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2019-01-24 09:12:46 +00:00
Lucas Roesler
c9befd78e7 Bump gorilla mux to 1.6.2
**What**
- Update the gopkg.toml

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-12-29 19:34:21 +00:00
Alex Ellis (VMware)
6937bc4d7f Move to auth package in faas-provider
The basic-auth middleware and credentials-loading code has been
moved into the faas-provider project. This has now been brought
back into the faas project via vendoring.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-06 16:14:53 +01:00
Edward Wilde
e39dbd9584 Update nats-queue-worker package to 0.4.7
This package version supports running OpenFaas on hosts the contain `.`
in their hostname i.e. computer-a.acme.com

Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-06-21 23:00:01 +01:00
Alex Ellis (VMware)
223c561706 Vendor new queue-worker version
Introduces 0.4.6 of queue-worker - see upstream repo for changes.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-06-18 20:10:46 +01:00
Ivana Yovcheva (VMware)
7f6295c9cf Update alpine version to 3.7
This updates alpine version to 3.7 in sample-functions, gateway
and some markdown docas.

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-05-11 14:14:59 +01:00
Alex Ellis
f954bf0733 Merge master into breakout_swarm
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2018-02-01 09:29:54 +00:00
Lucas Roesler
5dce1deb21 Add advanced secret management
**What**
- Add the ability to specify secrets as a csv
- Vendor the docker/cli/opts
- Update the guide for secrets to use the `faas-cli`

**Why**
- Allowing the csv specification of secrets gives users more control about how
those secrets are mounted into the container.  This is good for things like
key rotation and for developers that are building on top of OpenFaaS.

Signed-off-by: Lucas Roesler <lucas.roesler@gmail.com>
2017-12-16 16:08:52 +00:00
Alex Ellis
62a5cfc385 Bump queue worker for alexellis->openfaas org naming
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-23 13:02:16 +00:00
Alex Ellis
5bac6c1961 Bump for nats producer change
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-23 12:57:02 +00:00
Alex Ellis
b17838ce51 Add Swarm limits
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-15 08:42:00 +00:00
John McCabe
89878f0c8a Migrate from alexellis org to openfaas
Note, not all `alexellis/github` references should be changed, there are
a number of repos which are not part of the openfaas org, this commit
excludes those.

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-10-04 09:18:06 +01:00
Alex Ellis
bd146f526c Sync async_nats work with master
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-08-29 19:40:08 +01:00
Alex Ellis
283d311b08 Update vendoring via vndr 2017-07-12 20:30:56 +01:00
Alex Ellis
78af82021f Vendoring with Glide and delete function handler 2017-04-27 09:29:14 +01:00