Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination causing Dev Recipes to not be installed and Controller Pod permission fix #6466

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Launch Applications RP",
"type": "go",
Expand Down Expand Up @@ -83,11 +82,12 @@
{
"name": "Launch Control Plane (all)",
"configurations": [
"Launch UCP",
"Launch UCP",
sk593 marked this conversation as resolved.
Show resolved Hide resolved
"Launch Applications RP",
"Launch Controller",
"Launch Deployment Engine"],
"Launch Deployment Engine",
],
"stopAll": true
}
]
}
]
}
2 changes: 1 addition & 1 deletion deploy/Chart/templates/controller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rules:
- update
- watch
- apiGroups:
- rad.app
- radapp.io
resources:
- recipes
- recipes/status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Radius consists of a few processes that get deployed inside a Kubernetes cluster

The easiest way to get started is to launch Radius using VS Code. This will give you the ability to debug all of the processes. This workflow will run all of the Radius processes locally on your computer without containerizing them.

> ⚠️ The debugging setup provided by these instructions **does NOT** share its database with an installed copy of Radius. It will use a separate namespace to store data.
> ⚠️ The debugging setup provided by these instructions **does NOT** share its database with an installed copy of Radius. It will use a separate namespace to store data.

## Endpoints

Expand All @@ -27,15 +27,14 @@ If you need to manually test APIs you can reach them at the following endpoints

## Prerequisites

1. Create a Kubernetes cluster, or set your current context to a cluster you want to use. The debug configuration will use your current cluster for storing data.
2. Clone the `radius-project/radius` and `radius-project/deployment-engine` repo next to each other.
3. Run `git submodule update --init` in the `deployment-engine` repo
4. Install .NET 6.0 SDK - https://dotnet.microsoft.com/en-us/download/dotnet/6.0
5. Install C# VS Code extension - https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp
6. (Optional) Configure any cloud provider credentials you want to use for developing Radius.
1. Create a Kubernetes cluster, or set your current context to a cluster you want to use. The debug configuration will use your current cluster for storing data.
sk593 marked this conversation as resolved.
Show resolved Hide resolved
2. Clone the `radius-project/radius` and `radius-project/deployment-engine` repo next to each other.
3. Run `git submodule update --init` in the `deployment-engine` repo.
4. Install .NET 6.0 SDK - <https://dotnet.microsoft.com/en-us/download/dotnet/6.0>.
5. Install C# VS Code extension - <https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp>.
6. (Optional) Configure any cloud provider credentials you want to use for developing Radius.

> 💡 The Bicep deployment engine uses .NET. However you don't need to know C# or .NET to develop locally with Radius.

> 💡 Radius will use your locally configured Azure or AWS credentials. If you are able to use the `az` or `aws` CLI then you don't need to do any additional setup.

## Setup Step 1: Run `rad init`
Expand Down
10 changes: 9 additions & 1 deletion pkg/cli/cmd/radinit/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,19 @@ func (drc *devRecipeClient) GetDevRecipes(ctx context.Context) (map[string]map[s
tag = "latest"
}

// Temporary solution to get all repositories.
// The issue is that if RepositoryListPageSize is not specified the default is 100.
// We have 104 repositories in the registry as of 12 Oct 2023. That is why processRepositories
// function was being called twice and the second call was overwriting all the recipes.
// TODO: Remove this once we have a better solution.
reg.RepositoryListPageSize = 1000

recipes := map[string]map[string]corerp.RecipePropertiesClassification{}

// if repository has the correct path it should look like: <registryPath>/recipes/<category>/<type>:<tag>
// Ex: radius.azurecr.io/recipes/local-dev/rediscaches:0.20
err = reg.Repositories(ctx, "", func(repos []string) error {
// The start parameter is set to "radius-rp" because our recipes are after that repository.
err = reg.Repositories(ctx, "radius-rp", func(repos []string) error {
// validRepos will contain the repositories that have the requested tag.
validRepos := []string{}
for _, repo := range repos {
Expand Down
Loading