* 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>
The scale and delete endpoints no-longer accept namespace
via the query string, but through the body.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Test case included for default and non-default
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Changed Fake Labeller Implementation
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
* Inlines the namespace check for valid faasd namespaces
* Creates a const for the namespace label applied to faasd
namespaces
Tested with go build and go test.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit adds the checks that the namespace supplied by the user has
the `openfaas=true` label. Without this check the user can
deploy/update/read functions in any namespace using the CLI.
The UI is not effected because it calls the listnamesaces endpoint,
which has the check for the label
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Included Test cases for utils
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Multi namespace handling in invoke
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
List Namespaces capability included
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
remove faasd namespace from list result
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Create Secret Folder Path
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Filter only namespaces with openfass label
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Include Testcase for utility function
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
move default function secets to openfaas-fn namespace secrets
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
Corrected issue with secret moving
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
This patch reports stopped tasks as having zero scale, which
means the gateway will send a "scale up" request, the same
way as it does for paused containers, or those which have
no task due to a reboot of the machine.
The scale up logic will now delete the stopped task and
recreate the task.
Tested with nodeinfo and figlet on a Dell XPS with
Ubuntu 16.04. The scaling logic has been re-written, but
re-tested by manually pausing and manually removing
the task of a container.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
**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>
This patch completes part of the work in #20 by porting the code
for faas-containerd in-tree. When tested, I was able to deploy
and then remove figlet from the store on `x86_64`.
In a follow-up PR, duplication will be removed where possible
and consolidated with updated documentation.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>