Commit Graph

1303 Commits

Author SHA1 Message Date
Luke Kingland 51cb15b78a
feat: enable host builder via cli (#1748) 2023-06-20 17:33:34 +00:00
Luke Kingland 94582efa49
src: interstitial commit version (#1817)
The Knative version is now included in version command verbose output

Building an unreleased version no longer returns v0.0.0, but instead the
value provided by `git describe --tags` which is the most recent tagged
release with a suffix consisting of the number of commits since that
release and the short hash.

Verbose output now always includes the current commit on a dedicated
line.
2023-06-20 17:15:34 +00:00
Sascha Grunert c1a90f65f2
Add support for `serviceAccountName` on deploy (#1811)
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>
2023-06-19 16:46:54 +00:00
Matej Vasek 3d1176680d
fix: bad connection handling for in cluster dialer (#1800)
* fix: bad connection handling for in cluster dialer

Connections were closed from wrong end of io.Pipe
which resulted in confusing error logs.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* feat: DialContext() better error handling

Now DialContext() returns some errors immediately
instead of deferring it Read/Write operation on the returned connection.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* feat: DialContext() more better error handling

Now ContextDial() tries to parse socat's stderr and translate it to Go's net.OpError
instead of just creating error with whole stderr embedded in it.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Apply suggestions from code review

Co-authored-by: Lance Ball <lball@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>
2023-06-19 06:23:53 +00:00
Luke Kingland cabba3f9d3
feat: start timeout for host runs (#1782)
* feat: start timeout for host runs

* refactor timeout function

* hide flag until a valid path
2023-06-16 19:57:49 +00:00
Andrejus Chaliapinas f6c11c94af
Added Rust templates linting (#1814)
* Adding Lint for Rust templates

* Run CI on my branch

* Remove CI on non-main branch
2023-06-14 17:03:47 +00:00
Thomas Risberg 339608a733
Update springboot template pom.xml dependencies (#1807)
- update to use spring-cloud.version 2022.0.3
- remove springboot.platform.version property, not needed, rely on parent version
- remove import scope and pom type from spring-boot dependencies
2023-06-14 17:02:46 +00:00
Nitish Chauhan d3a6d6c60c
adding default builders (#1796)
* adding default builders

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* adding yaml format output option

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* fixing typo

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* making changes in flag

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-06-14 17:01:46 +00:00
Matej Vasek 8a8639ae00
src: more verbose output (#1810)
* fixup: more verbose output

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: refactor extract version into variable

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-13 17:58:45 +00:00
Matej Vasek 83bc889b6c
src: use ghcr.io for dapr components in GH Action (#1809)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-12 16:21:45 +00:00
Luke Kingland 25ec89d52c
feat: platform build options (#1780)
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.
2023-06-12 14:04:03 +00:00
Sascha Grunert 529957e837
Cleanup Rust cloudevents example (#1799)
By:

- Using a more opinionated release profile to optimize binary
- Removing not required dependencies
- Updating the rest of the dependencies
- Switch to Rust edition 2021
- Cleanup imports by importing the concrete types
- Avoid unnecessary type assertions
- Do not unwrap port

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-10 03:32:59 +00:00
Nitish Chauhan 890d440037
added shorthand -R for --remote flag (#1797)
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-06-09 18:54:59 +00:00
Luke Kingland 0ef55f8036
src: cleanup the run timeout loop and check (#1804)
* src: cleanup the run timeout loop and check

* Update pkg/functions/runner.go

---------

Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2023-06-09 16:52:00 +00:00
Sascha Grunert 44978970f6
Cleanup Rust http example (#1798)
By:

- Using a more opinionated release profile to optimize binary
- Removing not required dependencies
- Updating the rest of the dependencies
- Cleanup imports by importing the concrete types
- Avoid unnecessary type assertions
- Do not unwrap port

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-09 13:10:59 +00:00
Aleksander Slominski 8489a0d08b
Check error before defer body close, include timeout in error message (#1803) 2023-06-09 00:52:58 +00:00
Matej Vasek 18fe6430a1
chore: update to Go 1.20 (#1802)
* chore: update to Go 1.20

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update codegen

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: update golangci-lint

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-08 21:22:58 +00:00
Matej Vasek 6b97fb5a3c
test: integration test for tekton on cluster build (#1789)
* test: integration tests for Tekton builds

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: disable s2i integration test for now

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-07 21:47:57 +00:00
Jefferson Ramos 5034bd31d2
chore: test build tags and removal of iteractive tests on Windows (#1794) 2023-06-07 19:17:57 +00:00
github-actions[bot] 0cce3f01ce
chore: update Quarkus platform version to 3.1.1.Final (#1793)
Co-authored-by: Knative Automation <automation@knative.team>
2023-06-07 17:47:57 +00:00
Matej Vasek 4386689f41
cleanup: run test operations in dedicated ns (#1791)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-07 07:21:57 +00:00
Jefferson Ramos 2af040f5b7
chore: default s2i builder as var for ldflags (#1787) 2023-06-06 21:51:26 +00:00
Luke Kingland e5aff92984
feat: enable scaffolding for host builds (#1750)
* feat: enable scaffolding in builder

* fix a few typos

* error text formatting

Co-authored-by: Lance Ball <lball@redhat.com>

* error text formatting

Co-authored-by: Lance Ball <lball@redhat.com>

* remove test job stop defer

---------

Co-authored-by: Lance Ball <lball@redhat.com>
2023-06-06 20:37:26 +00:00
Luke Kingland 9632748f19
src: errors cleanup (#1783) 2023-06-06 20:15:26 +00:00
Michal Vinkler 109e6b6be8
Fix appending SHA256 hash to image reference in ImageWithDigest (#1784) 2023-06-06 19:01:26 +00:00
Matej Vasek 75a8b8991d
chore: clean up PaC GitLab test (#1785)
* chore: clean up PaC GitLab test

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: missing EOL

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: generate random password for GitLab

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-06 17:55:26 +00:00
knative-automation 1b6414df1e
Update community files (#1781)
Signed-off-by: Knative Automation <automation@knative.team>
2023-06-06 02:22:27 +00:00
Luke Kingland a7f68f9de9
fix: filename typo (#1772) 2023-06-06 00:24:26 +00:00
Matej Vasek 4e743684e1
Pipeline as Code integration for GitLab (#1769)
* feat: PaC for Gitlab

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: different approach to hostname resolution

Resolve '[*.]127.0.0.1.sslip.io' to cluster node IP.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: error handling

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: added TODO

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: small refactor

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-05 19:48:26 +00:00
Luke Kingland d3e33738b9
src: add missing 'omitempty' annotations (#1773) 2023-06-05 18:29:26 +00:00
Luke Kingland 895226fccc
src: remove date from version (#1776)
In an effort to move one step closer to reproducible builds, the date of
compliation is removed from the binary.
2023-06-05 09:50:41 +00:00
Luke Kingland 7175a554ff
feat: source-defined buildpacks (#1774)
Allows buildpacks to be updated by updating to a newer version of
func.  Previously, buildpacs were fixed at time of function creation
without a manual edit of func.yaml.  Currently using Go as the reference
implementation in this commit.
2023-06-05 09:49:41 +00:00
Luke Kingland c96d29faa3
src: invoke response cleanup (#1777) 2023-06-05 09:48:41 +00:00
Luke Kingland bb599f00f9
fix: PVCSize resets to default (#1771)
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.
2023-06-05 09:43:41 +00:00
knative-automation 184db6b939
upgrade to latest dependencies (#1747)
bumping knative.dev/hack 7d81248...5b7907f:%0A  > 5b7907f Update actions (# 289)%0A  > c133d5d Install Istio for tests (# 291)%0A  > 5812c57 Update community files (# 292)%0Abumping knative.dev/eventing 4b9fdef...df08b49:%0A  > df08b49 Eventing TLS: verify APIServerSource and PingSource sinkURI is https (# 6987)%0A  > d21c1aa [main] Upgrade to latest dependencies (# 6989)%0A  > 70113e8 Deprecate broker field and use KReference for the broker instead (# 6870)%0A  > 4e4647f test update to newest version (# 6990)%0A  > 870ac6b Update MessageDispatcher and FanoutMessageHandler to support sending events to TLS endpoints (# 6983)%0A  > 6dd5d58 Test PingSource with eventshub TLS receiver as sink (# 6965)%0A  > 55f4f28 [main] Upgrade to latest dependencies (# 6982)%0A  > 2a5a9a5 Add more items in the development getting started documentation (# 6978)%0A  > 59118a0 imc-dispatcher starts a TLS server, accepts host based routing on http receiver and path based routing on https receiver (# 6954)%0A  > ee49ada Rework kncloudevents library to support multiple clients (# 6975)%0A  > ee88094 Make ServerManager independent from kncloudevents package (# 6980)%0A  > 6a11c5f [main] Upgrade to latest dependencies (# 6969)%0A  > 8a9a532 Updated DEVELOPMENT.md to provide better instructions on setting up kubernetes (# 6977)%0A  > 390a0c8 Eventing TLS: Test ContainerSource with eventshub TLS receiver as sink (# 6957)%0A  > 5e245ac Fix flaky PingSource TLS unit test (# 6970)%0A  > f9f27c9 Use random names in Channel tests (# 6967)%0A  > d4609a5 Do not parse flags in InitializeEventingFlags (# 6966)%0A  > ef68a0a [main] Update community files (# 6968)%0A  > 4adc287 Add transport-encryption prerequisite for Addressable tests (# 6964)%0A  > deb0ef4 Add field for subscribers & replys CA certs to `SubscriberSpec` and `SubscriptionStatusPhysicalSubscription` (# 6959)%0A  > b81082c Eventing TLS: Test ApiServerSource with eventshub TLS receiver as sink (# 6956)%0A  > cdff269 Adding source duck type to v1b2 (# 6962)%0A  > b47b4ec [main] Upgrade to latest dependencies (# 6958)%0A  > 3315c20 Provide Channels CACerts in Brokers status annotation (# 6952)%0Abumping knative.dev/client-pkg e5c405e...83c91f4:%0A  > 83c91f4 Update community files (# 103)%0Abumping knative.dev/pkg dfb4bf0...5671699:%0A  > 5671699 drop the dynamic type (# 2750)%0A  > 9bda38b Fix some webhook testing tech debt (# 2751)%0A  > ec20442 Update community files (# 2747)%0A  > 05bfcf6 bump k8s dependencies and update min version to v1.25 (# 2745)%0A  > 52ff2ac drop dynamic client wrappers (# 2744)%0A  > a170a07 Eventing TLS: validate that Destination.CACerts is a PEM encoded cert (# 2743)%0Abumping knative.dev/serving 99800ed...349b2d6:%0A  > 349b2d6 Change minimum TLS version to 1.3 for internal encryption (between activator and queue-proxy) (# 13887)%0A  > d07bf78 Update net-contour nightly (# 14049)%0A  > aa023e8 Update net-istio nightly (# 14048)%0A  > 8fc4bb9 Update net-gateway-api nightly (# 14047)%0A  > 135be30 Update net-certmanager nightly (# 14046)%0A  > 8da71b5 Update net-kourier nightly (# 14042)%0A  > 13a4e46 poll until timeout - don't error out if the deployment can't be found (# 14027)%0A  > 31c2b7e upgrade to latest dependencies (# 14043)%0A  > 6a6e417 Update net-istio nightly (# 14041)%0A  > 807fc2c Update net-certmanager nightly (# 14040)%0A  > 3c23945 drop safe to evict annotations (# 14035)%0A  > fca5c14 Update net-gateway-api nightly (# 14033)%0A  > c12c917 Update net-contour nightly (# 14034)%0A  > 2da856d Update net-kourier nightly (# 14032)%0A  > d7c8779 Update net-certmanager nightly (# 14031)%0A  > aaf01dc Update net-istio nightly (# 14030)%0A  > bdaa436 RandomChoice 2 policy wasn't random when the number of targets is 2 (with equal weight) (# 14028)%0A  > c91f8c4 Fix metrics reporting period (# 14019)%0A  > 9f60969 Update net-kourier nightly (# 14004)%0A  > 6020cec Update net-istio nightly (# 14025)%0A  > 88cae7f Update net-gateway-api nightly (# 14016)%0A  > a143bf8 Update net-contour nightly (# 14015)%0A  > c2be582 Update net-certmanager nightly (# 14014)%0A  > 3450f0a upgrade to latest dependencies (# 14013)%0A  > 35cfd8f [Automated] Update net-gateway-api nightly (# 14003)%0A  > 08a9708 Update net-istio nightly (# 14009)%0A  > 5074b4c Update net-contour nightly (# 14010)%0A  > e8cb343 upgrade to latest dependencies (# 13999)%0A  > 1261074 Update net-certmanager nightly (# 14002)%0A  > f987ca6 Bump kind to 0.19 (# 14008)%0A  > fbb7fa1 Update community files (# 13998)%0A  > bff1d80 Remove 1.24 kind version (# 14007)%0A  > a657321 Update net-kourier nightly (# 13993)%0A  > d75b0f0 Update net-contour nightly (# 13990)%0A  > 6d26f54 upgrade to latest dependencies (# 13991)%0A  > df5001f Update net-certmanager nightly (# 13992)%0A  > 2594084 upgrade to latest dependencies (# 13989)%0A  > 7c303fa Update cluster-version to 1.25 (# 13988)%0A  > 9e751a2 Update net-certmanager nightly (# 13974)%0A  > 7b35cfb upgrade to latest dependencies (# 13987)%0Abumping knative.dev/networking 33636d9...2a2f7d2:%0A  > 2a2f7d2 upgrade to latest dependencies (# 810)%0A  > fcbedad Update community files (# 809)%0A  > a44b093 upgrade to latest dependencies (# 808)%0A  > 7c2f7ac upgrade to latest dependencies (# 807)%0Abumping k8s.io/apiextensions-apiserver e8bd314...52c998e:%0A  > 52c998e Update dependencies to v0.26.5 tag%0A  > 186ff9b Merge pull request # 117274 from jkh52/release-1.26-knp-0.0.37%0A  > b7b18f5 Merge pull request # 117691 from dims/re-do-of-117242-on-release-1.26%0A  > ee5015a Bump konnectivity-client to 0.0.37%0A  > 9ce75f3 Bump runc go module v1.1.4 -> v1.1.6%0A  > e9d194a Merge pull request # 115599 from jkh52/release-1.26-knp-0.0.36%0A  > d7df0be Merge pull request # 115787 from liggitt/net-0.7.0-1.26%0A  > 9152c67 Bump konnectivity-client to v0.0.36%0A  > 89cec57 Update golang.org/x/net to v0.7.0%0A  > f72cc5c Merge pull request # 115642 from nckturner/pin-golang.org/x/net-to-v0.4.0-in-1.26%0A  > 28eb995 Pin golang.org/x/net to v0.4.0 in 1.26

Signed-off-by: Knative Automation <automation@knative.team>
2023-06-05 09:40:41 +00:00
Luke Kingland 8ea1846c34
feat: add missing command aliases (#1775) 2023-06-05 09:39:42 +00:00
Lance Ball fea4a72734
feat: adds a `func environment` command (#1761)
* feat: adds a `func environment` command

Adds `func environment` to print the current function execution
environment as JSON.

See: https://github.com/knative/func/discussions/1676

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

* fixup

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

* fixup: add environment variables

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

* fixup: add cluster host

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

* fixup: review feedback

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

---------

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-31 12:36:35 +00:00
Luke Kingland 4dad8aaf7a
reduce default build platforms (#1765) 2023-05-30 17:04:35 +00:00
github-actions[bot] 70fd17642e
chore: update Springboot platform version to 3.1.0 (#1763)
Co-authored-by: Knative Automation <automation@knative.team>
2023-05-27 00:42:26 +00:00
ningyan325 f528a70881
Automated platform update for springboot templates (#1762)
* initial chg

* fix parent version selection

* change from `false` to false

* move platform checking as first task in main

* re-make generate/zz_filesystem_generated.go

* fixes of spaces in code at line 105, in following lint rules
2023-05-26 21:51:26 +00:00
Lance Ball dd7c8bdc4e
deps: update tekton to latest versions (#1753)
* deps: update tekton to latest versions

Fixes: https://github.com/knative/func/issues/1716

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

* fixup: rebase

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

* fixup: replace kube-openapi with older version and add shell scripts

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

* fixup: handle deprecations

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

* fixup: revert make check timeout value

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

---------

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-26 20:04:26 +00:00
Matej Vasek f8e976cb05
Pass image with digest to the deploy task (#1756)
* fix: deploy task explicitly sets --image flag

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: PaC with `pack` sets image param for deploy task

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: unify output of s2i and pack build task

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: unify passing of produced image by build tasks

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>
2023-05-25 15:18:27 +00:00
github-actions[bot] 2656a7e910
chore: update Quarkus platform version to 3.0.4.Final (#1758)
Co-authored-by: Knative Automation <automation@knative.team>
2023-05-25 13:41:25 +00:00
Luke Kingland b82a5a4eac
feat: host-based scaffolded function runner (#1733)
* feat: host runner

* improve error message wording
2023-05-24 21:26:25 +00:00
Jefferson Ramos f155c9c7ae
chore: preparing pipelines as code template for midstream customization (#1735) 2023-05-24 20:31:23 +00:00
Matej Vasek bc39a1aec2
Use Contour Ingress instead of Kourier (#1752)
* Use Contour Ingress instead of Kourier

Contour can be used to expose resources other that ksvc
(e.g. PaC controller).

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: use defined version of contour

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: shellcheck

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Use LoadBalancer instead of NodePort in test

This makes services available on port 80 on both localhos and in docker
network, before these ports differed.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-24 20:26:23 +00:00
knative-automation a72431bd65
Update community files (#1754)
Signed-off-by: Knative Automation <automation@knative.team>
2023-05-24 02:24:09 +00:00
Luke Kingland bf01e6426a
feat: oci directory pusher (#1702)
* feat: write instanced and static scaffolding

* feat: add oci pusher
2023-05-18 23:19:13 +00:00
Zbynek Roubalik a0b9a86034
fix: don't require credentials when not configuring webhook (#1743)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-05-18 21:35:13 +00:00
Luke Kingland 530ea4fe53
feat: write instanced and static scaffolding (#1732) 2023-05-18 20:03:14 +00:00