Skip to content

Commit e2185af

Browse files
zachsmith1claude
andcommitted
fix: add quota grants to e2e tests that create resources in project control planes
Add ResourceGrant setup steps to note-multicluster-subject and clusternote-multicluster-subject e2e tests so their projects have quota allocated for notes, configmaps, and secrets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7f5c1ec commit e2185af

4 files changed

Lines changed: 74 additions & 0 deletions

File tree

test/notes/clusternote-multicluster-subject/chainsaw-test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ spec:
5353
name: Ready
5454
value: 'true'
5555

56+
- name: setup-quota-grant
57+
description: Provision quota for the project so resources can be created
58+
cluster: project
59+
try:
60+
- apply:
61+
file: test-data/quota-grant.yaml
62+
- wait:
63+
apiVersion: quota.miloapis.com/v1alpha1
64+
kind: ResourceGrant
65+
name: test-clusternotes-quota-grant
66+
namespace: milo-system
67+
timeout: 30s
68+
for:
69+
condition:
70+
name: Active
71+
value: 'True'
72+
5673
- name: create-namespace-in-project
5774
description: Create cluster-scoped Namespace in project control plane
5875
cluster: project
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: quota.miloapis.com/v1alpha1
2+
kind: ResourceGrant
3+
metadata:
4+
name: test-clusternotes-quota-grant
5+
namespace: milo-system
6+
spec:
7+
consumerRef:
8+
apiGroup: resourcemanager.miloapis.com
9+
kind: Project
10+
name: cn-mc-test-project-1
11+
allowances:
12+
- resourceType: notes.miloapis.com/notes
13+
buckets:
14+
- amount: 100
15+
- resourceType: core.miloapis.com/configmaps
16+
buckets:
17+
- amount: 100
18+
- resourceType: core.miloapis.com/secrets
19+
buckets:
20+
- amount: 100

test/notes/note-multicluster-subject/chainsaw-test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ spec:
5252
name: Ready
5353
value: 'true'
5454

55+
- name: setup-quota-grant
56+
description: Provision quota for the project so resources can be created
57+
cluster: project
58+
try:
59+
- apply:
60+
file: test-data/quota-grant.yaml
61+
- wait:
62+
apiVersion: quota.miloapis.com/v1alpha1
63+
kind: ResourceGrant
64+
name: test-notes-quota-grant
65+
namespace: milo-system
66+
timeout: 30s
67+
for:
68+
condition:
69+
name: Active
70+
value: 'True'
71+
5572
- name: create-configmap-in-project
5673
description: Create ConfigMap resource in project control plane
5774
cluster: project
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: quota.miloapis.com/v1alpha1
2+
kind: ResourceGrant
3+
metadata:
4+
name: test-notes-quota-grant
5+
namespace: milo-system
6+
spec:
7+
consumerRef:
8+
apiGroup: resourcemanager.miloapis.com
9+
kind: Project
10+
name: note-mc-test-project-1
11+
allowances:
12+
- resourceType: notes.miloapis.com/notes
13+
buckets:
14+
- amount: 100
15+
- resourceType: core.miloapis.com/configmaps
16+
buckets:
17+
- amount: 100
18+
- resourceType: core.miloapis.com/secrets
19+
buckets:
20+
- amount: 100

0 commit comments

Comments
 (0)