mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 12:36:39 +00:00
refactor(e2e): label selector for storage, ingress, podpriority classes
This commit is contained in:
@@ -35,12 +35,14 @@ var _ = Describe("when Tenant handles Ingress classes with extensions/v1beta1",
|
||||
},
|
||||
},
|
||||
IngressOptions: capsulev1beta2.IngressOptions{
|
||||
AllowedClasses: &api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"nginx",
|
||||
"haproxy",
|
||||
AllowedClasses: &api.SelectorAllowedListSpec{
|
||||
AllowedListSpec: api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"nginx",
|
||||
"haproxy",
|
||||
},
|
||||
Regex: "^oil-.*$",
|
||||
},
|
||||
Regex: "^oil-.*$",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -34,12 +34,14 @@ var _ = Describe("when Tenant handles Ingress classes with networking.k8s.io/v1"
|
||||
},
|
||||
},
|
||||
IngressOptions: capsulev1beta2.IngressOptions{
|
||||
AllowedClasses: &api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"nginx",
|
||||
"haproxy",
|
||||
AllowedClasses: &api.SelectorAllowedListSpec{
|
||||
AllowedListSpec: api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"nginx",
|
||||
"haproxy",
|
||||
},
|
||||
Regex: "^oil-.*$",
|
||||
},
|
||||
Regex: "^oil-.*$",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -33,10 +33,12 @@ var _ = Describe("when Tenant owner interacts with the webhooks", func() {
|
||||
Kind: "User",
|
||||
},
|
||||
},
|
||||
StorageClasses: &api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"cephfs",
|
||||
"glusterfs",
|
||||
StorageClasses: &api.SelectorAllowedListSpec{
|
||||
AllowedListSpec: api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"cephfs",
|
||||
"glusterfs",
|
||||
},
|
||||
},
|
||||
},
|
||||
LimitRanges: api.LimitRangesSpec{Items: []corev1.LimitRangeSpec{
|
||||
|
||||
@@ -30,9 +30,11 @@ var _ = Describe("enforcing a Priority Class", func() {
|
||||
Kind: "User",
|
||||
},
|
||||
},
|
||||
PriorityClasses: &api.AllowedListSpec{
|
||||
Exact: []string{"gold"},
|
||||
Regex: "pc\\-\\w+",
|
||||
PriorityClasses: &api.SelectorAllowedListSpec{
|
||||
AllowedListSpec: api.AllowedListSpec{
|
||||
Exact: []string{"gold"},
|
||||
Regex: "pc\\-\\w+",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -31,12 +31,14 @@ var _ = Describe("when Tenant handles Storage classes", func() {
|
||||
Kind: "User",
|
||||
},
|
||||
},
|
||||
StorageClasses: &api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"cephfs",
|
||||
"glusterfs",
|
||||
StorageClasses: &api.SelectorAllowedListSpec{
|
||||
AllowedListSpec: api.AllowedListSpec{
|
||||
Exact: []string{
|
||||
"cephfs",
|
||||
"glusterfs",
|
||||
},
|
||||
Regex: "^oil-.*$",
|
||||
},
|
||||
Regex: "^oil-.*$",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user