block_ns_quota

package
v0.0.0-...-edbd4c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BNQbenchmark = &benchmark.Benchmark{
	Run: func(tenant string, tenantNamespace string, kclient, tclient *kubernetes.Clientset) (bool, error) {
		resources := []util.GroupResource{
			{
				APIGroup: "",
				APIResource: metav1.APIResource{
					Name: "resourcequotas",
				},
			},
		}
		verbs := []string{"create", "update", "patch", "delete", "deletecollection"}
		for _, resource := range resources {
			for _, verb := range verbs {
				access, msg, err := util.RunAccessCheck(tclient, tenantNamespace, resource, verb)
				if err != nil {
					fmt.Println(err.Error())
				}
				if access {
					return false, fmt.Errorf(msg)
				}
			}
		}
		return true, nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL