Remove legacy Recipe and annotation-based Kubernetes controllers - #12952
Remove legacy Recipe and annotation-based Kubernetes controllers#12952willdavsmith wants to merge 2 commits into
Conversation
Remove the Recipe CRD, annotation-based Deployment onboarding, and admission webhook along with their exclusive helpers and Helm resources. Preserve deployment CRDs and Flux, add focused regression coverage, and document upgrade and migration risks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Unit Tests 2 files ± 0 461 suites ±0 6m 20s ⏱️ - 1m 16s Results for commit f2df271. ± Comparison against base commit fffca1e. This pull request removes 48 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12952 +/- ##
==========================================
- Coverage 59.82% 59.44% -0.38%
==========================================
Files 779 773 -6
Lines 46058 45097 -961
==========================================
- Hits 27552 26807 -745
+ Misses 18506 18290 -216 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Remove migration and historical notices as requested, and delete the unused legacy deletion helper flagged by CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
There was a problem hiding this comment.
🔵 Needs a closer look
The breaking controller and chart removal retains a CRD-rendering coverage gap, and upgrade behavior has not been exercised live.
Pull request overview
Removes legacy Recipe and annotation-based Kubernetes onboarding while retaining deployment-template, deployment-resource, and Flux workflows.
Changes:
- Removes legacy controllers, API/CRD, webhook infrastructure, TLS, RBAC, and tests.
- Updates controller configuration, Helm resources, network policies, and documentation.
- Preserves shared operation status types and retained controller functionality.
File summaries
| File | Summary |
|---|---|
test/functional-portable/kubernetes/noncloud/testdata/tutorial-environment.bicep |
Removes the obsolete Kubernetes onboarding fixture. |
test/functional-portable/kubernetes/noncloud/kubernetes_test.go |
Removes annotation-based onboarding coverage. |
pkg/controller/service.go |
Retains supported controllers, metrics, and health handling. |
pkg/controller/reconciler/util.go |
Retains shared utilities needed by supported controllers. |
pkg/controller/reconciler/util_test.go |
Updates utility tests after legacy removal. |
pkg/controller/reconciler/shared_test.go |
Updates shared test helpers and environment setup. |
pkg/controller/reconciler/recipe_webhook.go |
Removes the legacy Recipe webhook. |
pkg/controller/reconciler/recipe_webhook_test.go |
Removes Recipe webhook tests. |
pkg/controller/reconciler/recipe_reconciler.go |
Removes the Recipe reconciler. |
pkg/controller/reconciler/recipe_reconciler_test.go |
Removes Recipe reconciler tests. |
pkg/controller/reconciler/main_test.go |
Removes obsolete webhook test setup while retaining shared lifecycle handling. |
pkg/controller/reconciler/deployment_util.go |
Retains deployment utilities for supported workflows. |
pkg/controller/reconciler/deployment_util_test.go |
Updates deployment utility tests. |
pkg/controller/reconciler/deployment_reconciler.go |
Removes annotation-based deployment reconciliation. |
pkg/controller/reconciler/deployment_reconciler_test.go |
Removes annotation reconciler tests. |
pkg/controller/reconciler/const.go |
Removes legacy-only constants. |
pkg/controller/reconciler/connections.go |
Removes exclusive legacy connection helpers. |
pkg/controller/reconciler/annotations.go |
Removes annotation-based onboarding helpers. |
pkg/controller/reconciler/annotations_test.go |
Removes annotation helper tests. |
pkg/controller/api/radapp.io/v1alpha3/zz_generated.deepcopy.go |
Regenerates deepcopy code after Recipe removal. |
pkg/controller/api/radapp.io/v1alpha3/recipe_types.go |
Removes Recipe API types. |
pkg/controller/api/radapp.io/v1alpha3/operation_types.go |
Preserves shared operation status types. |
pkg/controller/api/radapp.io/v1alpha3/groupversion_info_test.go |
Verifies Recipe types are no longer registered. |
docs/architecture/service-interaction-map.md |
Documents the retained service interactions. |
docs/architecture/controller.md |
Documents the remaining controller responsibilities. |
deploy/Chart/values.yaml |
Removes obsolete webhook configuration references. |
deploy/Chart/tests/networkpolicies_test.yaml |
Tests UCP-only network policy targeting. |
deploy/Chart/tests/controller_test.yaml |
Tests retained controller resources and admission-resource removal. |
deploy/Chart/templates/networkpolicies.yaml |
Limits external control-plane ingress to UCP. |
deploy/Chart/templates/controller/validating-webhook-configuration.yaml |
Removes the validating webhook resource. |
deploy/Chart/templates/controller/service.yaml |
Removes webhook and TLS service wiring. |
deploy/Chart/templates/controller/rbac.yaml |
Removes exclusive webhook RBAC permissions. |
deploy/Chart/templates/controller/deployment.yaml |
Removes obsolete webhook deployment configuration. |
deploy/Chart/templates/controller/configmaps.yaml |
Removes obsolete webhook-related configuration. |
deploy/Chart/README.md |
Removes obsolete webhook references. |
deploy/Chart/crds/radius/radapp.io_recipes.yaml |
Removes the Recipe CRD. |
cmd/controller/controller-dev.yaml |
Removes obsolete controller certificate configuration. |
cmd/controller/cmd/root.go |
Removes controller certificate flags. |
build/scripts/start-radius.sh |
Removes obsolete webhook startup configuration. |
build/configs/controller.yaml |
Removes controller certificate configuration. |
Review note (moderate, 1 vote): deploy/Chart/tests/controller_test.yaml does not render crds/radius; add committed helm template --include-crds-equivalent coverage for the removed Recipe CRD and retained CRDs.
Review details
Files not reviewed (1)
- pkg/controller/api/radapp.io/v1alpha3/zz_generated.deepcopy.go: Generated file
Suppressed comments (1)
deploy/Chart/tests/controller_test.yaml:88
- The controller suite only renders
templates/controller/*(and this case renderscontroller/configmaps.yaml), so it never exercises the chart'scrds/radiusdirectory. A future reintroduction ofradapp.io_recipes.yamlwould therefore pass these tests even though the removed CRD is installed again; add a committedhelm template --include-crds-equivalent regression check that asserts the Recipe CRD is absent while the two retained CRDs remain.
- it: removes webhook server configuration
templates:
- controller/configmaps.yaml
- Files reviewed: 39/40 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Existing Recipe and Deployment finalizers need an upgrade cleanup path to prevent stuck deletions and orphaned resources.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- pkg/controller/api/radapp.io/v1alpha3/zz_generated.deepcopy.go: Generated file
- Files reviewed: 39/40 changed files
- Comments generated: 1
- Review effort level: Balanced
| Port: port, | ||
| CertDir: s.TLSCertDir, | ||
| })}) | ||
| }) |
Summary
Remove the Kubernetes onboarding flows scoped in #12204:
RecipeReconciler, annotation-basedDeploymentReconciler, andRecipeWebhook, including their exclusive helpers and tests.RecipeAPI type/CRD, admission webhook, webhook-only Service and TLS Secret, controller certificate configuration, and exclusive RBAC permissions.DeploymentTemplateReconciler,DeploymentResourceReconciler, andFluxController. Shared operation status types move tooperation_types.go; the retained deployment CRD schemas are unchanged. General Radius recipes and recipe packs are not removed.Reason for change
Implement the removal option described in #12204 without retaining unused controller and admission infrastructure.
This is a breaking change submitted for review. Existing usage, deprecation requirements, migration, and release timing still need maintainer agreement before merging.
Existing
Reciperesources would stop provisioning resources and refreshing connection Secrets. Plain Kubernetes Deployments would no longer be onboarded throughradapp.io/enabledand related annotations, including connection environment-variable injection. Bicep/ARM deployments and Flux GitOps remain supported.Helm does not delete CRDs installed from
crds/on upgrade. Existing Recipe objects and legacy finalizers can remain after the controllers are removed. Cleanup using the old controllers can delete backing resources and generated Secrets. This PR does not automatically migrate resources, delete existing CRDs, or strip finalizers. The existing explicit uninstall--purgecleanup entry is retained.Before release, coordinate updates in
radius-project/docsfordocs/content/reference/samples/helm/index.mdanddocs/content/reference/samples/tutorial-add-radius/index.md. Those cross-repository changes are not included here.Fixes #12204
How to test
Controller/envtest coverage passes, including after the review follow-up. The affected packages pass the repository-pinned golangci-lint v2.13.2; the unused deletion helper reported by CI was removed. The targeted Helm run passed 85 tests across three suites. Rendering the chart with
--include-crdsconfirmed that the Recipe CRD and admission resources are absent while both deployment CRDs remain. Regenerating controller API code and CRDs left the retained CRD manifests unchanged.No live-cluster functional or upgrade test has been performed locally. A pre-removal-to-new-version upgrade exercise is still needed before release, particularly for existing Recipe objects, generated Secrets, and legacy finalizers.
File change summary
pkg/controller/service.gopkg/controller/reconciler/{recipe_reconciler,recipe_webhook,deployment_reconciler,annotations,connections,deployment_util}.goand associated testspkg/controller/reconciler/{const,util,util_test,main_test,shared_test}.gopkg/controller/api/radapp.io/v1alpha3/{recipe_types,operation_types,zz_generated.deepcopy,groupversion_info_test}.gocmd/controller/cmd/root.go,cmd/controller/controller-dev.yaml,build/configs/controller.yaml,build/scripts/start-radius.shdeploy/Chart/crds/radius/radapp.io_recipes.yaml,deploy/Chart/templates/controller/*deploy/Chart/templates/networkpolicies.yaml,deploy/Chart/values.yaml,deploy/Chart/README.mddeploy/Chart/tests/{controller,networkpolicies}_test.yamltest/functional-portable/kubernetes/noncloud/kubernetes_test.go,test/functional-portable/kubernetes/noncloud/testdata/tutorial-environment.bicepdocs/architecture/{controller,service-interaction-map}.md