Skip to content

feat(hub/frontdoorbackend,member/serviceexport): [PATCH 08/08] L7 exp…#387

Open
rchincha wants to merge 1 commit into
Azure:mainfrom
rchincha:rchinchani/afd-08-frontdoorbackend
Open

feat(hub/frontdoorbackend,member/serviceexport): [PATCH 08/08] L7 exp…#387
rchincha wants to merge 1 commit into
Azure:mainfrom
rchincha:rchinchani/afd-08-frontdoorbackend

Conversation

@rchincha

Copy link
Copy Markdown

…ort path + AFD OriginGroup + AFD/ATM coexistence

Part 08 of an 8-patch split of #373. Closes the loop: member sensors resolve a Private Link Service ID for L7-marked exports, and the hub reconciler programs an AFD OriginGroup + Origins per eligible export.

Hub side:

  • pkg/controllers/hub/frontdoorbackend/controller.go — reconciles FrontDoorBackend CRs by watching eligible InternalServiceExports (Programmed=True, ExportMode=L7-FrontDoor, PLS ID present) and programming one AFD OriginGroup with one Origin per member cluster.
  • AFD/ATM coexistence guard: if a Service is already exported through ATM (TrafficManagerBackend), FrontDoorBackend is refused with reason=Conflict so a Service cannot be double-exported.
  • pkg/controllers/hub/frontdoorbackend/{suite_test,controller_integration_test}.go — envtest suite covering happy path (2 eligible exports), pending parent profile, and deletion cleanup.

Member side:

  • pkg/controllers/member/serviceexport/controller.go — adds L7 dispatch: when the Service is annotated with export-mode=L7-FrontDoor, resolve the Private Link Service ARM ID via cloud-provider-azure annotations and stamp it on the InternalServiceExport projection.
  • pkg/controllers/member/serviceexport/util.go — PLS lookup helper.
  • pkg/controllers/member/serviceexport/{controller_test,controller_integration_test,suite_test}.go — cover valid PLS annotations, invalid ExportMode, and PLS pending.
  • cmd/member-net-controller-manager/main.go — inject the PLS client into the serviceexport reconciler.

Fakes:

  • test/common/azurefrontdoor/fakeprovider/{origin,origingroup}.go — in-memory armcdn fakes for origin groups and origins.

Depends on all prior patches (01-07). Reconcilers registered against the manager created in PATCH 05.

Copilot-Session: a8fabc68-e113-49ef-b82d-d99a8502da11

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Requirements:

How has this code been tested

Special notes for your reviewer

…ort path + AFD OriginGroup + AFD/ATM coexistence

Part 08 of an 8-patch split of Azure#373. Closes the loop: member sensors
resolve a Private Link Service ID for L7-marked exports, and the hub
reconciler programs an AFD OriginGroup + Origins per eligible export.

Hub side:
- pkg/controllers/hub/frontdoorbackend/controller.go — reconciles
  FrontDoorBackend CRs by watching eligible InternalServiceExports
  (Programmed=True, ExportMode=L7-FrontDoor, PLS ID present) and
  programming one AFD OriginGroup with one Origin per member cluster.
- AFD/ATM coexistence guard: if a Service is already exported through
  ATM (TrafficManagerBackend), FrontDoorBackend is refused with
  reason=Conflict so a Service cannot be double-exported.
- pkg/controllers/hub/frontdoorbackend/{suite_test,controller_integration_test}.go
  — envtest suite covering happy path (2 eligible exports), pending
  parent profile, and deletion cleanup.

Member side:
- pkg/controllers/member/serviceexport/controller.go — adds L7 dispatch:
  when the Service is annotated with export-mode=L7-FrontDoor, resolve
  the Private Link Service ARM ID via cloud-provider-azure annotations
  and stamp it on the InternalServiceExport projection.
- pkg/controllers/member/serviceexport/util.go — PLS lookup helper.
- pkg/controllers/member/serviceexport/{controller_test,controller_integration_test,suite_test}.go
  — cover valid PLS annotations, invalid ExportMode, and PLS pending.
- cmd/member-net-controller-manager/main.go — inject the PLS client
  into the serviceexport reconciler.

Fakes:
- test/common/azurefrontdoor/fakeprovider/{origin,origingroup}.go —
  in-memory armcdn fakes for origin groups and origins.

Depends on all prior patches (01-07). Reconcilers registered against
the manager created in PATCH 05.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a8fabc68-e113-49ef-b82d-d99a8502da11
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.

1 participant