Documentation
¶
Index ¶
- Constants
- func DefaultRecipePackID() string
- func EnsureDefaultResourceGroup(ctx context.Context, createOrUpdate ResourceGroupCreator) error
- func GetOrCreateDefaultRecipePack(ctx context.Context, client *corerpv20250801.RecipePacksClient) (string, error)
- func NewDefaultRecipePackResource() corerpv20250801.RecipePackResource
- type CoreTypesRecipeInfo
- type ResourceGroupCreator
Constants ¶
const ( // DefaultRecipePackResourceName is the name of the Radius provided // recipe pack resource that contains kubernetes recipes for all core resource types. DefaultRecipePackResourceName = "default" // DefaultResourceGroupName is the name of the default resource group where // the default recipe pack is created and looked up. DefaultResourceGroupName = "default" // DefaultResourceGroupScope is the full scope path for the default resource group. // default recipe pack that Radius provides always live in this scope. DefaultResourceGroupScope = "/planes/radius/local/resourceGroups/" + DefaultResourceGroupName )
Variables ¶
This section is empty.
Functions ¶
func DefaultRecipePackID ¶
func DefaultRecipePackID() string
DefaultRecipePackID returns the full resource ID of the default recipe pack in the default resource group scope.
func EnsureDefaultResourceGroup ¶
func EnsureDefaultResourceGroup(ctx context.Context, createOrUpdate ResourceGroupCreator) error
EnsureDefaultResourceGroup creates the default resource group if it does not already exist. This must be called before creating the default recipe pack, because recipe packs are stored in the default resource group and the PUT will fail with 404 if the group is missing. The group might be missing in a sequence such as below: 1. rad install 2. rad workspace create kubernetes 3. rad group create prod 4. rad group switch prod 5. .rad deploy <template contains the environment>
func GetOrCreateDefaultRecipePack ¶
func GetOrCreateDefaultRecipePack(ctx context.Context, client *corerpv20250801.RecipePacksClient) (string, error)
GetOrCreateDefaultRecipePack attempts to GET the default recipe pack from the default scope. If it doesn't exist (404), it creates it with all core resource type recipes. Returns the full resource ID.
func NewDefaultRecipePackResource ¶
func NewDefaultRecipePackResource() corerpv20250801.RecipePackResource
NewDefaultRecipePackResource creates a RecipePackResource containing recipes for all core resource types. This is the default recipe pack that gets injected into environments that have no recipe packs configured.
Types ¶
type CoreTypesRecipeInfo ¶
type CoreTypesRecipeInfo struct {
// ResourceType is the full resource type (e.g., "Radius.Compute/containers").
ResourceType string
// RecipeLocation is the OCI registry location for the recipe.
RecipeLocation string
}
CoreTypesRecipeInfo defines a recipe entry for a single resource type in the default recipe pack.
func GetCoreTypesRecipeInfo ¶
func GetCoreTypesRecipeInfo() []CoreTypesRecipeInfo
GetCoreTypesRecipeInfo returns recipe information for all core types. Each definition represents a recipe for one core resource type. The OCI tag is set to the current Radius version channel (e.g., "0.40" or "edge").
type ResourceGroupCreator ¶
type ResourceGroupCreator func(ctx context.Context, planeName string, resourceGroupName string, resource *ucpv20231001.ResourceGroupResource) error
ResourceGroupCreator is a function that creates or updates a Radius resource group. This is typically satisfied by ApplicationsManagementClient.CreateOrUpdateResourceGroup.