Help us shape the future of Go! Take the 2026 Go Developer Survey

recipepack

package
v0.62.0-rc.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
const ResourceType = "Radius.Core/recipePacks"

ResourceType is the resource type of a recipe pack.

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 from NewDefaultRecipePackResource. Returns the full resource ID.

func NewDefaultRecipePackResource

func NewDefaultRecipePackResource() (corerpv20250801.RecipePackResource, error)

NewDefaultRecipePackResource creates the default recipe pack that gets injected into environments that have no recipe packs configured. It is the Kubernetes recipe pack embedded from the resource-types-contrib revision pinned in deploy/manifest/defaults.yaml, as authored upstream; see defaults.DefaultKubernetesRecipePack.

The only change rad makes is the tag of each recipe source, which is replaced with the tag for this build's channel; see resolveRecipeTag.

func NormalizeRecipePacks added in v0.60.0

func NormalizeRecipePacks(recipePacks []string) []string

NormalizeRecipePacks splits comma-separated values, trims whitespace, and removes empty entries and duplicates while preserving the first-seen order. Deduplication avoids redundant referencedBy sync work and prevents server-side recipe pack conflict validation from failing on repeated entries.

func NotFoundError added in v0.60.0

func NotFoundError(recipePack string, recipePackID resources.ID, isFullID bool) error

NotFoundError builds the error returned when a recipe pack passed to --recipe-packs cannot be found. When the user supplied a bare name, the message names the resource group that was searched and shows how to reference a pack in another resource group.

func RefExists added in v0.60.0

func RefExists(environmentRefs []*string, id string) bool

RefExists reports whether id is present in the referencedBy list.

func ResolveID added in v0.60.0

func ResolveID(recipePack string, workspaceScope string) (id resources.ID, isFullID bool, err error)

ResolveID resolves a recipe pack reference to a full resource ID. The reference may be a full recipe pack resource ID, in which case it is used as-is and isFullID is true, or a bare name, which is scoped to workspaceScope. A value that parses as a resource ID but is not a Radius.Core/recipePacks resource is rejected, so that a mistyped ID of another type is not silently looked up as a recipe pack name.

Types

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL