Feature request per pod (#1946)
This feature enables routing more than one request to a pod at the same time. This is the first draft of the work and might involve more optimizations later.
This commit is contained in:
@@ -35,7 +35,7 @@ func Commands() *cobra.Command {
|
||||
flag.FnEnvName, flag.FnEntryPoint, flag.FnPkgName,
|
||||
flag.FnExecutorType, flag.FnCfgMap, flag.FnSecret,
|
||||
flag.FnSpecializationTimeout, flag.FnExecutionTimeout,
|
||||
flag.FnIdleTimeout, flag.FnConcurrency,
|
||||
flag.FnIdleTimeout, flag.FnConcurrency, flag.FnRequestsPerPod,
|
||||
|
||||
// TODO retired pkg & trigger related flags from function cmd
|
||||
flag.PkgCode, flag.PkgSrcArchive, flag.PkgDeployArchive,
|
||||
@@ -86,7 +86,7 @@ func Commands() *cobra.Command {
|
||||
flag.FnEnvName, flag.FnEntryPoint, flag.FnPkgName,
|
||||
flag.FnExecutorType, flag.FnSecret, flag.FnCfgMap,
|
||||
flag.FnSpecializationTimeout, flag.FnExecutionTimeout,
|
||||
flag.FnIdleTimeout, flag.FnConcurrency,
|
||||
flag.FnIdleTimeout, flag.FnConcurrency, flag.FnRequestsPerPod,
|
||||
|
||||
flag.PkgCode, flag.PkgSrcArchive, flag.PkgDeployArchive,
|
||||
flag.PkgSrcChecksum, flag.PkgDeployChecksum, flag.PkgInsecure,
|
||||
|
||||
@@ -102,6 +102,8 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
fnConcurrency = input.Int(flagkey.FnConcurrency)
|
||||
}
|
||||
|
||||
requestsPerPod := input.Int(flagkey.FnRequestsPerPod)
|
||||
|
||||
pkgName := input.String(flagkey.FnPackageName)
|
||||
|
||||
secretNames := input.StringSlice(flagkey.FnSecret)
|
||||
@@ -301,6 +303,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
FunctionTimeout: fnTimeout,
|
||||
IdleTimeout: &fnIdleTimeout,
|
||||
Concurrency: fnConcurrency,
|
||||
RequestsPerPod: requestsPerPod,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,10 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error {
|
||||
function.Spec.Concurrency = input.Int(flagkey.FnConcurrency)
|
||||
}
|
||||
|
||||
if input.IsSet(flagkey.FnRequestsPerPod) {
|
||||
function.Spec.RequestsPerPod = input.Int(flagkey.FnRequestsPerPod)
|
||||
}
|
||||
|
||||
if len(pkgName) == 0 {
|
||||
pkgName = function.Spec.Package.PackageRef.Name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user