Skip to content

Commit

Permalink
Add quota-management-list-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kovayur committed Feb 15, 2024
1 parent b12e7b2 commit 7d2e98e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ SSO_REALM ?="rhoas" # update your realm here
GITOPS_CONFIG_FILE ?= ${PROJECT_PATH}/dev/config/gitops-config.yaml
DATAPLANE_CLUSTER_CONFIG_FILE ?= ${PROJECT_PATH}/dev/config/dataplane-cluster-configuration.yaml
PROVIDERS_CONFIG_FILE ?= ${PROJECT_PATH}/dev/config/provider-configuration.yaml
QUOTA_MANAGEMENT_LIST_CONFIG_FILE ?= ${PROJECT_PATH}/dev/config/quota-management-list-configuration.yaml

GO := go
GOFMT := gofmt
Expand Down Expand Up @@ -827,6 +828,7 @@ endif
-p MEMORY_LIMIT="$(MEMORY_LIMIT)" \
-p CENTRAL_DOMAIN_NAME="$(CENTRAL_DOMAIN_NAME)" \
-p SUPPORTED_CLOUD_PROVIDERS='$(shell yq .supported_providers $(PROVIDERS_CONFIG_FILE) -r -o=j -I=0)' \
-p REGISTERED_USERS_PER_ORGANISATION='$(shell yq .registered_users_per_organisation $(QUOTA_MANAGEMENT_LIST_CONFIG_FILE) -r -o=j -I=0)' \
| oc apply -f - -n $(NAMESPACE)
.PHONY: deploy/service

Expand Down
35 changes: 35 additions & 0 deletions dev/config/quota-management-list-configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# A list of registered users given by their usernames irrespective whether they are under an organisation or not.
# If a user is not in this or in the `registered_users_per_organisation` list, only EVAL dinosaur instances will be allowed.
# For now, this only supports RH service account.
# In the future it may support service accounts outside RH.
# The structure of registered service accounts is:
# - username: is the account of the user. The username must be unique
# - max_allowed_instances: is the maximum number of instances this user can create.
# Defaults to the global value of `max-allowed-instances` which has different values for distinct environments.
registered_service_accounts:
- username: [email protected]
max_allowed_instances: 1
- username: [email protected]
max_allowed_instances: 1
- username: [email protected]
max_allowed_instances: 1

# A list of registered users per organisation (see structure below). The list current contains known organisations - add yours if it is missing.
# If a user is not in this or in the `registered_service_accounts` list, only EVAL dinosaur instances will be allowed.
# - "id": is the organisation id
# - "any_user": "any_user": Controls whether to allow all users to create standard dinosaur instances with this organisation if "registered_users" list is empty.
# - max_allowed_instances: is the maximum number of instances this orgnisation. Defaults to the global value of `max-allowed-instances` which has different values for distinct environments.
# - "registered_users": A list of registered users for this organisation. If empty, no one is registered unless "any_user" is set to true.
# - username: is the account of the user. The username must be unique within the organisation and across organisations.
registered_users_per_organisation:
# The Red Hat employee org
- id: 11009103
any_user: true
max_allowed_instances: 50
registered_users: []
# Static token's org_id, see config/static-token-payload.json. Used in E2E tests.
- id: 16155304
any_user: true
max_allowed_instances: 100
registered_users: [ ]
2 changes: 1 addition & 1 deletion e2e/e2e_canary_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ var _ = Describe("Fleetshard-sync Targeted Upgrade", Ordered, func() {
It("delete central", func() {
Expect(deleteCentralByID(ctx, client, createdCentral.Id)).
To(Succeed())
Eventually(assertCentralRequestDeleting(ctx, client, createdCentral.Id)).
Eventually(assertCentralRequestDeprovisioning(ctx, client, createdCentral.Id)).
WithTimeout(waitTimeout).
WithPolling(defaultPolling).
Should(Succeed())
Expand Down

0 comments on commit 7d2e98e

Please sign in to comment.