Coder Social home page Coder Social logo

Comments (14)

lizzzcai avatar lizzzcai commented on May 29, 2024 1

As a temporal solution maybe, can we allow adding label and annotation to the serving.

for example:

apiVersion: core.openfunction.io/v1alpha2
kind: Function
metadata:
  name: hello-world-go
  labels:
    environment: dev
spec:
  version: "v1.0.0"
  image: "lizzzcai/sample-go-func:v0.4.0"
  imageCredentials:
    name: push-secret
  port: 8080 # default to 8080
  build:
    builder: openfunction/builder:v1
    env:
      FUNC_NAME: "HelloWorld"
      FUNC_TYPE: "http"
    srcRepo:
      url: "https://github.com/lizzzcai/openfunction-samples.git"
      sourceSubPath: "hello-world-go"
  serving:
    runtime: Knative # default to Knative
    labels:
      environment: dev
    annotations:
      # knative
      autoscaling.knative.dev/minScale: "3"
      # dapr
      dapr.io/enabled: "true"
      dapr.io/app-id: "hello-world-go"

This can help for Knative serving backend. We can use knative annotations, and even enable dapr as well. Which can probably help this issue as well: #173

Once OpenFunction has its own abstracted parameters, you can overwrite the annotation for knative serving.

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024 1

@lizzzcai we'll add a unified param as serving top-level param to control this. Adding metadata like labels and annotations is another option, previously we have podspec as template https://github.com/OpenFunction/OpenFunction/blob/main/apis/core/v1alpha2/serving_types.go#L140 , but it doesn't contains metadata. @wanjunlei

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024 1

#181 address this issue by adding labels/annotations to pod metadata.
We also consider adding a unified param to control the concurrency of different runtimes later.

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024 1

Would it be appropriate to put the "hard limit" in the FAQ?

Sure, would you help to move FAQ in github to a FAQ section in https://openfunction.dev/docs/reference/ ?

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024 1

OK, then this issue can be closed by adding FAQ for both knative and dapr in https://openfunction.dev/docs/reference/faq

from openfunction.

lizzzcai avatar lizzzcai commented on May 29, 2024

for all these configs, are you planning to expose it as it is or have the OpenFunction own-defined parameters/annotations? like:
autoscaling.openfunction.io/target: "200" or openfunction.io/app-max-concurrency: "1"

then map to different annotations based on the serving engine used by the user.

openFunction has different serving engines. The users probably don't want to know and learn what is running underneath. Maybe it will be good if OpenFunction can abstract them and provide documentation for them.

And a global Config will be very useful as well.

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024

for all these configs, are you planning to expose it as it is or have the OpenFunction own-defined parameters/annotations? like: autoscaling.openfunction.io/target: "200" or openfunction.io/app-max-concurrency: "1"

then map to different annotations based on the serving engine used by the user.

openFunction has different serving engines. The users probably don't want to know and learn what is running underneath. Maybe it will be good if OpenFunction can abstract them and provide documentation for them.

And a global Config will be very useful as well.

Good Point, we'll considering this @tpiperatgod @wanjunlei

from openfunction.

tpiperatgod avatar tpiperatgod commented on May 29, 2024

If it is possible to pass these parameters through as much as possible I think it is the better solution, but maybe we have to use a high-level wrapper to handle them?

I will try to make a rough option first for reference and we can also talk about this in meeting.

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024

We need a proposal to add this option and a PR for that , @zhu733756 would you help on this?

from openfunction.

zhu733756 avatar zhu733756 commented on May 29, 2024

Yeah.

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024

Soft limit has been supported by the target annotation https://openfunction.dev/docs/concepts/function_scaling_trigger/, while hard limit is not supported yet

from openfunction.

tpiperatgod avatar tpiperatgod commented on May 29, 2024

Soft limit has been supported by the target annotation https://openfunction.dev/docs/concepts/function_scaling_trigger/, while hard limit is not supported yet

Would it be appropriate to put the "hard limit" in the FAQ?

from openfunction.

benjaminhuo avatar benjaminhuo commented on May 29, 2024

@tpiperatgod @wanjunlei can openfunction support adding dapr annotations mannually now?
to support https://docs.dapr.io/operations/configuration/control-concurrency/

image

from openfunction.

tpiperatgod avatar tpiperatgod commented on May 29, 2024

@tpiperatgod @wanjunlei can openfunction support adding dapr annotations mannually now? to support https://docs.dapr.io/operations/configuration/control-concurrency/

image

openfunction can support this

from openfunction.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.