GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Keda Deployer by creydr · Pull Request #3386 · knative/func

Conversation

@creydr

@creydr creydr commented Jan 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #3390

Changes

  • 🎁 Add the possibility to deploy a function with a Keda HTTP scaler

Currently only exposes the function cluster internally. Issue to make the externally available is #3391.

/kind enhancement

Flow

flowchart TD
    U(User/other service) -->|accesses| A
    A[Entrypoint - Bridge Service] -->|forwards request| B
    B[Keda HTTP add-on interceptor-proxy] -->|forwards request| C
    B -.->|reads| E
    B -.->|scales| D
    C[App service] -->|forwards request| D
    D[Deployment]
    E{HTTPScaledObject}
Loading

Test procedure:

  1. Build the func-cli with those changes
    make build
  2. Clone a repo with a function
    e.g. cd /tmp & git clone https://github.com/creydr/func-go-hello-world
  3. Make sure you have Keda with the HTTP-add-on installed
    kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.17.0/keda-2.17.0.yaml
    kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.17.0/keda-2.17.0-core.yaml
    
    
    kubectl apply --server-side -f https://github.com/kedacore/http-add-on/releases/download/v0.11.1/keda-add-ons-http-0.11.1-crds.yaml
    kubectl apply --server-side -f https://github.com/kedacore/http-add-on/releases/download/v0.11.1/keda-add-ons-http-0.11.1.yaml
    
  4. Deploy the function with the keda deployer:
    <path to built-func-binary> deploy --registry <your registry> --deployer keda
    Building function image
    Still building
    Still building
    Yes, still building
    🙌 Function built: quay.io/creydr/func-go-hello-world/func-go-hello-world:latest
    Pushing function image to the registry "quay.io" using the "creydr" user credentials
    ✅ Function deployed in namespace "default" and exposed at URL: 
       http://func-go-hello-world-interceptor-bridge.default.svc:8080
    
  5. Check for the created resources:
    kubectl get httpscaledobject                            
    NAME                  TARGETWORKLOAD                           TARGETSERVICE            MINREPLICAS   MAXREPLICAS   AGE     ACTIVE
    func-go-hello-world   apps/v1/Deployment/func-go-hello-world   func-go-hello-world:80   0             10            2m48s   True
    
    kubectl get svc
    NAME                                    TYPE           CLUSTER-IP     EXTERNAL-IP                                                  PORT(S)    AGE
    func-go-hello-world                     ClusterIP      10.96.245.62   <none>                                                       80/TCP     3m48s
    func-go-hello-world-interceptor-bridge   ExternalName   <none>         keda-add-ons-http-interceptor-proxy.keda.svc.cluster.local   8080/TCP   3m41s
    
  6. Start a load test and see the pods getting scaled by Keda:
    cat <<-EOF | kubectl apply -f  -                                        
    apiVersion: batch/v1              
    kind: Job     
    metadata:
      name: hey-load-test
    spec:    
      template:                                                     
        spec:  
          containers:                           
          - name: hey 
            image: quay.io/creydr/hey:latest
            args:
              - "-n"     
              - "1000000"
              - "-c"
              - "100"
              - "http://func-go-hello-world-interceptor-bridge:8080"
          restartPolicy: Never
      backoffLimit: 1
    EOF
    
    kubectl get po
    NAME                                   READY   STATUS    RESTARTS   AGE
    func-go-hello-world-6b895b8b59-8x2wz   1/1     Running   0          58s
    func-go-hello-world-6b895b8b59-bhgzd   1/1     Running   0          43s
    func-go-hello-world-6b895b8b59-dg4q9   1/1     Running   0          58s
    func-go-hello-world-6b895b8b59-dgp92   1/1     Running   0          43s
    func-go-hello-world-6b895b8b59-h8pzh   1/1     Running   0          27s
    func-go-hello-world-6b895b8b59-j6zwd   1/1     Running   0          43s
    func-go-hello-world-6b895b8b59-k5rkd   1/1     Running   0          63s
    func-go-hello-world-6b895b8b59-n4582   1/1     Running   0          43s
    func-go-hello-world-6b895b8b59-rh56x   1/1     Running   0          27s
    func-go-hello-world-6b895b8b59-vfxtj   1/1     Running   0          58s
    hey-load-test-t4mwp                    1/1     Running   0          68s
    

Release Note

Add keda deployer

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@knative-prow knative-prow Bot added do-not-merge/work-in-progress 🤖 PR should not merge because it is a work in progress. kind/enhancement Feature additions or improvements to existing labels Jan 22, 2026
@knative-prow
knative-prow Bot requested review from dsimansk and jrangelramos January 22, 2026 13:22
@knative-prow knative-prow Bot added the size/XXL 🤖 PR changes 1000+ lines, ignoring generated files. label Jan 22, 2026
@creydr
creydr force-pushed the keda-deployer branch from 2d7459c to 989fbf8 Compare January 22, 2026 14:01
@codecov

codecov Bot commented Jan 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.81174% with 193 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.56%. Comparing base (7d24048) to head (08635b5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/keda/deployer.go 58.01% 73 Missing and 16 partials ⚠️
pkg/keda/describer.go 50.00% 28 Missing and 8 partials ⚠️
pkg/keda/lister.go 56.14% 18 Missing and 7 partials ⚠️
pkg/keda/remover.go 32.43% 20 Missing and 5 partials ⚠️
cmd/client.go 30.00% 7 Missing ⚠️
cmd/deploy.go 25.00% 3 Missing ⚠️
pkg/keda/client.go 50.00% 2 Missing and 1 partial ⚠️
pkg/keda/wait.go 62.50% 2 Missing and 1 partial ⚠️
cmd/completion_util.go 0.00% 1 Missing ⚠️
pkg/deployer/testing/integration_test_helper.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3386      +/-   ##
==========================================
- Coverage   54.61%   54.56%   -0.05%     
==========================================
  Files         173      179       +6     
  Lines       19814    20216     +402     
==========================================
+ Hits        10821    11031     +210     
- Misses       7861     8015     +154     
- Partials     1132     1170      +38     
Flag Coverage Δ
e2e 38.55% <7.14%> (-0.75%) ⬇️
e2e go 32.73% <4.03%> (-0.68%) ⬇️
e2e node 28.51% <4.03%> (-0.59%) ⬇️
e2e python 32.26% <4.03%> (-0.67%) ⬇️
e2e quarkus 28.66% <4.03%> (-0.57%) ⬇️
e2e rust 28.08% <4.03%> (-0.58%) ⬇️
e2e springboot 26.55% <4.03%> (-0.54%) ⬇️
e2e typescript 28.62% <4.03%> (-0.59%) ⬇️
integration 17.54% <65.01%> (+0.99%) ⬆️
unit macos-14 42.27% <1.23%> (-0.88%) ⬇️
unit macos-latest 42.27% <1.23%> (-0.88%) ⬇️
unit ubuntu-24.04-arm 42.61% <0.97%> (-0.87%) ⬇️
unit ubuntu-latest 43.16% <1.23%> (-0.90%) ⬇️
unit windows-latest 42.29% <1.23%> (-0.88%) ⬇️

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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow-robot knative-prow-robot added the needs-rebase Cannot be merged due to conflicts with HEAD. label Jan 22, 2026
@creydr
creydr force-pushed the keda-deployer branch from 989fbf8 to a12ae90 Compare January 22, 2026 14:26
@knative-prow-robot knative-prow-robot removed the needs-rebase Cannot be merged due to conflicts with HEAD. label Jan 22, 2026
@gauron99

gauron99 commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

/test all

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@creydr
creydr force-pushed the keda-deployer branch from 15a82c0 to ea2966e Compare January 23, 2026 11:07
@creydr creydr changed the title [WIP] Add Keda Deployer Add Keda Deployer Jan 23, 2026
@knative-prow knative-prow Bot removed the do-not-merge/work-in-progress 🤖 PR should not merge because it is a work in progress. label Jan 23, 2026
creydr
creydr commented Jan 23, 2026
View reviewed changes
Comment thread pkg/keda/deployer.go
Comment on lines +186 to +197
CooldownPeriod: ptr.To(int32(300)),
ScalingMetric: &httpv1alpha1.ScalingMetricSpec{
Rate: &httpv1alpha1.RateMetricSpec{
TargetValue: 100,
Window: metav1.Duration{
Duration: time.Minute,
},
Granularity: metav1.Duration{
Duration: time.Second,
},
},
},

@creydr creydr Jan 23, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@linkvt do you have any recommendations for those metrics? I mostly took them from the example 🙃

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@creydr

creydr commented Jan 23, 2026

Copy link
Copy Markdown
Member Author

/cc @gauron99 @lkingland @matejvasek

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow
knative-prow Bot requested review from gauron99, lkingland and matejvasek January 23, 2026 11:54
@knative-prow-robot knative-prow-robot added the needs-rebase Cannot be merged due to conflicts with HEAD. label Jan 23, 2026
linkvt
linkvt reviewed Jan 24, 2026
View reviewed changes
Comment thread go.mod Outdated

// Override invalid k8s.io/client-go v1.5.2 requirement from keda http-add-on
// keda uses a replace directive internally, but those don't propagate to dependents
replace k8s.io/client-go => k8s.io/client-go v0.34.3

@linkvt linkvt Jan 24, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

PR to resolve this in the KHA is open and will probably be released next week, just need to fix CI, see kedacore/http-add-on#1424

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@creydr creydr Jan 26, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Awesome. Thanks a lot

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
matejvasek
matejvasek reviewed Jan 26, 2026
View reviewed changes
Comment thread hack/component-versions.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

matejvasek
matejvasek reviewed Jan 26, 2026
View reviewed changes
Comment thread schema/func_yaml-schema.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

matejvasek
matejvasek reviewed Jan 27, 2026
View reviewed changes
Comment thread pkg/k8s/deployer.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

matejvasek
matejvasek reviewed Jan 27, 2026
View reviewed changes
Comment thread pkg/keda/deployer.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@matejvasek

matejvasek commented Jan 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

https://github.com/knative/func/pull/3386/files#diff-de5ffd1deebc759567528bb5daaae836c26cd37338fce587cb54276caf9291e0R111-R114
Missing keda value in the enum in the JSON schema file?
The file is generated so fix has to be done elsewhere.

func/pkg/functions/function.go

Line 213 in 8206b24

Deployer string `yaml:"deployer,omitempty" jsonschema:"enum=knative,enum=raw"`

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

matejvasek
matejvasek reviewed Jan 27, 2026
View reviewed changes
Comment thread pkg/keda/client.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

matejvasek
matejvasek reviewed Jan 28, 2026
View reviewed changes
Comment thread pkg/deployer/testing/integration_test_helper.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

creydr added 2 commits January 28, 2026 18:05
@creydr
Add Keda Deployer
d52b172
@creydr
Run hack/update-codegen.sh
7a49d90
creydr added 4 commits January 28, 2026 18:09
@creydr
Remove cluster-domain flag and use cluster.local instead for now
95824be
@creydr
Fix: add "keda" to deployer enum for jsonschema
3ea7855
@creydr
Remove unneeded blank import
c62469c
@creydr
Remove custom roundtripper for keda integration tests
e3f667b
@creydr
creydr force-pushed the keda-deployer branch from e22bfe8 to e3f667b Compare January 28, 2026 17:27
@knative-prow-robot knative-prow-robot removed the needs-rebase Cannot be merged due to conflicts with HEAD. label Jan 28, 2026
creydr added 3 commits January 28, 2026 18:34
@creydr
Run ./hack/update-codegen.sh
0d76ef6
@creydr
Fix linter issue
8b19fd2
@creydr
Fix unit test for component version script
cf379c4
@knative-prow-robot knative-prow-robot added the needs-rebase Cannot be merged due to conflicts with HEAD. label Jan 28, 2026
creydr added 2 commits January 29, 2026 11:32
@creydr
Update to Keda HTTP Add-on 1.12
45189ab
@creydr
Merge remote-tracking branch 'knative/main' into keda-deployer
a48fb70
# Conflicts:
#	go.mod
#	go.sum
@knative-prow-robot knative-prow-robot removed the needs-rebase Cannot be merged due to conflicts with HEAD. label Jan 29, 2026
@creydr

creydr commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

infra issue
/test unit-tests

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@creydr creydr mentioned this pull request Jan 29, 2026
Clusterdomain is not configurable in Keda deployer #3403
Open
matejvasek
matejvasek reviewed Jan 29, 2026
View reviewed changes
Comment thread go.mod
module knative.dev/func

go 1.24.4
go 1.25.5

@matejvasek matejvasek Jan 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Is inclusion of the patch version necessary (can't we just have 1.25)?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@matejvasek matejvasek Jan 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Also what dependency required 1.25?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@creydr creydr Jan 29, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This came when I added the keda http-addon. This is on 1.25.5 (https://github.com/kedacore/http-add-on/blob/8f2e332219c3949d5b0098b9700fd3014c6c6429/go.mod#L3)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gauron99 gauron99 Jan 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I dont think we can bump if midstream is 1.24. This missmatch caused trouble in the past

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
matejvasek
matejvasek reviewed Jan 29, 2026
View reviewed changes
Comment thread pkg/deployer/testing/integration_test_helper.go Outdated
case keda.KedaDeployerName:
// use same in-cluster dialer as Kubernetes Deployer
fallthrough
case k8s.KubernetesDeployerName:

@matejvasek matejvasek Jan 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nit: I think this could be little bit verbose using comma:

case keda.KedaDeployerName, k8s.KubernetesDeployerName:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

creydr reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@creydr creydr Jan 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Simplified

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gauron99

gauron99 commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

I haven't found anything to change. Once the standing questions/discussions are resolved -- lgtm

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@creydr
Address review comments
08635b5
@matejvasek

matejvasek commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

/approve
/lgtm
/hold for others

creydr reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot assigned matejvasek Jan 30, 2026
@knative-prow knative-prow Bot added do-not-merge/hold 🤖 PR should not merge because someone has issued a /hold command. lgtm 🤖 PR is ready to be merged. labels Jan 30, 2026
@knative-prow

knative-prow Bot commented Jan 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, matejvasek

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:
  • OWNERS [matejvasek]

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot added the approved 🤖 PR has been approved by an approver from all required OWNERS files. label Jan 30, 2026
@gauron99

gauron99 commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

/lgtm

creydr reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot assigned gauron99 Jan 30, 2026
@creydr

creydr commented Jan 31, 2026

Copy link
Copy Markdown
Member Author

/unhold

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@knative-prow knative-prow Bot removed the do-not-merge/hold 🤖 PR should not merge because someone has issued a /hold command. label Jan 31, 2026
@knative-prow
knative-prow Bot merged commit 6d27714 into knative:main Jan 31, 2026
58 of 65 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@matejvasek matejvasek matejvasek left review comments
@dsimansk dsimansk Awaiting requested review from dsimansk
@jrangelramos jrangelramos Awaiting requested review from jrangelramos
@gauron99 gauron99 Awaiting requested review from gauron99
@lkingland lkingland Awaiting requested review from lkingland
+1 more reviewer
@linkvt linkvt linkvt left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@matejvasek matejvasek

@gauron99 gauron99

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/enhancement Feature additions or improvements to existing lgtm 🤖 PR is ready to be merged. size/XXL 🤖 PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Keda deployer

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@creydr @gauron99 @matejvasek @linkvt @knative-prow-robot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.