Commit Graph

99 Commits

Author SHA1 Message Date
Lance Ball 49594d9766
feat: add 'kn func emit' command (#332)
This commit adds an Emitter to be used by the CLI commands
for sending CloudEvents to functions, either locally, on
the cluster, or at a specified endpoint.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-13 12:44:11 -04:00
Lance Ball 2b025df199
src!: revert bump to go 1.16 and template changes (#340)
* Revert "src: rename boson import 'fn'"

This reverts commit c0a6f561c0.

* Revert "src: all test dirs set to 0700"

This reverts commit 99f01220c2.

* Revert "src: better error when custom template not found"

This reverts commit 6673395834.

* Revert "src: better errors when custom runtime not found"

This reverts commit a31a6f67a1.

* Revert "build: create separate target for templates.tgz"

This reverts commit 11164bf8d9.

* Revert "src: use consistent separators for fs.FS instances"

This reverts commit 4db07b412f.

* Revert "src: update go event template dependencies"

This reverts commit 3bfc13380f.

* Revert "src: tarfs assumes forward slashes internally"

This reverts commit 6cc0e67b1c.

* Revert "feat: support windows paths in embedded templates FS"

This reverts commit c2b216857b.

* Revert "feat: positive error when runtimme or template unrecognized"

This reverts commit acc56b0900.

* Revert "fix: lint issues"

This reverts commit 895872aee7.

* Revert "ci: go 1.16 compatiblity updates"

This reverts commit 1e3959c045.

* Revert "feat: preserve file modes using in-memory tar FS"

This reverts commit 7dc772ec62.

* Revert "feat: create templates archive on go generate"

This reverts commit 63b7f11471.

* Revert "ci: remove pkger from ci"

This reverts commit 876b0dd0f7.

* Revert "src: remove pkger dependency and tidy"

This reverts commit f006ab1e32.

* Revert "src: remove packaging artifact"

This reverts commit 4d9d0a7b4e.

* Revert "src: remove pkger from make targets"

This reverts commit e44c1ad74c.

* Revert "src: replace pkger with embed.FS"

This reverts commit 38874a4afd.

* Revert "src: update references to deprecated ioutil"

This reverts commit 4025460f73.

* Revert "src: require go 1.16"

This reverts commit 512d4c2580.

* chore: update pkged.go

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-12 14:37:21 -04:00
Luke Kingland f006ab1e32
src: remove pkger dependency and tidy 2021-05-07 14:04:39 +09:00
Luke Kingland 512d4c2580
src: require go 1.16 2021-05-07 14:00:46 +09:00
Matej Vasek 18cb0f4652
src: update knative deps to 0.21.0
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-05 17:20:32 +02:00
Matej Vasek e1a7af50d2
Update pack dependency
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-29 16:47:16 +02:00
Matej Vasek dc2fbee67f
fix: `func deploy` uses Docker API, not binary
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-22 15:18:03 +01:00
Matej Vasek db0945ed3e
fix: `func run` now uses Docker API, not binary
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-15 18:24:57 +01:00
David Simansky 8daa725779
chore: Update Knative dependencies to 0.20 (#273) 2021-03-10 15:10:03 +01:00
Matej Vasek 6d2d8c63b0
feat: using custom docker daemon (e.g podman)
The `func` binary is now aware of DOCKER_HOST environment variable.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-02 04:04:01 +01:00
Zbynek Roubalik a9daa6a1ff
src: remove logrus dependency (#258)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-02-02 15:20:31 +01:00
Matej Vasek c3c21657b2
fix: update pack dependency
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-01 17:03:33 +01:00
David Simansky 6584b0ab9b
chore: Update Knative Client dependencies to 0.19 release (#254) 2021-01-21 17:40:52 +01:00
Zbynek Roubalik a5cbe3061b
src: rename from faas to func (#253)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-01-21 17:10:39 +01:00
David Simansky 7e47377ce4
chore: Update Knative dependencies to 0.18 (#235) 2020-12-07 11:46:31 +01:00
Zbynek Roubalik 29ca07768c
feat: list command - improved output (#205)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-11-04 13:15:06 +01:00
Navid Shaikh 89b9b73d2f
Point knative/client at v0.17.2 (#168)
- This reverts commit cc5435a84b.
 - Points knative/client at v0.17.2
2020-10-12 12:58:22 +02:00
Navid Shaikh cc5435a84b
Carry WithLabel listConfig feat (#165)
from a fork of knative.dev/client
2020-10-12 09:41:34 +02:00
Lance Ball 6d301257f5
chore(templates): bump faas-js-runtime to 0.3.0 and update the name (#150)
* chore(templates): bump faas-js-runtime to 0.3.0 and update the name

The module name lost its @redhat prefix, and bumped a version. This
pulls in that latest dependency.

Running pkger for the first time on a new system also resulted in a
minor version bump for that dependency.


Signed-off-by: Lance Ball <lball@redhat.com>
2020-10-07 17:48:30 -04:00
Matej Vasek d82230353d
feat: fish completion 2020-10-06 15:39:07 +02:00
Roland Huß 5fe70526e5
fix: update to Knative 0.17 (#145)
Also adjusted some dependencies and overwrite version to align
transitive dependencies.

Not sure why buildpack uses such an older docker dependency but that
clases with the docker dependency that is introduced by knative-dev/test-infra
(which is a dependency of the knative direct dependencies)

If there is a way to exclude a transitive dependency like that on test-infra,
this could be the better way to achieve the same result.

The build now works on macOs natively which was not the case before.
2020-10-05 10:28:37 -04:00
Lance Ball 05efee8c83
src: add Long command descriptions for each of the CLI commands (#133)
Uses the Cobra "Long" configuration for each command to provide more
descriptive text.

Example:

```console
faas help create                                                                                                      1.3m  Mon 21 Sep 2020 09:55:40 PM EDT
Create a new Function, including initialization of local files and deployment

Creates a new Function project at 'path'. If 'path' does not exist, it is
created. The function name is the name of the leaf directory at path. After
creating the project, a container image is created and is deployed. This
command wraps 'init', 'build' and 'deploy' all up into one command.

The runtime, trigger, image name, image repository, and namespace may all be
specified as flags on the command line, and will subsequently be the default
values when an image is built or a Function is deployed. If the image name and
image repository are both unspecified, the user will be prompted for a
repository name, and the image name can be inferred from that plus the function
name. The function name, namespace, image name and repository name are all
persisted in the project configuration file .faas.yaml.

Usage:
  faas create <path> [options] [flags]

Flags:
  -c, --confirm             Prompt to confirm all configuration options - $FAAS_CONFIRM
  -h, --help                help for create
  -i, --image string        Optional full image name, in form [registry]/[namespace]/[name]:[tag] for example quay.io/myrepo/project.name:latest (overrides --repository) - $FAAS_IMAGE
  -n, --namespace string    Override namespace into which the Function is deployed (on supported platforms).  Default is to use currently active underlying platform setting - $FAAS_NAMESPACE
  -r, --repository string   Repository for built images, ex 'docker.io/myuser' or just 'myuser'.  Optional if --image provided. - $FAAS_REPOSITORY
  -l, --runtime string      Function runtime language/framework. - $FAAS_RUNTIME (default "go")
      --templates string    Extensible templates path. - $FAAS_TEMPLATES (default "/home/lanceball/.config/faas/templates")
  -t, --trigger string      Function trigger (ex: 'http','events') - $FAAS_TRIGGER (default "http")

Global Flags:
      --config string   config file path (default "~/.faas/config")
  -v, --verbose         print verbose logs
```
2020-09-24 10:23:55 -04:00
Zbynek Roubalik 7e298fd7d7
use go 1.14 (#134)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2020-09-22 12:43:45 -04:00
Matej Vasek 7a648d2d23
chore: update `pack` dep version 2020-09-16 17:27:11 +02:00
Luke K 4918cc7eef
feat: cli usability enhancements and API simplification 2020-08-29 01:54:13 +09:00
Lance Ball ea7fe15376
src(templates/node): update Node.js templates (#68)
This commit updates the Node.js templates to use the latest faas-js-runtime
framework, and fixes a couple of dependency issues and broken tests. I have
also added a build time test for these templates so that if/when they change
again, we can be sure to catch any problems.
2020-08-13 17:05:25 -04:00
Lance Ball 5b4d97a443
feat: add init/build/deploy commands and customizable namespace (#65)
* feat: add init/build/deploy commands and customizable namespace

This commit comprises some fairly large changes in the codebase.
The 'create' command has been extracted into 'init', 'bulid' and
'deploy' commands. The 'create' command remains, but now delegates
most of its work to these other three. This also has resulted in
some rework of the various flags. 

In addition, it is now possible to specify the cluster namespace to
which the function will be deployed.
2020-08-12 10:52:50 -04:00
Luke K 811d09ae01
v0.5.0 2020-07-31 13:48:08 +00:00
Lance Ball 0810d9ace4
actions: add CHANGELOG.md and a release target to Makefile (#45)
This commit adds a `release` target to the Makefile, simplifying the generation
of the CHANGELOG.md (oh, this commit also adds a CHANGELOG.md). Invoke the
make target like so.

```sh
make release VTAG=v0.4.1
```

This will update the CHANGELOG with the commits included since the last
release, commit that change, and create the version tag. Then you just need
to push to github in order to publish the binary.
2020-07-28 09:14:45 -04:00
Luke K 7b0e59248d
Merge remote-tracking branch 'matej/imprv-deploy' into develop 2020-07-08 01:59:46 +00:00
Luke K 7b2f623de0
Merge remote-tracking branch 'matej/imrv-remove' into develop 2020-07-08 01:57:16 +00:00
Luke K 95db3bd133
Merge remote-tracking branch 'lkingland/templates' into develop 2020-07-08 01:52:57 +00:00
Matej Vasek 8610218159 fix: remove dependency on `kubectl` binary 2020-07-01 18:21:19 +02:00
Matej Vasek d503a73680 fix: remove dependency on `kn` binary 2020-07-01 17:02:19 +02:00
Matej Vasek 22c60c7379 feat: remove dependency on `kn` binary 2020-06-16 21:13:39 +02:00
Luke K 1603a33046
add homedir module dependency for cross-compilation with Darwin 2020-06-11 12:25:36 +00:00
Luke K 9d30d9c72a
staticly embedded templates 2020-06-11 12:24:35 +00:00
Matej Vasek 5e8dc8b5f7
feat: buildpacks
Implemented builder using buildpack.
2020-06-08 18:38:55 +02:00
Luke K a0e9fcb11c
remove debug and cleanup 2020-05-25 08:56:46 +00:00
Luke K a6c10fdaa8
separate function from client to enable contextless methods such as List 2020-05-11 00:12:19 +00:00
Matej Vasek 380cc2f3ef feat: 'describe' sub-command for faas cli 2020-05-05 01:13:48 +02:00
Matej Vasek 09cb2d5425 Rename packages
Needed since the project has been moved.
2020-04-27 16:45:46 +02:00
lkingland 3224123222
Pull list into client library
* pull list into client library

* fix list formatting
2020-04-27 16:03:29 +02:00
Matej Vasek 08c986011a feat: list sub-command for faas cli 2020-04-23 16:29:33 +02:00
Luke K c0f0d34786
Support user-defined service name, persisted via config. 2020-04-23 10:31:21 +00:00
Luke K 132ce75dda
service removal impl with directory state prereq checks on create 2020-04-12 17:59:08 +00:00
Luke K 3b0531cf70
dependencies update 2020-04-11 19:45:29 +00:00
Luke K 0cc1788254
initial local create implementation using appsody delegate 2020-03-22 13:30:25 +00:00
Luke K 86cdedec91
Initial Commit 2020-03-04 14:36:41 +00:00