Skip to content

Commit

Permalink
Address linting
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Talerico aka rook <[email protected]>
  • Loading branch information
jtaleric committed Sep 5, 2024
1 parent 3244620 commit 73cfadb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
20 changes: 16 additions & 4 deletions pkg/k8s/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ func BuildSUT(client *kubernetes.Clientset, s *config.PerfScenarios) error {
return err
}
s.VMHost = host
WaitForVMI(s.KClient, clientAcrossRole)
err = WaitForVMI(s.KClient, clientAcrossRole)
if err != nil {
return err
}
s.ClientAcross, err = GetNakedPods(s.ClientSet, fmt.Sprintf("app=%s", clientAcrossRole))
if err != nil {
return err
Expand All @@ -335,7 +338,10 @@ func BuildSUT(client *kubernetes.Clientset, s *config.PerfScenarios) error {
return err
}
s.VMHost = host
WaitForVMI(s.KClient, clientAcrossRole)
err = WaitForVMI(s.KClient, clientAcrossRole)
if err != nil {
return err
}
s.ClientAcross, err = GetNakedPods(s.ClientSet, fmt.Sprintf("app=%s", clientAcrossRole))
if err != nil {
return err
Expand Down Expand Up @@ -435,7 +441,10 @@ func BuildSUT(client *kubernetes.Clientset, s *config.PerfScenarios) error {
if err != nil {
return err
}
WaitForVMI(s.KClient, serverRole)
err = WaitForVMI(s.KClient, serverRole)
if err != nil {
return err
}
s.ServerHost, err = GetNakedPods(s.ClientSet, fmt.Sprintf("app=%s", serverRole))
if err != nil {
return err
Expand All @@ -461,7 +470,10 @@ func BuildSUT(client *kubernetes.Clientset, s *config.PerfScenarios) error {
if err != nil {
return err
}
WaitForVMI(s.KClient, serverRole)
err = WaitForVMI(s.KClient, serverRole)
if err != nil {
return err
}
s.Server, err = GetNakedPods(s.ClientSet, fmt.Sprintf("app=%s", serverRole))
if err != nil {
return err
Expand Down
5 changes: 4 additions & 1 deletion pkg/k8s/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func SSHConnect(conf *config.PerfScenarios) (*goph.Client, error) {
}
key := fmt.Sprintf("%s/.ssh/id_rsa", dir)
keyd, err := os.ReadFile(key)
if err != nil {
return nil, fmt.Errorf("Unable to read key. Error : %s", err)
}
auth, err := goph.RawKey(string(keyd), "")
if err != nil {
return nil, fmt.Errorf("Unable to retrieve sshkey. Error : %s", err)
Expand Down Expand Up @@ -87,7 +90,7 @@ func createCommService(client *kubernetes.Clientset, label map[string]string, na
Spec: corev1.ServiceSpec{
Ports: []corev1.ServicePort{
{
Name: fmt.Sprintf("%s", name),
Name: name,
Protocol: corev1.ProtocolTCP,
NodePort: int32(sshPort),
TargetPort: intstr.Parse(fmt.Sprintf("%d", 22)),
Expand Down

0 comments on commit 73cfadb

Please sign in to comment.