- this fixes the missing handling of `extended` in the
`ConvertLimitToResourceList`.
- it also brings over a fix to the mapping from rancher field names to kube
resource names. one of the improperly mapped fields was `limitsCpu`. This
is now properly mapped to `limits.cpu`.
this fix exposed a bug in the integration tests, where the test was written
to adhere to the original bogus behaviour. With `limitsCpu` written and
`limits.cpu` read by the test the actual data to expect was not seen, and 0
read. And expected for.
the test in question is now corrected.
note: tech debt against r/webhook
This adds the two namespaces "cattle-oidc-codes" and "cattle-oidc-client-secrets" to the system project which means they won't show up as not in a project.
* Sorts the tolerations in the Fleet cluster
This PR sorts all the tolerations passed to the Fleet clster in order to avoid unnecessary reconciliations and changes in Content resources.
Refers to: https://github.com/rancher/rancher/issues/52711
---------
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
* Fix nil pointer panic in dashboard plugin cache sync
Prevent panic when syncing filesystem cache with index entries that
contain nil values. The original code accessed index.Entries[chartName].Version
without checking if the entry or its embedded UIPluginEntry pointer
were nil.
Add defensive nil checks for both the map entry and the embedded
UIPluginEntry pointer before accessing the Version field. This handles
edge cases where concurrent operations or race conditions may leave
nil pointers in the index map.
Include test cases that verify the fix prevents panics when:
- Map contains nil entry values
- Entry has nil embedded UIPluginEntry pointer
Fixes the panic reported at line 140 in fscache.go where legitimate
cache sync operations would crash the controller.
* Refactor UIPluginEntry to value type
Change UIPluginEntry from pointer to value type to avoid nil pointer
panics and simplify cache sync logic.
* extended resource quota limits with map for arbitrary resources
updated conversion func to handle the new map
updated empty check to be epxlicit
note: the map[string]string makes the struct incomparable to go
* fixup: generated files
* fix type casting in handling of anyOther
* fix: missing handling of anyOther in back-conversion (resource list to resourceQuota)
beware: also fixes mishandling of the dotted resources (ex: limits.cpu) by the function
* feat: added basic unit tests for the conversion functions
* address comments: tweak name of new field
* address comment: simplify empty check, by means of reflection
* address comment: extended error message
* tweak name, `Extended` now.
* avoid updates if nothing would change
* fixup: duplicated import
* basic unit tests - setValidated, updateResourceQuota, updateDefaultLimitRange
* address comments
* Change from using clusterrolebinding to rolebinding
* Remove references to clusterrolebindings
* Use CreateOrUpdate helper function instead of just create
* Fix tests
* Fix error handling in namespace project cluster role update
* refactor: combine error handling into if statement
Simplify roleCli.Update() error handling in namespace_handler.go
The rancher-vsphere-csi/cpi charts were removed from rancher/charts,
because they were specific to RKE1.
One of the images in origins.go was only referenced to by these
charts. The RKE2 vsphere charts use a more recent image for the k8s
versions supported in 2.13.