feat(anc): use gRPC as the check-hotfix live-patching transport - #9050
Draft
Devinwong wants to merge 1 commit into
Draft
feat(anc): use gRPC as the check-hotfix live-patching transport#9050Devinwong wants to merge 1 commit into
Devinwong wants to merge 1 commit into
Conversation
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 27, 2026 19:31
93a27f7 to
615f423
Compare
Devinwong
changed the base branch from
devinwong/anc-check-hotfix-configmap
to
main
July 27, 2026 19:31
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 27, 2026 19:46
91ba500 to
227948c
Compare
Contributor
Windows Unit Test Results 3 files 12 suites 48s ⏱️ Results for commit 6dd0bb4. ♻️ This comment has been updated with latest results. |
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 27, 2026 21:19
c024ebf to
266d036
Compare
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 27, 2026 21:31
266d036 to
b4f6df3
Compare
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 27, 2026 21:39
b4f6df3 to
df712e0
Compare
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 30, 2026 21:55
df712e0 to
e0e8bd1
Compare
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 30, 2026 22:12
e0e8bd1 to
be7f328
Compare
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 30, 2026 22:21
be7f328 to
84b0eb3
Compare
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 30, 2026 22:26
84b0eb3 to
5207157
Compare
…ng contract Switch the check-hotfix subcommand's live-patching-service fetch from the HTTP-over-SNI placeholder (which never ran against a real server) to the gRPC GetComponentConfig contract. Rather than define a second copy of that contract, reuse the shared akslivepatching.v1.LivePatchingService generated stubs from the aks-live-patching module (the agreed cross-team contract), wired in via a local replace directive. The transport dials the apiserver front on the cluster FQDN with TLS verified against the on-disk cluster CA and SNI pinned to the live-patching host, carries the IMDS attested-data document in gRPC request metadata, and maps gRPC status codes onto the existing benign-vs-fatal taxonomy. check-hotfix remains fail-open (always exits 0): until a real gRPC endpoint serves, it is a no-op on every node that stages nothing and never blocks provisioning. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed2dd633-00bb-4b3b-885b-9741b917a0a0
Devinwong
force-pushed
the
devinwong-anc-hotfix-grpc-shared-contract
branch
from
July 31, 2026 19:29
5207157 to
6dd0bb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Switch the aks-node-controller
check-hotfixfetch from an HTTP-over-SNI placeholder to gRPC, and make gRPC the only transport. Single-purpose: transport only. The old HTTP path never ran against a real server, so dropping it carries no compatibility risk.This is the node/client half of the live-patching path. The proxy/server half (kube-api-proxy Envoy routing to the live-patching service) is already merged separately, so this client is written to match that route.
Flow
flowchart LR A[check-hotfix<br/>node client] -->|1. IMDS GET| B[IMDS attested doc] A -->|2. GetComponentConfig<br/>SNI = apiserver FQDN + ALPN aks-live-patching<br/>token in gRPC metadata| C[kube-api-proxy envoy] C -->|ALPN-routed| D[live-patching service] D -->|config bytes| A A -->|3. parse + stage pointer| E[on-disk hotfix pointer] E -->|read unchanged| F[download-hotfix]Key points
Shared contract, one source of truth. Reuses the
akslivepatching.v1.LivePatchingServicestubs from theaks-live-patchingmodule (the agreed cross-team contract), wired in via a localreplacedirective. No proto or generated code is added in this module.ALPN-based routing (matches the merged proxy route). The client dials the cluster apiserver FQDN as SNI -- riding the existing apiserver egress rule, no special SNI host -- and advertises ALPN
["aks-live-patching", "h2"]. The kube-api-proxy Envoy selects its live-patching filter chain by that ALPN value and forwards the stream to the service. TLS is verified against the on-disk cluster CA.Auth. The IMDS attested-data document rides in gRPC request metadata (the analogue of the old HTTP bearer header).
Unchanged. The parse/stage path, the on-disk pointer file read by
download-hotfix, and thehotfixConfigtype all stay exactly as onmain.check-hotfixremains fail-open (always exits 0).Error mapping (gRPC status -> existing taxonomy):
Unauthenticated/PermissionDenied/NotFoundInvalidArgument/ResourceExhaustedUnavailable/DeadlineExceeded/Internal, transport errorsPlaceholders pending the finalized service contract
ancComponentName(component_namevalue) -- defaults toaks-node-controller.lpsAttestedMetadataKey(metadata key for the attested-data document).Tests
checkhotfix_grpc_test.gouses an in-process bufconn mock of the sharedLivePatchingService: success, benign codes (no-op),Unavailable(fallback),InvalidArgument(no fallback), and fail-open exit 0.go build ./...andgo vetclean. Remaining test failures are pre-existing and environment-specific (need a Linux/etc/os-release+ shell); they fail identically onmainand pass in Linux CI.Draft / POC.