func
func copied to clipboard
Add raw deployment deployer
Changes
- :gift: Adds the possibility to deploy the function as a raw kubernetes deployment instead of a knative service
- Updated the existing integration tests for the deployer, describer, remover and lister and made them generic, so I could reuse them for the raw deployments too
- Updated clients WithLister(), WithDescriber(), WithRemover(), to accept a variadic argument list. Then letting the coresponding lister/describer/remover handle the action.
- Added the deployer as a new column in the list command
$ func deploy --registry localhost:50000 --deployer raw
Building function image
Still building
🙌 Function built: localhost:50000/go-http-func:latest
Pushing function image to the registry "localhost:50000" using the "" user credentials
🎯 Creating Triggers on the cluster
✅ Function deployed in namespace "default" and exposed at URL:
http://go-http-func.default.svc.cluster.local
$ func list
NAME NAMESPACE RUNTIME DEPLOYER URL READY
go-http-func default raw http://go-http-func.default.svc True
go-http-ksvc default knative http://go-http-ksvc.default.127.0.0.1.sslip.io True
$ func describe go-http-func
Function name:
go-http-func
Function is built in image:
Function is deployed in namespace:
default
Routes:
http://go-http-func.default.svc
Deployer:
raw
Labels:
boson.dev/function: true
function.knative.dev/name: go-http-func
function.knative.dev/runtime: go
$ k get ksvc
NAME URL LATESTCREATED LATESTREADY READY REASON
go-http-ksvc http://go-http-ksvc.default.127.0.0.1.sslip.io go-http-ksvc-00001 go-http-ksvc-00001 True
$ k get ksvc go-http-func # <-- no Knative Service deployment for our function !
Error from server (NotFound): services.serving.knative.dev "go-http-func" not found
$ k get deploy
NAME READY UP-TO-DATE AVAILABLE AGE
go-http-func 1/1 1 1 47s
$ k get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
go-http-func ClusterIP 10.96.173.129 <none> 80/TCP 62s
...
/kind enhancement
Fixes: #2804
Release Note
Add the possibility to deploy a function as raw kubernetes deployment via the --deployer=raw argument
Codecov Report
:x: Patch coverage is 38.09812% with 1022 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 59.77%. Comparing base (af45a47) to head (70c7019).
:warning: Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3075 +/- ##
==========================================
- Coverage 62.35% 59.77% -2.59%
==========================================
Files 150 162 +12
Lines 13522 14763 +1241
==========================================
+ Hits 8432 8824 +392
- Misses 4112 4887 +775
- Partials 978 1052 +74
| Flag | Coverage Δ | |
|---|---|---|
| e2e-tests | 41.50% <46.20%> (+0.72%) |
:arrow_up: |
| integration-tests | 54.51% <34.22%> (-1.36%) |
:arrow_down: |
| unit-tests | 45.53% <4.78%> (-3.93%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Rebased after #3100 was in
/cc @lkingland @gauron99 @matzew Ready for review
Rebased to fix merge conflicts
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: creydr, lkingland
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [lkingland]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/lgtm