Skip to content

Commit

Permalink
Implementation of resource providers and resource types registration
Browse files Browse the repository at this point in the history
This change implements the API functionality for registering resource providers and related child-types through the Radius API. This is the first step towards making the Radius API surface extensible. For this first step there is no consumer of this data or these APIs. Subsequent changes will consume the data and implement the user-facing functionality.

What's possible in this commit:

- CRUDL operations on resource provider and related types like:
  - resource type
  - api version (child of resource type)
  - location

Additionally, this change implements the resource provider "summary" API. The summary API provides a combined view of the most useful data from each resource provider and its children.

---

For reviewers there are a few important notes:

- Routing in UCP is complex, and error prone to work on. I abandoned the existing code and rewrote it in a form that's more native to go-chi. This was a significant improvement and made it much easier to debug the code. UCP has good integration tests so I'm not very concerned about regressions.
- This is our first use-case for child resources in Radius. I used the async controllers to implement cascading deletion.
- The "summary" API uses cached data. The async controllers for resource provider and other types update the cache. This is our first use of this pattern, but it felt right to me.

Signed-off-by: Ryan Nowak <[email protected]>
  • Loading branch information
rynowak committed Nov 4, 2024
1 parent 2bc71ab commit f061d6d
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright 2023 The Radius Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package resourceproviders

0 comments on commit f061d6d

Please sign in to comment.