Add function in payload instead of just metadata (#1919)

Passing information of function from router to executor is more efficient than calling the K8S API. This change does that instead of passing only metadata and then executor calling the K8S API again.
This commit is contained in:
Rahul Bhati
2021-03-10 14:52:23 +05:30
committed by GitHub
parent 853e4a7c04
commit ad5289f2ef
4 changed files with 8 additions and 20 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ func (fh functionHandler) getServiceEntryFromExecutor() (*url.URL, error) {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
service, err := fh.executor.GetServiceForFunction(ctx, &fh.function.ObjectMeta)
service, err := fh.executor.GetServiceForFunction(ctx, fh.function)
if err != nil {
statusCode, errMsg := ferror.GetHTTPError(err)
fh.logger.Error("error from GetServiceForFunction",