Skip to content
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

Update documentation on resource quota limits #3932

Merged
merged 2 commits into from
Mar 8, 2022

Conversation

maxsokolovsky
Copy link
Contributor

Copy link
Contributor

@catherineluse catherineluse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@catherineluse
Copy link
Contributor

catherineluse commented Mar 7, 2022

@jtravee There's some more information about this in rancher/dashboard#5016 but it's complicated. To summarize the background context of these changes, I would say:

  • Currently in the Rancher UI, if you edit project quota limits or namespace default limits for a project, it will update existing namespaces in the project. This is not desired behavior and the UI is going to change so that only new namespaces are affected by editing resource quotas at the project level, not existing namespaces.
  • Currently in the Rancher UI, if you make a project resource quota, then you have namespaces within the project that have quotas adding up to the project quota, there's no resource capacity remaining in the project, so if you try to create a new namespace in the project, you see resource limits for that namespace are already set to zero or negative values in the namespace creation form in the UI. Because to set the default resource limits for new namespaces in the project, the UI first adds up all the limits for namespaces within the project, then compares that with the project resource quota. If there's any resources left in the project, then the default limit is that remainder or the default namespace quota, whichever is smaller. There are several UI tickets open to try to improve the user experience around this in the UI. How does the UI calculate the resource quota set for namespaces when a Project quota is enabled? dashboard#5016 (comment)
  • The user can create a namespace within a project by using kubectl, only if they add annotations about what project they want to put the namespace in. They can also use annotations to ask for resources to be allocated for the namespace. There is currently an open UI ticket where we want to stop using those annotations to calculate how many resources are left in a project, because those annotations only represent what was requested, not what was actually received. Stop rebalancing quotas on existing namespaces, stay consistent with back end and docs dashboard#5188

I hope that is enough context. These docs changes are basically capturing how the UI is supposed to work when the bugs are fixed, in an effort to keep the UI and the docs in sync.

@jtravee jtravee requested a review from btat March 8, 2022 14:09
Copy link
Contributor

@btat btat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the typo, LGTM.

@maxsokolovsky
Copy link
Contributor Author

Thanks for reviewing! I am not authorized to merge though, just FYI.

@btat
Copy link
Contributor

btat commented Mar 8, 2022

Thanks for reviewing! I am not authorized to merge though, just FYI.

I was told to hold on merging since Catherine still wanted to make some amendments. Once those are in we'll merge.

@@ -32,6 +34,24 @@ In the following diagram, a Rancher administrator wants to apply a resource quot

Let's highlight some more nuanced functionality. If a quota is deleted at the project level, it will also be removed from all namespaces contained within that project, despite any overrides that may exist. Further, updating an existing namespace default limit for a quota at the project level will not result in that value being propagated to existing namespaces in the project; the updated value will only be applied to newly created namespaces in that project. To update a namespace default limit for existing namespaces you can delete and subsequently recreate the quota at the project level with the new default value. This will result in the new default value being applied to all existing namespaces in the project.

Before creating a namespace in a project, Rancher compares the amounts of the project's available resources and requested resources (regardless of whether they come from the default or overriden limits).
If a new namespace, for any one resource, will exceed the remaining quota for it,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this sentence to "If the requested resources exceed the remaining capacity in the project for those resources, Rancher will assign the namespace the remaining capacity for that resource."

@@ -32,6 +34,24 @@ In the following diagram, a Rancher administrator wants to apply a resource quot

Let's highlight some more nuanced functionality. If a quota is deleted at the project level, it will also be removed from all namespaces contained within that project, despite any overrides that may exist. Further, updating an existing namespace default limit for a quota at the project level will not result in that value being propagated to existing namespaces in the project; the updated value will only be applied to newly created namespaces in that project. To update a namespace default limit for existing namespaces you can delete and subsequently recreate the quota at the project level with the new default value. This will result in the new default value being applied to all existing namespaces in the project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtravee this part about

Further, updating an existing namespace default limit for a quota at the project level will not result in that value being propagated to existing namespaces in the project;

This is the part I was thinking of that is not going to be technically true until this issue is fixed: rancher/dashboard#5188

Can you please open another docs issue that just says this paragraph about the nuanced functionality should be updated for v2.6.5? There are a number of UI issues related to project quotas with most being targeted for v2.6.5. https://github.com/rancher/dashboard/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Fproject-quota

@catherineluse
Copy link
Contributor

@btat I updated one little thing - i would say it's good to merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants