* feat: embed tkn tasks in func binary
Embed Tekton tasks for direct on cluster build.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* feat: embed tkn tasks in func binary
Embed Tekton tasks for PaC build.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* feat: added tkn-tasks sub-command
This new command prints tektons tasks in form of multi-document yaml,
these tekton tasks may requird to be installed for some advanced
functionality.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* chore: remove unused files
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* feat: make deployer image settable via linker
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* tests: remote unncessary software from GH VM
Previously tests were failing with no space left on device.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* fixup: updated generated code
The codegen should have been updated in prior PR but we forget do do it
there.
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* test: wait for gitlab setting effect
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* chore: use codegen script for docs
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* fixup: codegen updated docs
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* doc: Go and Rust on cluster build is supported
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* doc: build envvars
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* rename knative-sandbox
* fixup bad merge
* fixup: use knative.dev not github.com import path
---------
Co-authored-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <matejvasek@gmail.com>
* allowing on cluster build for go runtime
* warning message added for go and rust builder
* gofmt
* fixups
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
This allows setting the service account for the resulting knative
service, which must pre-exist in the namespace to let the deployment
succeed.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Refactors PVCSize to treat the Function member as a custom setting,
and the in-code constant as the default.
- Fixes a bug where the PVCSize would reset to the default on deploy
- Allows the default to be changed by future func version, only pinning
the value if explicitly requested by the user.
The docs were overlooked in the changes to deploy and run in
https://github.com/knative/func/pull/1693. This commit just updates the
docs so they are consistent with the binary.
Signed-off-by: Lance Ball <lball@redhat.com>
* feat: custom health checks for node and typescript
This commit bumps the faas-js-runtime for Node.js and TypeScript
dependencies to version 1.1.0, which includes an API allowing function
developers to override the liveness and readiness checks for their
functions.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup
Signed-off-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Lance Ball <lball@redhat.com>
* Add Python templates for gunicorn and uwsgi + Flask
These templates represents the most common and simple ways
how to implement FAAS in Python either directly via gunicorn
or using Flask and uwsgi.
* feat: runtime envvar definition in templates
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: use APP_MODULE not app.sh
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: update docs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: better diffing in tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: update tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
* doc: refer specific verision of Tekton not latest
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: shell-check
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: add pvc-size flag to deploy command (#851)
* feat: move pvc-size from deploy to build func configuration section (#851)
* feat: add setting default value for pvc-size in func.yaml (#851)
* feat: change pvc-size to camel case (#851)
* feat: add omitempty to pvcSize (#851)
* feat: regenerate func yaml schema (#851)
* feat: update docs for deploy command (#851)
* feat: update usage help for the pvc-size flag (#851)
* cli help text and flags cleanup
- verbose flag uses global setting throughout
- confirm flag added using shared visitor throughout
- path flag added using shared visitor throughout
- removes --version flag on root as redundant with subcommand
- splits main help's 'Main Commands' into 'Primary Commands' and 'Development
Commands' groups
- Moves RunE definition into flag struct literals
* remove commented code
* add option 'branch' to command 'repository add'
* Format go code (#1407)
Signed-off-by: Knative Automation <automation@knative.team>
* chore: refactor repository layout (#1554)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
* fixup: removes --branch tag from repo commands
Removes the currently in-flight work on the `--branch` tag, simply
supporting a `refspec` on the repository URI. For example,
https://github.com/knative-sandbox/func-tastic#metacontroller will pull
the `func-tastic` repo, and set the currently active HEAD to the
`metacontroller` branch. Adds support for displaying this with the
command `func repo list -v`.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: add example to `func repo add` documentation
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: adjust test output expectations
Signed-off-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Knative Automation <automation@knative.team>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>
Co-authored-by: knative-automation <automation@knative.team>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
* feat: deploy command global config function context
* fix static check errors
* fix test
* fix remote persists test
* env opaque box test
* use keyed fields (govet)
* mock deployer expansion
* ClearEnvs now in shared testing pkg
* effectivePath now uses plfags
* list directly uses config for default namespace
* Improved Namespace calculation and Caching
- Built() now a client package function
- Namespace evaluation delegeate to implementations
This enables the func.yaml to avert dirtiness checks on rebuilds
(caching)
- Build and Deploy update build stamp on completion
Enables dirtiness checks to be unaffects, leading to better caching.
- CLI Namespace checks no longer require k8s env evaluation for default
- Fixed missing condition check in TestDeploy_Namespace
- Fixes some minor linter and spelling errors
- Global config does not directly set namespace - it is corrected to be
deferred evaluation used by implementations.
- Skips writing func.yaml on f.Write if there were no modifications,
which leads to better caching (no timestamp update means Built ==
true)
- HasImage removed in favor of a corrected fn.Built
* linting, misspellings and docs rebuild
* warn user if git settings exist on a non-remote build
* lint error fix
* test flag unsetting persists
* allow unknown flags in preparsing of flags
* pre-submit cleanup
* update cmd to use client.Init
* Update Spring Boot to 2.7.7
- also add function-template springboot.md doc
Signed-off-by: Thomas Risberg <trisberg@pivotal.io>
* Fix lint errors
Signed-off-by: Thomas Risberg <trisberg@pivotal.io>
Includes guidance for Language Pack authors creating templates that use
runtimes other than those that are built in to the CLI.
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
* feat: global config function context
The function with context is considered when determining flag defaults
such that:
- No special logic is required to determine "if changed"
- help text correctly reflects the actual values which will be used
- Global config can be a direct parent of command-specific config via
embed
Also included:
- CLI tests clear environment of FUNC_* variables
- Command's bindEnv helper also sets up environment variable auto-binding
and prefix.
- Verbosisty flag default now globally configurable
* Update cmd/build.go
Co-authored-by: Lance Ball <lball@redhat.com>
* Update cmd/build.go
Co-authored-by: Lance Ball <lball@redhat.com>
* Update cmd/build.go
Co-authored-by: Lance Ball <lball@redhat.com>
* move clearEnvs test function to test file
* docs regen
Co-authored-by: Lance Ball <lball@redhat.com>
Removes old, outdated documentation and links to existing docs on https://knative.dev. Restructures some of the documentation directory, moving everything that is not generated out of the `reference` directory.
/kind documentation
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>