Skip to content

Conversation

@nithyatsu
Copy link
Contributor

@nithyatsu nithyatsu commented Sep 3, 2025

@nithyatsu nithyatsu marked this pull request as ready for review September 10, 2025 17:55
@nithyatsu nithyatsu requested review from a team as code owners September 10, 2025 17:55
@nithyatsu nithyatsu changed the title Recipe packs Recipe packs (WIP) Sep 10, 2025
Comment on lines 38 to 44
#### Registering several recipes to an environment

As an operator I am responsible for creating Radius Environments using which developers can deploy their applications. As part of creating the environment, I manually link recipes one by one using `rad recipe register` or by updating the environment definition. This can be error prone when there are many recipes and environments. Radius should provide a way to bulk register (and manage) recipes.

#### Registering recipes to multiple environments

As an operator I am responsible for creating Radius Environments using which developers can deploy their applications. As part of creating the environment, I manually link recipes one by one using `rad recipe register` or by updating the environment definition. I have 100s of environments which mostly use the same recipes. Piecing the same recipes together for each environment feels like rework.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two scenarios describe the current state rather than scenarios that will be implemented by this design.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

@nithyatsu nithyatsu changed the title Recipe packs (WIP) Recipe packs Sep 18, 2025
Copy link
Contributor

@zachcasper zachcasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looked good except for the approach to versioning.

Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
Signed-off-by: nithyatsu <[email protected]>
We could delete recipe-packs that are not referenced by any environment in any resource-group. If referenced by environments, the delete should also update the environment to not have the recipepack ID in its list of recipe packs. Allowance of recipe pack deletion when there are resources refering to it is in parity with today's recipe behavior.
By default, delete looks for recipe-pack in current group. It should take in optional scope to delete recipe packs in Other scope.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willtsai @zachcasper pls review. This is the behavior for recipe-packs, based on our decision to drop tagging support

Comment on lines +565 to +568
RESOURCE TYPE RECIPE KIND RECIPE LOCATION RECIPE PARAMETERS
Radius.Compute/containers terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48 allowPlatformOptions(bool)
Radius.Security/secrets terraform https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets?ref=v0.48
Radius.Storage/volumes terraform https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes?ref=v0.48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RESOURCE TYPE RECIPE KIND RECIPE LOCATION RECIPE PARAMETERS
Radius.Compute/containers terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48 allowPlatformOptions(bool)
Radius.Security/secrets terraform https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets?ref=v0.48
Radius.Storage/volumes terraform https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes?ref=v0.48
RESOURCE TYPE RECIPE KIND RECIPE LOCATION
Radius.Compute/containers terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48
PARAMETERS:
- allowPlatformOptions: true
Radius.Security/secrets terraform https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets?ref=v0.48
Radius.Storage/volumes terraform https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes?ref=v0.48

Parameters are not going to fit past the URL.

Comment on lines +189 to +192
@doc("Description of what this recipe pack provides")
description?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@doc("Description of what this recipe pack provides")
description?: string;

Why does RecipePacks have a description property when no other Radius resource have a description? I do not see a use case for why this is needed. It's not used anywhere else in this design.

Comment on lines +574 to +580
$ rad recipe-pack list [-g mygroup]
Lists all recipe packs in all scopes.
RESOURCE TYPE GROUP STATE
computeRecipePack Radius.Core/recipePacks default Succeeded
dataRecipePack Radius.Core/recipePacks default Succeeded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ rad recipe-pack list [-g mygroup]
Lists all recipe packs in all scopes.
RESOURCE TYPE GROUP STATE
computeRecipePack Radius.Core/recipePacks default Succeeded
dataRecipePack Radius.Core/recipePacks default Succeeded
$ rad recipe-pack list
RECIPE PACK GROUP
computeRecipePack default
dataRecipePack default
myCustomPack1 myGroup1
myCustomPack2 myGroup2

Let's keep the UI as clean as possible. Example shown to emphasize that list should return all RecipePacks from all Resource Groups.

Comment on lines +562 to +563
RESOURCE TYPE GROUP
computeRecipePack Radius.Core/recipePacks default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RESOURCE TYPE GROUP
computeRecipePack Radius.Core/recipePacks default
RECIPE PACK GROUP
computeRecipePack default

dataRecipePack Radius.Core/recipePacks default Succeeded
```

if -g is provided, list recipe packs in that scope.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if -g is provided, list recipe packs in that scope.
if --group or -g is provided, results are filtered for the specified Resource Group.

Comment on lines +603 to +605
We could delete recipe-packs that are not referenced by any environment in any resource-group. If referenced by environments, the delete should also update the environment to not have the recipepack ID in its list of recipe packs. Allowance of recipe pack deletion when there are resources refering to it is in parity with today's recipe behavior.
By default, delete looks for recipe-pack in current group. It should take in optional scope to delete recipe packs in Other scope.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We could delete recipe-packs that are not referenced by any environment in any resource-group. If referenced by environments, the delete should also update the environment to not have the recipepack ID in its list of recipe packs. Allowance of recipe pack deletion when there are resources refering to it is in parity with today's recipe behavior.
By default, delete looks for recipe-pack in current group. It should take in optional scope to delete recipe packs in Other scope.
The delete command deletes the Recipe Pack and removes the Recipe Pack from all existing Environments. Because the Recipe is stored on each resource's status property, Radius retains details of the actual Recipe used to deploy the resource. Therefore, deleting a Recipe Pack only impacts the ability to deploy new resources using the referenced Recipes. This is in parity with today's Recipe behavior.
By default, delete looks for Recipe Packs in the current Resource Group. Users can also specify the --group or -g parameter to reference a different Resource Group.

Rewrote for clarity, but no actual changes.

Comment on lines +585 to +595
4. Show environment

```
$ rad environment show my-env
RESOURCE TYPE GROUP STATE
my-env Radius.Core/environments default Succeeded

RECIPE PACKS
computeRecipePack
dataRecipePack
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Show environment
```
$ rad environment show my-env
RESOURCE TYPE GROUP STATE
my-env Radius.Core/environments default Succeeded
RECIPE PACKS
computeRecipePack
dataRecipePack
```

Duplicate with line 634.

Comment on lines +633 to +641
```
$ rad environment show my-env
RESOURCE TYPE GROUP STATE
my-env Radius.Core/environments default Succeeded

RECIPE PACK
computeRecipePack
dataRecipePack
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
$ rad environment show my-env
RESOURCE TYPE GROUP STATE
my-env Radius.Core/environments default Succeeded
RECIPE PACK
computeRecipePack
dataRecipePack
```
$ rad environment show my-env
ENVIRONMENT GROUP
my-env default
KUBERNETES
Namespace: my-env
AWS:
Account ID: 1234567890123
Region: us-east-1
AZURE:
Subscription ID: c95e0456-ea5b-4a22-a0cd-e3767f24725b
Resource Group Name: myResourceGroup
RECIPE PACKS GROUP
computeRecipePack default
dataRecipePack default
myCustomPack1 myGroup1
myCustomPack2 myGroup2

Comment on lines +646 to +652
$ rad recipe list -environment my-env
RECIPE PACK RESOURCE TYPE RECIPE KIND RECIPE LOCATION
computeRecipePack Radius.Compute/containers terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48
computeRecipePack Radius.Security/secrets terraform https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets?ref=v0.48
computeRecipePack Radius.Storage/volumes terraform https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes?ref=v0.48
dataRecipePack Radius.Data/redisCaches terraform https://github.com/project-radius/resource-types-contrib.git//recipes/data/redisCaches?ref=v0.48
networkingRecipePack Radius.Compute/gateways terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/gateways?ref=v0.48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ rad recipe list -environment my-env
RECIPE PACK RESOURCE TYPE RECIPE KIND RECIPE LOCATION
computeRecipePack Radius.Compute/containers terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48
computeRecipePack Radius.Security/secrets terraform https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets?ref=v0.48
computeRecipePack Radius.Storage/volumes terraform https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes?ref=v0.48
dataRecipePack Radius.Data/redisCaches terraform https://github.com/project-radius/resource-types-contrib.git//recipes/data/redisCaches?ref=v0.48
networkingRecipePack Radius.Compute/gateways terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/gateways?ref=v0.48
$ rad recipe list -environment my-env
RECIPE PACK GROUP RESOURCE TYPE RECIPE KIND RECIPE LOCATION
computeRecipePack default Radius.Compute/containers terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/containers/kubernetes?ref=v0.48
computeRecipePack default Radius.Security/secrets terraform https://github.com/project-radius/resource-types-contrib.git//recipes/security/secrets?ref=v0.48
computeRecipePack default Radius.Storage/volumes terraform https://github.com/project-radius/resource-types-contrib.git//recipes/storage/volumes?ref=v0.48
dataRecipePack default Radius.Data/redisCaches terraform https://github.com/project-radius/resource-types-contrib.git//recipes/data/redisCaches?ref=v0.48
networkingRecipePack default Radius.Compute/gateways terraform https://github.com/project-radius/resource-types-contrib.git//recipes/compute/gateways?ref=v0.48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants