Skip to content

Commit 7c225b6

Browse files
KockaAdmiralaccvetkovic
authored andcommitted
Implement NodePort and NodeAffinity for Dirigent.
Signed-off-by: Luka Simić <git@kocka.tech>
1 parent 6108987 commit 7c225b6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

pkg/common/trace_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ type DirigentMetadata struct {
8383
IOPercentage int `json:"IOPercentage"`
8484
EnvVars []string `json:"EnvVars"`
8585
ProgramArgs []string `json:"ProgramArgs"`
86+
NodeAffinity string `json:"NodeAffinity"`
87+
NodePort int `json:"NodePort"`
8688

8789
// dandelion only
8890
NumArgs int `json:"NumArgs"`

pkg/driver/deployment/dirigent.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ package deployment
22

33
import (
44
"fmt"
5-
log "github.com/sirupsen/logrus"
6-
"github.com/vhive-serverless/loader/pkg/common"
7-
"github.com/vhive-serverless/loader/pkg/config"
8-
"github.com/vhive-serverless/loader/pkg/driver/clients"
95
"io"
106
"math/rand"
117
"net"
@@ -16,6 +12,11 @@ import (
1612
"strings"
1713
"sync"
1814
"time"
15+
16+
log "github.com/sirupsen/logrus"
17+
"github.com/vhive-serverless/loader/pkg/common"
18+
"github.com/vhive-serverless/loader/pkg/config"
19+
"github.com/vhive-serverless/loader/pkg/driver/clients"
1920
)
2021

2122
type dirigentDeployer struct{}
@@ -172,6 +173,8 @@ func deployDirigentFunction(function *common.Function, imagePath string, control
172173
"num_args": {strconv.Itoa(metadata.NumArgs)},
173174
"num_rets": {strconv.Itoa(metadata.NumRets)},
174175
"requested_gpu": {strconv.Itoa(requestedGpu)},
176+
"node_affinity": {metadata.NodeAffinity},
177+
"node_port": {strconv.Itoa(metadata.NodePort)},
175178
}
176179

177180
if busyLoopOnColdStart {

0 commit comments

Comments
 (0)