Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BNPbenchmark = &benchmark.Benchmark{ Run: func(tenant string, tenantNamespace string, kclient, tclient *kubernetes.Clientset) (bool, error) { podLabels := map[string]string{"test": "multi"} deploymentName := "deployment-" + string(uuid.NewUUID()) imageName := "image-" + string(uuid.NewUUID()) deployment := e2edeployment.NewDeployment(deploymentName, 1, podLabels, imageName, imageutils.GetE2EImage(imageutils.Nginx), "Recreate") _, err := tclient.AppsV1().Deployments(tenantNamespace).Create(context.TODO(), deployment, metav1.CreateOptions{DryRun: []string{metav1.DryRunAll}}) if err != nil { return false, err } svcSpec := util.ServiceConfig{"NodePort", podLabels} svc := util.CreateServiceSpec(svcSpec) _, err = kclient.CoreV1().Services(tenantNamespace).Create(context.TODO(), svc, metav1.CreateOptions{DryRun: []string{metav1.DryRunAll}}) if err == nil { return false, fmt.Errorf("Tenant must be unable to create service of type NodePort") } fmt.Println(err.Error()) return true, nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.