* cleanup(builders): tweak TrustedBuilder()
We have been relying on a closure to validate the builder prefix provided to `pack`. This change ensures that we use the builder image which `pack` is using - whether it's what we provided in options or not.
/kind cleanup
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup
Signed-off-by: Lance Ball <lball@redhat.com>
* techdebt(builders-tests): simplify TrustedBuilders() unit test
There's no need to mock anything if we don't create the `TrustedBuilders()` function in `Build()`.
/kind techdebt
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.
/kind fix
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
* techdebt(buildpacks): test builder image prefix
Adds a test for the known builder image prefixes, ensuring they are considered trusted. Removes the check for old versions of podman in order to facilitate this test without turning it into an integration test. Podman 3.4 was released in the summer of '21, more than a year ago, and all published versions of RHEL ship with podman 4.2.
/kind techdebt
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: remove unused code
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: run ./hack/update-codegen.sh
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: run ./hack/update-codegen.sh
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-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>
* effective path
* function context for build builder
* code review suggestions
- fix misspelled 'precedence' throughout
- remove superfluous command execution from test
- remove debug statements
- add FUNC_PATH precedence check with short-flag in effectivePath test
* rebase and update to NewTestClient
* feat: s2i cache /tmp/artifacts
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: s2i build caches buildah container storage
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Revert "feat: s2i build caches buildah container storage"
This reverts commit ec52609814.
Reverting since it lead up to eating all storage.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* function validation
Move validation from function load to function write
Validate checks syntactically valid, not completeness (i.e. envs format
rather than populated name.)
* wokeification
Resetting KUBECONFIG envvar is not sufficient if test runs in cluster.
We also must unset KUBERNETES_SERVICE_HOST envvar,
so in-cluster-config wont kick in.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* chore(OWNERS): update to new org
When we moved to knative org, the groups changed. This addresses that.
/kind chore
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>
Eliminates some security issues found by dependabot and bumps to latest faas-js-runtime. Also cleans up the typescript code to be slightly less ugly.
/kind chore
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
* chore: list command namespace
- Adds namespace test to list command
- Moves namespace flag into list command for
- Better help text
- Easier testing
- Sets static default namespace for flag to "default"
* regen docs
* list test default from kubeconfig
* chore: deploy namespace simplification
Separates namespace redeploy warnings from namespace value derivation
logic. Simplifies derivation by integration more closely with flag init
flow.
* cleanup
* chore: delete command namespace
- Fixes bug where deleting by name fails if current path has no
initialized function.
- Adds namespace test to delete command
- Moves namespace flag into delete command for
- Better help text
- Easier testing
- Sets static default namespace for flag to "default"
* fix comments/docs
* delete tests with nonexistent kubeconfig
* fix help text
* fix: describe function
- Fixes error describing by name
- Adds ability to specify namespace
- Fixes inconsistency between Describe and Info
* fix misspelling
* clear test cmd args
* remove old doc file
* docs cleanup
* test describe with no kubeconfig
Updates the mock deployer to have the correct method signature
(match interface it is mocking). Usage is illustrated using a
refactored implementation of mock.NewDeployerWithResult.