Commit Graph

1267 Commits

Author SHA1 Message Date
Lance Ball e4b96cdc9a
cleanup(buildpacks): tweak TrustedBuilder() (#1444)
* 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>
2022-11-21 14:28:43 +00:00
Lance Ball e3ce1cf9d6
fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m (#1442)
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>
2022-11-18 20:48:40 +00:00
Lance Ball 6482ba0076
techdebt(buildpacks): test builder image prefix (#1440)
* 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>
2022-11-18 15:19:40 +00:00
github-actions[bot] cef8691981
chore: update Quarkus platform version to 2.14.1.Final (#1435)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-17 20:43:39 +00:00
knative-automation b952b0fb38
Update community files (#1436)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-17 15:18:40 +00:00
Luke Kingland 5ca77d3874
src: update build command help text (#1425)
* src: build command help text

* Regen docs
2022-11-16 14:18:38 +00:00
Jefferson Ramos 1ca6625577
chore: improve func version verbose mode to display image referenced by func (#1431) 2022-11-16 14:12:40 +00:00
Lance Ball 0073106832
documentation: remove old docs and restructure (#1430)
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>
2022-11-16 05:52:36 +00:00
Andrew Su 148f30ae81
Add VMware builder as trusted (#1429) 2022-11-15 18:41:37 +00:00
Luke Kingland 30da70e05c
fix: ignore global config on docs gen (#1424) 2022-11-14 21:22:36 +00:00
knative-automation 802ab350e2
upgrade to latest dependencies (#1405)
bumping knative.dev/serving c737bb1...874cceb:
  > 874cceb Update net-gateway-api nightly (# 13466)
  > aebc16c Update net-istio nightly (# 13460)
  > 0df133d Update net-certmanager nightly (# 13461)
  > 8848735 Update net-kourier nightly (# 13463)
  > 44295ff Update net-contour nightly (# 13462)
  > bd88e05 Use new keys for internal encryption secret data (# 13388)
  > 0511892 Update net-certmanager nightly (# 13457)
  > afc6942 Update net-kourier nightly (# 13456)
  > 2a22058 Update net-contour nightly (# 13454)
  > 8c79b7f Update net-gateway-api nightly (# 13455)
  > c3e0f12 Add support for QPOptions TLS + Audience bound Tokens  (# 13384)
  > fd1b9ed Set filtered factory label in controller main + Upgrade to latest dependencies (# 13442)
  > 601c762 Update net-certmanager nightly (# 13452)
  > f9fd5c8 Update net-contour nightly (# 13446)
  > 9106a61 Update net-certmanager nightly (# 13445)
  > 1b38451 Update net-gateway-api nightly (# 13444)
  > 09f44f5 Update community files (# 13434)
  > 6f42856 Update net-gateway-api nightly (# 13432)
  > d72ba07 bump kind to 1.17 in e2e (# 13437)
  > a47c428 ran codegen with go1.19 & fix linter warnings (# 13438)
  > bc368c3 Update net-contour nightly (# 13431)
  > 025c712 upgrade to latest dependencies (# 13429)
  > 3d9c724 upgrade to latest dependencies (# 13427)
  > 2ca1aea Update net-istio nightly (# 13428)
  > 41f35ca Update community files (# 13426)
bumping knative.dev/client 4a545d0...daa3c65:
  > daa3c65 upgrade to latest dependencies (# 1758)
  > 2b347b1 Update community files (# 1760)
  > 2b75ddf Update community files (# 1759)
bumping knative.dev/networking cb26aa7...0d4e937:
  > 0d4e937 upgrade to latest dependencies (# 731)
  > ed86031 Update community files (# 730)
  > dd3d3d7 Updates style/lint checks for go1.19 (# 733)
  > 7d97614 upgrade to latest dependencies (# 729)
  > e051f4e upgrade to latest dependencies (# 728)
  > 23d44c9 Update community files (# 727)
bumping knative.dev/pkg 6eb8f18...0243d64:
  > 0243d64 Function AllowRestrictedPodSecurityStandard for modifying test pods (# 2625)
  > 389f811 upgrade to latest dependencies (# 2629)
  > 918fd93 Update community files (# 2633)
  > 44d1d7d Go1.19 changes (# 2631)
  > 6718478 Update community files (# 2628)
  > dc1fae1 changeset: allow override the revision through ldflags (# 2601)
  > 92ed919 Fix: Mute the linter on error return values. (# 2627)
  > 8fa1a3f CmpOpts overrides should be passed through (# 2621)
  > 64fc3e5 ListPointer flag should also apply to filtered informers (# 2620)
  > 2f19491 Feature: Implement Apply codegen. (# 2624)
bumping knative.dev/hack 566898d...8f3c705:
  > 8f3c705 Update community files (# 247)
  > 62b15bd drop support for the istio add on flag (# 243)
  > f5be74f Update community files (# 245)
  > 80fd6da KO_DATA_PATH doesn't need to be set anymore (# 244)
  > 4b6bd86 Format go code (# 239)
bumping knative.dev/eventing 6ea012a...82bf83c:
  > 82bf83c Fix development docs on installing IMC (# 6605)
  > 1c76762 [Scheduler] Handle permanent pending pods (# 6599)
  > a390f74 [main] Upgrade to latest dependencies (# 6590)
  > 1d02f98 Add Ansu as scheduler approver (# 6600)
  > a653058 Set SecurityContext for test Pods (# 6584)
  > 4809791 Updates for Go 1.19 (# 6594)
  > 6de07e8 Update community files (# 6593)
  > a57c12f Update community files (# 6589)
  > cd98a61 upgrade to latest dependencies (# 6586)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-14 21:03:37 +00:00
Gunjan Vyas 3f49718bc6
feat: Persist remote value in func.yaml (#1402)
* feat: persist remote value in func.yaml

* Added unit test for remote flag persistence

* Formatting fix

* addressed comments
2022-11-14 21:01:37 +00:00
Luke Kingland f6a3e55927
feat: effective path (#1353)
* 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
2022-11-11 11:21:17 +00:00
David Fridrich 13fde9025d
feat: Change Invocation.format to Invoke (#1415)
* test1

* d

* templates/* manifest remove http

* docs fix

* migration test a template tests

* docs func_run

* docs last

* misspell

* suggested changes

* def http

* zz

* zz

* change invocation struct name

* zz file
2022-11-11 11:20:19 +00:00
Luke Kingland 52cf033348
src: cleanup build prompts (#1413) 2022-11-10 20:05:16 +00:00
Lance Ball 06693859be
enhancement(templates): use latest faas-js-runtime + cloudevents (#1422)
* enhancement(templates): use latest faas-js-runtime + cloudevents

Better typing of handle functions and return values for typescript based functions.

/kind enhancement

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: improvements

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: missing FUNC_LOG_LEVEL

Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-10 12:59:15 +00:00
Luke Kingland 5b032bed66
fix: interrupt suppression (#1418)
* remove interrupt error suppression

* Update cmd/func/main.go

Co-authored-by: Matej Vasek <matejvasek@gmail.com>

Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2022-11-10 09:48:15 +00:00
github-actions[bot] a4a09fd129
chore: update Quarkus platform version to 2.14.0.Final (#1421)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-09 16:13:15 +00:00
github-actions[bot] f8b3197605
chore: update Quarkus platform version to 2.13.4.Final (#1417)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-08 20:27:20 +00:00
Luke Kingland 218fa9d8c3
rename config local variable cfg (#1412) 2022-11-08 14:35:21 +00:00
Luke Kingland 59f4e6a493
fix: mock and noop inconsistency (#1409)
* fix: mock remover missing default impl

* fix: client noop describer should not error

* src: replace generic client factory with test client

* simplify docs generator client
2022-11-07 12:45:22 +00:00
Matej Vasek 5746968b6d
feat: caching for on cluster s2i build (#1406)
* 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>
2022-11-07 12:15:22 +00:00
Luke Kingland 11616840b9
path default cwd (#1411)
The system fully supports an empty (zero value) path as indicating
operations should take place on the current working directory by default.
2022-11-07 12:07:21 +00:00
Luke Kingland cfa469d2d3
fix: error instantiating empty function (#1410)
* 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
2022-11-04 15:54:04 +00:00
knative-automation 5d67de768b
Format go code (#1407)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-04 11:11:04 +00:00
knative-automation 738b3d323f
Update community files (#1404)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-04 01:38:06 +00:00
Matej Vasek ea79cf007f
chore: update lifecycle image to v0.15.0 (#1403)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-02 17:03:07 +00:00
Matej Vasek 7e596d75cb
refactor: clean up (#1400)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 22:09:05 +00:00
Matej Vasek 7d00e81131
fix: symlink upload for in cluster build (#1401)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 22:08:05 +00:00
Matej Vasek 9de432ec2a
feat: allow symlinks in templates (#1399)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 19:41:05 +00:00
Matej Vasek b58cf6a9c6
test: fix k8s test in cluster (#1396)
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>
2022-11-01 18:03:05 +00:00
Lance Ball 939dd10eb2
chore(OWNERS): update to new org (#1397)
* 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>
2022-11-01 18:01:06 +00:00
Matej Vasek 4bd70cd253
test: clear cmd args (#1395)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 17:46:05 +00:00
Lance Ball 64e7452c9a
chore(deps): update node and typescript deps (#1394)
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>
2022-10-31 21:59:12 +00:00
Luke Kingland f9dc8b659f
chore: list command namespace (#1370)
* 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
2022-10-31 19:59:13 +00:00
Matej Vasek 7e75157373
chore: update lifecycle (#1393)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-31 19:58:12 +00:00
Luke Kingland 2edb25998a
chore: deploy cmd namespace (#1390)
* chore: deploy namespace simplification

Separates namespace redeploy warnings from namespace value derivation
logic.  Simplifies derivation by integration more closely with flag init
flow.

* cleanup
2022-10-31 19:48:15 +00:00
Luke Kingland b8de6532fc
chore: delete command namespace (#1372)
* 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
2022-10-31 19:34:14 +00:00
Luke Kingland e9fb274969
feat: describe command namespace (#1381)
* 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
2022-10-31 19:03:12 +00:00
Luke Kingland 796e02984d
feat: registry globally configurable (#1392)
Deferred evaluation of cluster type is preserved by making registry a
helper in cmd and a calculated field of the global config struct.
2022-10-31 18:59:12 +00:00
Luke Kingland 0fa9359750
feat: namespace globally configurable (#1352)
* namespace global config

* integrate namespace config into commands

* comment updates

* combine config write tests

* updates per code review

* regen docs
2022-10-31 18:07:12 +00:00
Luke Kingland b1873083cb
feat: builder globally configurable (#1391) 2022-10-31 17:17:12 +00:00
knative-automation 5c64dcb1ef
upgrade to latest dependencies (#1386)
bumping knative.dev/pkg 6ce976c...6eb8f18:
  > 6eb8f18 Update community files (# 2626)
  > 5cbee02 Filter reactor FieldErrors on validation to only error-level alerts. (# 2611)
  > 198b463 Cleanup: Turn multiple warnings into multiple warnings. (# 2619)
  > 728dfd8 Add FieldError#WrappedErrors to allow dependent code to have access (readonly) (# 2618)
bumping knative.dev/serving b44de34...c737bb1:
  > c737bb1 Update net-certmanager nightly (# 13425)
  > 21fc2b2 upgrade to latest dependencies (# 13424)
  > 81ebd47 upgrade to latest dependencies (# 13423)
bumping knative.dev/hack 9d2ae47...566898d:
  > 566898d Update community files (# 242)
bumping knative.dev/networking 0f6a54a...cb26aa7:
  > cb26aa7 upgrade to latest dependencies (# 726)
bumping knative.dev/eventing cdb52cc...6ea012a:
  > 6ea012a Update community files (# 6588)
  > ecf7a29 upgrade to latest dependencies (# 6585)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-31 15:27:12 +00:00
knative-automation c9fabb424a
Update community files (#1342)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-31 15:08:12 +00:00
Luke Kingland c9b8d8e87c
fix: mock deployer method signature (#1389)
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.
2022-10-31 14:04:13 +00:00
Luke Kingland 55383b7e24
fix: KUBECONFIG unit test interference (#1387)
* fix: clear KUBECONFIG when testing

* fix nil pointer when no config exists

* update comments

* comments and cleanup
2022-10-31 10:04:13 +00:00
Luke Kingland d0448adb82
chore: ensure all tests clear cmd args (#1388) 2022-10-28 13:30:07 +00:00
Matej Vasek 79fa1f3883
fix: do not upload .git/ for on cluster build (#1383)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-28 12:59:07 +00:00
knative-automation 49b5c08783
upgrade to latest dependencies (#1382)
bumping knative.dev/pkg 714b763...6ce976c:
  > 6ce976c Default observability config if nil (# 2614)
  > ff95684 make METRICS_DOMAIN optional when backend is not OpenCensus (# 2617)
  > b2a3a39 upgrade to latest dependencies (# 2616)
  > 9823d96 Update community files (# 2615)
  > 5dd89c6 Support istio *List types where Items is an array of pointer types (# 2613)
  > b812aff Support fetching observability from ctx. (# 2610)
bumping knative.dev/serving e82287d...b44de34:
  > b44de34 Update net-gateway-api nightly (# 13422)
  > 3b35f78 Update net-contour nightly (# 13421)
  > 299aa96 upgrade to latest dependencies (# 13420)
  > 9e7150f upgrade to latest dependencies (# 13417)
  > 5411bd0 upgrade to latest dependencies (# 13415)
  > 4c99f48 Update community files (# 13413)
  > a6a18b8 updates HPA webhook api version (# 13411)
  > 0b88704 Update net-gateway-api nightly (# 13406)
bumping knative.dev/hack 3fdc50b...9d2ae47:
  > 9d2ae47 Update community files (# 241)
  > cf1a127 🎁 Use Knative ls-tags tool (# 238)
bumping knative.dev/networking 58f3e62...0f6a54a:
  > 0f6a54a upgrade to latest dependencies (# 725)
  > 2cbe3ef upgrade to latest dependencies (# 724)
  > 83b94f2 Update community files (# 723)
  > db966e7 fix http01 conformance tests (# 721)
  > fb5566f fix downstream tests (# 722)
bumping knative.dev/eventing 0fe923c...cdb52cc:
  > cdb52cc upgrade to latest dependencies (# 6582)
  > 39c914b upgrade to latest dependencies (# 6580)
  > 47c2635 Update community files (# 6579)
  > 98dfb5b Doing base64 encode in channel's responseBody (# 6542)
bumping knative.dev/client 0b99fc5...4a545d0:
  > 4a545d0 Update community files (# 1757)
  > 66307f2 Resolve Serving version to released tag (# 1755)
  > 699a888 Fix namespaced unit test (# 1753)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-27 18:54:07 +00:00
Jefferson Ramos 98001dc351
fix: make socat image public and remove socat image env (#1384) 2022-10-26 15:37:58 +00:00