-
Notifications
You must be signed in to change notification settings - Fork 81
bring quota conversion function up to par with work done in rancher/rancher #1192
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
base: main
Are you sure you want to change the base?
Conversation
note: copied from r/r todo: unify this and the origin code
|
I think we should have a test that asserts that the resource is passed through correctly? |
Yes, that is one of the todos |
And done (copied from the equivalent r/r tests) |
Validation TemplateContext:
Root CauseAs part of extending the rancher resource quota information with a field The first was dealt with with the original (already merged) PR rancher/rancher#52544 All functions originally simply parsed all fields as strings, into a kube What was fixed, or what change have occurredIn the original PR the function was extended to handle extended (sic!) This PR here has copied the function from r/r into the webhook. A copy was chosen because various attempts at importing the relevant package With this webhook now properly converts from quota to lists as well, instead of Areas or cases that should be testedVerify that Projects are properly stored, with or without data in the Verify that the dashboard is not broken by the change. |
Issue:
Companion to rancher/rancher#52773
Brings the changes to the conversion functions in r/r to the webhook as well.
The code is currently a copy instead of calling the unified function in r/r.
This works, is however also a tech debt.
Unification requires figuring out how to import
rancher/pkg/resourcequotainto the webhook.Problem
The webhook has to properly convert a rancher resource quota into a kube resource list, taking the new field
extendedinto account. The webhook's copy of equivalent functions in r/r was behind the times here.Solution
For now made a copy of the unified r/r function in the webhook.
CheckList