Skip to content

Commit

Permalink
Adding configurable cpu requests/limit for the debug daemonset
Browse files Browse the repository at this point in the history
  • Loading branch information
edcdavid committed Jan 17, 2024
1 parent 5439207 commit 5bde1f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,8 @@ type TestParameters struct {
OmitArtifactsZipFile bool `split_words:"true" default:"false"`
EnableDataCollection bool `split_words:"true" envconfig:"ENABLE_DATA_COLLECTION" default:"false"`
EnableXMLCreation bool `split_words:"true" envconfig:"TNF_ENABLE_XML_CREATION" default:"false"`
DaemonsetCPUReq string `default:"100m" split_words:"true"`
DaemonsetCPULim string `default:"100m" split_words:"true"`
DaemonsetMemReq string `default:"100M" split_words:"true"`
DaemonsetMemLim string `default:"100M" split_words:"true"`
}
7 changes: 6 additions & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ func deployDaemonSet(namespace string) error {
matchLabels := make(map[string]string)
matchLabels["name"] = DaemonSetName
matchLabels["test-network-function.com/app"] = DaemonSetName
_, err := k8sPrivilegedDs.CreateDaemonSet(DaemonSetName, namespace, containerName, dsImage, matchLabels, debugPodsTimeout)
_, err := k8sPrivilegedDs.CreateDaemonSet(DaemonSetName, namespace, containerName, dsImage, matchLabels, debugPodsTimeout,
configuration.GetTestParameters().DaemonsetCPUReq,

Check failure on line 193 in pkg/provider/provider.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

too many arguments in call to k8sPrivilegedDs.CreateDaemonSet
configuration.GetTestParameters().DaemonsetCPULim,
configuration.GetTestParameters().DaemonsetMemReq,
configuration.GetTestParameters().DaemonsetMemLim,
)
if err != nil {
return fmt.Errorf("could not deploy tnf daemonset, err=%v", err)
}
Expand Down

0 comments on commit 5bde1f4

Please sign in to comment.