53 Commits

Author SHA1 Message Date
Alex Ellis (OpenFaaS Ltd)
a2254ca1ff Security fix - containerd to 1.7.27
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2025-03-18 10:25:34 +00:00
Alex Ellis (OpenFaaS Ltd)
1c1bfa6759 Upgrades to containerd, fix deprecations upstream
* Fixes upstream deprecations for containerd
* Fixes deprecations in ioutil package usage
* Break out separate files for function handlers
* Upgrades containerd to 1.7.22
* Fixes default namespace functionality
* Pre-deploy checks as per license agreement
* Removes extra log messages for payload in HTTP handlers, you
can enable FAAS_DEBUG=1 in the CLI instead to see this from
the client's perspective
* Add additional Google DNS server 8.8.4.4 for functions

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2024-09-17 11:13:53 +01:00
Alex Ellis (OpenFaaS Ltd)
e4848cd829 Remove armhf/armv7 support from faasd
See notes in: #364

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2024-06-12 10:19:41 +01:00
Alex Ellis (OpenFaaS Ltd)
1412faffd2 Add Makefile target for updating images
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2023-10-23 11:04:48 +01:00
Alex Ellis (OpenFaaS Ltd)
57baf34f5a Add support for namespace mutations
Adds support for: Get, Create, Update, Delete

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2023-07-07 13:45:36 +01:00
Alex Ellis (OpenFaaS Ltd)
c41c2cd9fc Migrate to containerd v1.7.0 and update dependencies
* Updates containerd to v1.7.0 and new binary for 32-bit
Arm OSes.
* Updates Go dependencies - openfaas and external

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2023-03-20 08:40:57 +00:00
Nitishkumar Singh
87773fd167 Verify docker-compose images
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>

Match all yaml files

Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>

feedback changes

Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
2022-10-23 08:18:46 +01:00
Alex Ellis (OpenFaaS Ltd)
6b6ff71c29 Update to containerd 1.6.8
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-08-18 12:15:33 +01:00
Alex Ellis (OpenFaaS Ltd)
02e9b9961b Migrate to containerd v1.6.4
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-05-25 12:49:58 +01:00
Alex Ellis (OpenFaaS Ltd)
4ecc215a70 Fix containerd download in Makefile
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-04-10 18:45:42 +01:00
Alex Ellis (OpenFaaS Ltd)
912ac265f4 Upgrade containerd to 1.6.2 and CNI to 0.9.1
Upgrades containerd, and switches to the official 64-bit ARM
binary.

Continues to use my binary for 32-bit arm hosts.

CNI upgraded to v0.9.1

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-04-10 18:45:42 +01:00
Alex Ellis (OpenFaaS Ltd)
12ada59bf1 Update to containerd v1.5.4
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-07-27 10:30:12 +01:00
Alex Ellis (OpenFaaS Ltd)
abb62aedc2 Remove log grep to make CI pass
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-02-06 15:07:40 +00:00
Alex Ellis (OpenFaaS Ltd)
2533c065bf Add user support for custom containers
Custom containers in the compose file can have a directory
mounted to store state for things like a database. This requires
a specific user since influxdb/postgresql and other containers
create folders and update permissions on start-up.

Tested with influxdb on Ubuntu with userid 1000, which failed
before the change.

Adds a grace period in the e2e tests.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-01-04 09:55:37 +00:00
Alex Ellis (OpenFaaS Ltd)
ecee5d6eed Fix publish Makefile target
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-12-07 14:31:17 +00:00
Alex Ellis (OpenFaaS Ltd)
bc859e595f Fix build for release tags
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-11-14 10:55:51 +00:00
Akos Veres
1862c0e1f5 Various fixes to make the github actions workflow pass
Signed-off-by: Akos Veres <veres@akos.me>
2020-11-06 15:29:48 +00:00
Alex Ellis (OpenFaaS Ltd)
2248a8a071 Move hashgen into Makefile
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-10-22 22:31:53 +01:00
Alex Ellis (OpenFaaS Ltd)
7ca531a8b5 Update to use Go modules
Fixes: #109

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-09-21 09:02:08 +01:00
Alex Ellis (OpenFaaS Ltd)
26debca616 Print version and reduce verbosity
* revendor k3sup to prevent arch / OS from being printed in
the logs
* print version on startup
* bump minor CNI and containerd version for e2e tests
* revendor faas-provider for latest log printing update

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-06-08 09:43:51 +01:00
Alex Ellis (OpenFaaS Ltd)
e33a60862d Fix vulnerability in authenticated secrets API
This patch fixes a vulnerability in the secrets API, however
it is important to stress that the user must be authenticated
as the admin user on the REST API before they can attempt this.

Reported by Appsecco via email. @lucasroesler, Appsecco and
myself believe this to be of low severity.

The fix prevents directory traversal characters from being
used in secret names. If a secret name such as:
../../root/.ssh/authorized_keys were to be used, an attacker
could remove the value and write their own.

Tested with unit tests and tests are now made to run
via the CI and a new Makefile target.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-04-29 12:23:01 +01:00
Lucas Roesler
cece6cf1ef Improve journalctl version compat
**What**
- Remove the `output-fields` flag because not all journalctl versions
  support it
- Add a short sleep to the start of the log stream to avoid some kind of
  race/buffering condition with the Handler

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2020-03-07 10:11:09 +00:00
Lucas Roesler
22882e2643 Initial journald log provider attempt
**What**
- journald log provider using exec to journalctl
```
journalctl -t <namespace>:<name>  --output=json --since=<timestamp> <--follow> --output-fields=SYSLOG_IDENTIFIER,MESSAGE,_PID,_SOURCE_REALTIME_TIMESTAMP
```
- This can be tested manually using `faas-cli logs` as normal, e.g.
  `faas-cli logs nodeinfo` should tail the last 5 mins of logs.
- Very basic tests ensuring that the `journalctl` comamand is correctly
  construction and that the json log entrys are parsed correctly.
- Add simple e2e test to grep the function logs

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2020-03-07 10:11:09 +00:00
kaderno
a0110b3019 Makefile: added labels to test-e2e
Signed-off-by: kadern0 <kaderno@gmail.com>
2020-02-27 21:56:43 +00:00
Alex Ellis (OpenFaaS Ltd)
02c9dcf74d Increase e2e sleep
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-02-06 09:53:45 +00:00
Alex Ellis (OpenFaaS Ltd)
592f3d3cc0 Move to openfaas org
Closes: #36

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-02-06 09:36:18 +00:00
Alex Ellis (OpenFaaS Ltd)
df2de7ee5c Add cloud-config for use with multipass.run / VMs
Also removes netns from the CI

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-26 12:01:55 +00:00
Alex Ellis (OpenFaaS Ltd)
c133b9c4ab Switch data directory to /var/lib/faasd
Fix: #26

Tested e2e on Ubuntu with `x86_64`

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-22 16:46:26 +00:00
Alex Ellis (OpenFaaS Ltd)
bacf8ebad5 Move faas-containerd to faasd-provider unit file
The new unit file runs the merged faasd binary and the provider
command. The install script also prints out a sample login
command to make it easier to use the faas-cli.

Travis / CI has been updated to run the new steps in the e2e
tests.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-21 13:43:39 +00:00
Carlos de Paula
95e278b29a Port networking to CNI
Replaced netns utility with CNI plugins to create a bridge network
and allow communication between containers with firewall plugin.

Overwrite the CNI config in case it exists. Allow updating the config
on new versions.

Signed-off-by: Carlos de Paula <me@carlosedp.com>
2020-01-10 18:30:43 +00:00
Alex Ellis (OpenFaaS Ltd)
24e065965f Update path for secrets for e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-05 12:00:43 +00:00
Alex Ellis (OpenFaaS Ltd)
fd2ee55f9f Update e2e tests for secrets folder
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-05 12:00:43 +00:00
Alex Ellis (OpenFaaS Ltd)
4b93ccba3f Debug statement for CI
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-05 08:56:29 +00:00
Alex Ellis (OpenFaaS Ltd)
06890cddb9 Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 19:41:04 +00:00
Alex Ellis (OpenFaaS Ltd)
40da0a35c3 Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 19:35:01 +00:00
Alex Ellis (OpenFaaS Ltd)
0c0d05b2ea Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 19:12:10 +00:00
Alex Ellis (OpenFaaS Ltd)
af46f34003 Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 19:05:17 +00:00
Alex Ellis (OpenFaaS Ltd)
1f56c39675 Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:53:03 +00:00
Alex Ellis (OpenFaaS Ltd)
7152b170bb Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:47:25 +00:00
Alex Ellis (OpenFaaS Ltd)
47955954eb Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:43:46 +00:00
Alex Ellis (OpenFaaS Ltd)
7f672f006a Tweak e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:29:46 +00:00
Alex Ellis (OpenFaaS Ltd)
20ec76bf74 Run faasd from usr local bin
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:25:27 +00:00
Alex Ellis (OpenFaaS Ltd)
04d1688bfb Repurpose dist binary for e2e test
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:21:48 +00:00
Alex Ellis (OpenFaaS Ltd)
a8f514f7d6 Show pwd in prepare-test step
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:13:12 +00:00
Alex Ellis (OpenFaaS Ltd)
502d3fdecc Show working dir
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:10:44 +00:00
Alex Ellis (OpenFaaS Ltd)
5d098c9cb7 Invoke async in e2e tests
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:06:31 +00:00
Alex Ellis (OpenFaaS Ltd)
0935dc6867 Use GOPATH from env
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:04:24 +00:00
Alex Ellis (OpenFaaS Ltd)
e77d05ec94 Test e2e
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 18:02:28 +00:00
Alex Ellis (OpenFaaS Ltd)
7ab69b5317 Add e2e test prep
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-03 17:59:11 +00:00
Alex Ellis (OpenFaaS Ltd)
300d8b082a Pass version from main
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-12-31 12:30:14 +00:00