Skip to content

Commit

Permalink
Update faas-cli version
Browse files Browse the repository at this point in the history
- updates faas-cli version and also mentions that ./faas-cli
is no longer needed because the binary is available in the PATH

Reported by: Danilo Henrique

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Feb 11, 2019
1 parent 5f80d7b commit 78e278a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/cli/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ You can browse templates from our official store or create your own store and ad

To see what templates are available type `faas-cli template store list` and you should see the following in the terminal:
```
$ ./faas-cli template store list
$ faas-cli template store list
NAME SOURCE DESCRIPTION
csharp openfaas Official C# template
Expand Down
14 changes: 8 additions & 6 deletions docs/reference/cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ spec:
spec:
containers:
- name: faas-cli
image: openfaas/faas-cli:0.7.1
image: openfaas/faas-cli:0.8.3
args:
- /bin/sh
- -c
- echo "verbose" | ./faas-cli invoke nodeinfo -g http://gateway.openfaas:8080
- echo "verbose" | faas-cli invoke nodeinfo -g http://gateway.openfaas:8080
restartPolicy: OnFailure
```
You should also update the `image` to the latest version of the `faas-cli` available found via the [Docker Hub](https://hub.docker.com/r/openfaas/faas-cli/tags/) or [faas-cli releases](https://github.com/openfaas/faas-cli/releases) page.

The important thing to notice is that we are using a Docker container with the `faas-cli` to invoke the function. This keeps the job very generic and easy to generize to other functions.

We schedule the job by applying our manifest
Expand Down Expand Up @@ -157,7 +159,7 @@ In this example, I created the CronJob in the same namespace as the `gateway`. I

If you have enabled basic auth on the gateway, then the invoke command will also need to be updated to first login the cli client. Assuming that you have created the basic auth secret as in the [Helm install guide](https://github.com/openfaas/faas-netes/tree/master/chart/openfaas#secure-the-gateway-administrative-api-and-ui-with-basic-auth)

You could then update the CronJob to login, like this
You could then update the CronJob to login, like this:

```yaml
# nodeauth-cron.yaml
Expand All @@ -177,7 +179,7 @@ spec:
spec:
containers:
- name: faas-cli
image: openfaas/faas-cli:0.7.1
image: openfaas/faas-cli:0.8.3
env:
- name: USERNAME
valueFrom:
Expand All @@ -192,8 +194,8 @@ spec:
args:
- /bin/sh
- -c
- echo -n $PASSWORD | ./faas-cli login -g http://gateway.openfaas:8080 -u $USERNAME --password-stdin
- echo "verbose" | ./faas-cli invoke nodeinfo -g http://gateway.openfaas:8080
- echo -n $PASSWORD | faas-cli login -g http://gateway.openfaas:8080 -u $USERNAME --password-stdin
- echo "verbose" | faas-cli invoke nodeinfo -g http://gateway.openfaas:8080
restartPolicy: OnFailure
```

Expand Down

0 comments on commit 78e278a

Please sign in to comment.