-
Notifications
You must be signed in to change notification settings - Fork 5
feat(resourcemanager): Remove auto-provision and unify org quota #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a71c432
feat(resourcemanager): Remove auto-provision and unify org quota
mattdjenkinson 2dd620b
feat(resourcemanager): Gate unified orgs behind UnifiedOrganizations …
mattdjenkinson e27a300
fix(config): Make legacy-organizations overlay build under kustomize
mattdjenkinson 3dd837e
chore: Remove accidental kustomize test file
mattdjenkinson c89fdea
fix: Include pkg/ in Docker build and drop envtest-only controller suite
mattdjenkinson cfa45bb
Merge branch 'main' into feat/unified-organizations
mattdjenkinson be60c47
fix(config): keep legacy quota policies as default service configuration
mattdjenkinson 4064e61
chore: regenerate RBAC manifests
mattdjenkinson a401906
Merge branch 'main' into feat/unified-organizations
scotwells cfc268a
Merge branch 'main' into feat/unified-organizations
mattdjenkinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,21 @@ | ||
| # Unified organizations overlay | ||
|
|
||
| Apply this kustomize component when `UnifiedOrganizations=true` on milo and datum | ||
| controller-managers. It replaces legacy personal/standard project quota grant | ||
| policies with a single 10-project policy for all organizations and removes the | ||
| personal organization display-name validation policy. | ||
|
|
||
| The default datum service configuration keeps legacy behavior so releases do not | ||
| require coordinated cutover across environments. Only environments that opt in | ||
| (staging first) should apply this overlay together with the feature gate. | ||
|
|
||
| ## Usage | ||
|
|
||
| Include as a component in your environment kustomization: | ||
|
|
||
| ```yaml | ||
| components: | ||
| - ../path/to/datum/config/overlays/unified-organizations | ||
| ``` | ||
|
|
||
| Ensure milo and datum controller-managers run with `UnifiedOrganizations=true`. |
31 changes: 31 additions & 0 deletions
31
config/overlays/unified-organizations/grant-policies/organization-project-quota-policy.yaml
This file contains hidden or 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,31 @@ | ||
| apiVersion: quota.miloapis.com/v1alpha1 | ||
| kind: GrantCreationPolicy | ||
| metadata: | ||
| name: organization-project-quota-policy | ||
| labels: | ||
| app.kubernetes.io/name: datum | ||
| app.kubernetes.io/component: quota-system | ||
| spec: | ||
| trigger: | ||
| resource: | ||
| apiVersion: resourcemanager.miloapis.com/v1alpha1 | ||
| kind: Organization | ||
| target: | ||
| resourceGrantTemplate: | ||
| metadata: | ||
| name: "default-project-quota" | ||
| namespace: "organization-{{ trigger.metadata.name }}" | ||
| labels: | ||
| quota.miloapis.com/auto-created: "true" | ||
| quota.miloapis.com/policy: "organization-project-quota-policy" | ||
| annotations: | ||
| kubernetes.io/description: "Project quota allocation for organization" | ||
| spec: | ||
| consumerRef: | ||
| apiGroup: resourcemanager.miloapis.com | ||
| kind: Organization | ||
| name: "{{ trigger.metadata.name }}" | ||
| allowances: | ||
| - resourceType: resourcemanager.miloapis.com/projects | ||
| buckets: | ||
| - amount: 10 |
This file contains hidden or 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,23 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1alpha1 | ||
| kind: Component | ||
|
|
||
| resources: | ||
| - grant-policies/organization-project-quota-policy.yaml | ||
|
|
||
| patches: | ||
| - path: remove-personal-grant-policy.yaml | ||
| target: | ||
| kind: GrantCreationPolicy | ||
| name: personal-organization-project-quota-policy | ||
| - path: remove-standard-grant-policy.yaml | ||
| target: | ||
| kind: GrantCreationPolicy | ||
| name: standard-organization-project-quota-policy | ||
| - path: remove-personal-org-name-vap.yaml | ||
| target: | ||
| kind: ValidatingAdmissionPolicy | ||
| name: disallow-personal-org-name-change | ||
| - path: remove-personal-org-name-vap-binding.yaml | ||
| target: | ||
| kind: ValidatingAdmissionPolicyBinding | ||
| name: disallow-personal-org-name-change |
5 changes: 5 additions & 0 deletions
5
config/overlays/unified-organizations/remove-personal-grant-policy.yaml
This file contains hidden or 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,5 @@ | ||
| $patch: delete | ||
| apiVersion: quota.miloapis.com/v1alpha1 | ||
| kind: GrantCreationPolicy | ||
| metadata: | ||
| name: personal-organization-project-quota-policy |
5 changes: 5 additions & 0 deletions
5
config/overlays/unified-organizations/remove-personal-org-name-vap-binding.yaml
This file contains hidden or 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,5 @@ | ||
| $patch: delete | ||
| apiVersion: admissionregistration.k8s.io/v1 | ||
| kind: ValidatingAdmissionPolicyBinding | ||
| metadata: | ||
| name: disallow-personal-org-name-change |
5 changes: 5 additions & 0 deletions
5
config/overlays/unified-organizations/remove-personal-org-name-vap.yaml
This file contains hidden or 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,5 @@ | ||
| $patch: delete | ||
| apiVersion: admissionregistration.k8s.io/v1 | ||
| kind: ValidatingAdmissionPolicy | ||
| metadata: | ||
| name: disallow-personal-org-name-change |
5 changes: 5 additions & 0 deletions
5
config/overlays/unified-organizations/remove-standard-grant-policy.yaml
This file contains hidden or 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,5 @@ | ||
| $patch: delete | ||
| apiVersion: quota.miloapis.com/v1alpha1 | ||
| kind: GrantCreationPolicy | ||
| metadata: | ||
| name: standard-organization-project-quota-policy |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should default to the existing behavior to prevent breaking changes on release. This lets us only modify the staging environment to enable the new functionality instead of having to coordinate between all environments.