Skip to content

Conversation

@creydr
Copy link
Member

@creydr creydr commented Oct 10, 2025

Changes

  • 🎁 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

@knative-prow knative-prow bot added kind/enhancement do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 10, 2025
@creydr creydr force-pushed the kubernetes-deployer branch from c0a7e4d to f0fa249 Compare October 10, 2025 08:10
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 38.09812% with 1022 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.77%. Comparing base (af45a47) to head (70c7019).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/deployer/testing/integration_test_helper.go 0.00% 626 Missing ⚠️
pkg/k8s/deployer.go 78.10% 59 Missing and 31 partials ⚠️
pkg/remover/testing/integration_test_helper.go 0.00% 58 Missing ⚠️
pkg/lister/testing/integration_test_helper.go 0.00% 50 Missing ⚠️
cmd/completion_util.go 0.00% 24 Missing ⚠️
pkg/testing/k8s/testing.go 0.00% 20 Missing ⚠️
pkg/k8s/logs.go 78.20% 14 Missing and 3 partials ⚠️
pkg/k8s/remover.go 43.33% 12 Missing and 5 partials ⚠️
pkg/knative/describer.go 37.50% 13 Missing and 2 partials ⚠️
pkg/k8s/wait.go 77.04% 7 Missing and 7 partials ⚠️
... and 11 more
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%) ⬆️
integration-tests 54.51% <34.22%> (-1.36%) ⬇️
unit-tests 45.53% <4.78%> (-3.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@creydr creydr force-pushed the kubernetes-deployer branch 2 times, most recently from 8e688bf to d37451e Compare October 10, 2025 11:58
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 20, 2025
@creydr creydr force-pushed the kubernetes-deployer branch from 988a5c4 to cb1d6dc Compare October 20, 2025 08:22
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 20, 2025
@creydr
Copy link
Member Author

creydr commented Oct 20, 2025

Rebased after #3100 was in

@creydr creydr force-pushed the kubernetes-deployer branch 5 times, most recently from 4c1b43b to 5d1d3da Compare October 24, 2025 09:53
@creydr creydr changed the title [WIP] Add raw deployment deployer Add raw deployment deployer Oct 24, 2025
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2025
@creydr
Copy link
Member Author

creydr commented Oct 24, 2025

/cc @lkingland @gauron99 @matzew
Ready for review

@creydr creydr force-pushed the kubernetes-deployer branch from 3933e71 to b92dae7 Compare November 12, 2025 10:18
@creydr creydr force-pushed the kubernetes-deployer branch from 1d0aaee to b4db989 Compare November 12, 2025 11:48
@creydr creydr requested review from gauron99 and lkingland November 13, 2025 06:14
Copy link
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
🎉

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2025
@knative-prow
Copy link

knative-prow bot commented Nov 13, 2025

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2025
@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2025
@gauron99
Copy link
Contributor

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2025
@knative-prow knative-prow bot merged commit 640a72a into knative:main Nov 13, 2025
45 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/enhancement lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubernetes Deployer

4 participants