* Fix some linter errors
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* fixup: set func registry
Signed-off-by: Matej Vašek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vašek <mvasek@redhat.com>
* fix: allow sub-pkgs in Go functions
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
---------
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* Fix test failures in OCP prow CI
Ensure that ServeRepo() make copy of repo from ./testdata and serves the
repo from that copy.
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fixup: typo
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
---------
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
* fix: namespace logic cleanup and test isolation
- Pulls logic for defaulting to active namespace (K8S) moved UP to CLI during
flag default calculation.
- Pushes logic of deciding between f.Namespace vs f.Deploy.Namespace down into
implementations.
- Updates some tests which needed to have their environment cleared.
- Refactors Pipelines tests to use client API.
- Removes namespaces as a state variable all structures, instead passing as
an argument.
- Moves FromTempDirectory to testing package for use outside cmd.
* fix spelling errors
* fix: pipelines remover always returned (empty) error
* update tekton namespace handling
* fix: remove deprecated GitLab config: max_concurrency
The current binaries and allocation scrips are very CI-centric, this PR
takes a few steps to make them more friendly to running in a dev
environment; mainly centered around not polluting global scope (keeping
filesystem mutations in a relative local directory).
- binaries (and kind kubeconfig) are installed in ./hack/bin
- adds /hack/bin to .gitignore
- binary paths can be overridden via env vars FUNC_TEST_{name}
- binary fallback is system-installed (when binaries.sh not run)
- Cleanup of the UX, including colors and some shared helpers via
library.sh
- Removes `yq` as the hack that required it appears to no longer be necessary.
- Adds some notes for Nix users
- Better error messaging when !linux
- Refactors the installers to pipe directly to tar rather than touch
disk.
- begin to standardize on hyphens in filenames
* update go-http templates to match new idiomatic handler
* update embedded templates
* bump func-go dependency
* regenerate templates
* update template deps again
* run embed again
* update test fixtures
* use go1.22 in CI
* setup metallb right after creating k8s cluster
* func-go v1.21.2
* revert static http handler signature update
Since the Pack and S2I builders do not yet use the new func-go
middleware, we are not yet able update the static static handler template.
* func-go v0.21.3
* revert static handler template test
* update embedded template fs
* try go 1.21 throughout
---------
Co-authored-by: Luke Kingland <luke@lukekingland.com>
* forced namespace change, deletes old func, kind works
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new .deploy.image field
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* building
* building
* add first iteration of complete functionality with f.Build.Image and f.Deploy.Image that STILL contains a workaround for image digest which is populated on Push instead of Build
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* base tests fixes for compile
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix base tests2 for now, integration test has a possible TODO
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new generated schema
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix some tests using .Image and create new test
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove nested .func
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* get rid of test
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove my debug test
* fix namespace change test
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix pipeline run to use .Deploy.Image
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix TestDeploy_ConfigApplied and change pipelines image being used
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix some tests
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix actions - return value, configApplied and registry on subsequent deploy different
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* update empty image in tests issue
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix client.Apply tests with passing image value to .Deploy after push
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* openshift override on namespace change forced, remove useless print
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* printing fixes, reviewdog, buildConfig return
* fix pipelines test by feeding image name to .Deploy, comments
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* update more tests
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new test, comment
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* misspell
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove unnecessary comments
* fix from review
* namespace updated with 2 fields; new error definitions; deploy functionality cleanup
* remove k8s service host var in test
* error definition; fix client tests; cli delete fixup
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new schema
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* namespace fixes; remover arguments fix
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* delete_test cmd
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* schema, new local remote flag instead of deploy
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix test to have now required namespace
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* add namespace check, test action
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix integration deploy test, comments
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix wrongly removed namespace
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* small changes to remover and ns added to its tests
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* test moving logic to client
* fix deploy bug, remove verbose for better logs
* pipelines, clean remover
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* newline
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* namespace required in remover, and fixed remote deployer - returns ns
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix integ test for pipelines.Run
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* cleanup
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* registry update change on deploy, some prints
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new deploy tests and mock update
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* new tests, ns determination in mocks
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* deploy digested img doesnt populate build
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* comments
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* remove todo
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
---------
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
* fix: docker registry/repository parsing
Use go-containerregistry to do parsing.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: use kebab-case instead of camelCase
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: use kebab-case instead of camelCase
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* adding suppor for funcignore file
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
* resolving unit test and linting error
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
* adding unit tests and symlink
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
* making requested changes in tests
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
* making requested changes
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
* changing the comment
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
* resolving unit test error in windows
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
---------
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.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>
Plumbs through the platform CLI flag to the individual builders by
creating a client-level BuildOption functional option, and modifying the
builder interface to accept an optional set of requested target
platforms.
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.
This commit adds a new error type `UninitializedError` to minimize
redundancy across commands, and applies it in all of the commands which
need an initialized function to operate.
Fixes: https://github.com/knative/func/issues/1744
Signed-off-by: Lance Ball <lball@redhat.com>
- The .gitignore file was always relative to process' current working
directory. Now correctly uses the function root
- The .gitignore file was always being updated, causing its modification
timestamp to be updated multiple times throughout the executaion of
any client commands.
- Adds the ability to override this behavior by commenting out the line
in the .gitignore.
- Adds the ability to request that stamping create an ongoing journal
via a build log file with timestamp prefix (for debugging)
* feat: job scaffolding
- Local jobs use a directory rather than filename
This sets up for upcoming scaffolding to use as a space for job
scaffolding code.
- Places all jobs within a 'runs' directory in ./func rather than
'instances' to further differentiate between an instance and a local
run task invoked via .Run
- Updates Jobs' stop handler to have an error return.
- Adds tests which ensure creating and stopping a job are reflected in
the client's .Instances().Local() accessor.
- Adds verbose logging support to the Job implementation.
- Adds a cleanup task which will remove orphaned jobs by, in addition to
previous logic, checking that there is no longer a process listening
on the port indicated by the job.
* fix spelling errors
* fix lint errors
* log job stop errors
* use temp dir for tests
* add back docker build tags and wait
* feat: func domain route
Adds the --domain flag which, when provided sets the value of the
func.domain label on the deployed knative service. The cluster can then
use this to choose which route to create for multi-route clusters.
Optional.
* fix whitespace
* feat: build stamp and log
- Adds an explicit "Stamp" step to client builds
- Building always "Stamps" the function, allowing builds to cache
- Commands which alter function in inconsequential ways update the stamp
as-needed.
- Tests updated to use the API rather than hard-coding func.yaml
* fix misspellings
* temporarily disable Quarkus tests
* stamping also creates necessary run directory
* reenable Quarkus tests
* comments