-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set qos policy for natgw Set qos policy for eip Rebuild qos of natgw when the natgw pod restarts Rebuild qos of eip when the natgw pod restarts Change qos policy of natgw Change qos policy of eip Update qos policy of eip Set specific ip qos policy of natgw Match Qos priority Create natgw with qos policy Create eip with qos policy
- Loading branch information
Showing
9 changed files
with
1,229 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package framework | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/kubeovn/kube-ovn/pkg/util" | ||
|
||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/kubernetes/test/e2e/framework" | ||
|
||
"github.com/onsi/gomega" | ||
) | ||
|
||
// ExecCommandInContainer executes a command in the specified container. | ||
func ExecCommandInContainer(f *Framework, podName, containerName string, cmd ...string) (string, string, error) { | ||
return util.ExecuteCommandInContainer(f.ClientSet, f.ClientConfig(), f.Namespace.Name, podName, containerName, cmd...) | ||
} | ||
|
||
// ExecShellInContainer executes the specified command on the pod's container. | ||
func ExecShellInContainer(f *Framework, podName, containerName string, cmd string) (string, string, error) { | ||
return ExecCommandInContainer(f, podName, containerName, "/bin/sh", "-c", cmd) | ||
} | ||
|
||
func execCommandInPod(ctx context.Context, f *Framework, podName string, cmd ...string) (string, string, error) { | ||
pod, err := f.PodClient().Get(ctx, podName, metav1.GetOptions{}) | ||
framework.ExpectNoError(err, "failed to get pod %v", podName) | ||
gomega.Expect(pod.Spec.Containers).NotTo(gomega.BeEmpty()) | ||
return ExecCommandInContainer(f, podName, pod.Spec.Containers[0].Name, cmd...) | ||
} | ||
|
||
// ExecShellInPod executes the specified command on the pod. | ||
func ExecShellInPod(ctx context.Context, f *Framework, podName string, cmd string) (string, string, error) { | ||
return execCommandInPod(ctx, f, podName, "/bin/sh", "-c", cmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.