Conversation
Function is FaaS vocabulary that mismatches Skipper's behavior -- Skipper routes traffic to tenant-supplied pods, it does not invoke code. Internal Go now uses Assignment throughout: AssignmentHash, AssignmentFromHeader, AssignmentKey, file renames in internal/skipper and internal/fixture, web UI internal types, fixture helpers, doc- rendering machinery, and the pod-read helper. The K8s pod-annotation surface dual-writes both skipper/function and skipper/assignment on every assigned pod, and the read path prefers skipper/assignment with fallback to skipper/function. Dual-write is required for rolling-deploy safety: a controller running pre-rename code that observed a pod carrying only skipper/assignment would treat it as unassigned and trigger cleanup. The cleanup followup plan removes the legacy write after one full deploy plus a deprecation window. Two typed keys exist now: LegacyFunctionKey (Name "function", emits the legacy header / label / OTel / slog vocabulary) and AssignmentKey (Name "assignment"). Phase 1 leaves every existing emission site pointed at LegacyFunctionKey -- HTTP header read, Prometheus label, OTLP attr, slog identity-group, CLI flag, web URL paths, and user- visible UI labels all still emit / accept function- form. The lone exception is the K8s annotation write, which dual-writes via both keys' PatchAnnotation. Phase 2 introduces dual-emit for HTTP header and telemetry; Phase 3 covers CLI flags and web URLs. The proto rename is binary-wire-safe: field tag numbers stay stable, so mixed-version controller / router gRPC interoperates throughout the migration.
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced May 7, 2026
This branch has not been deployed
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.
Functionis FaaS vocabulary that mismatches Skipper's behavior. Skipper does not invoke code -- it routes traffic to tenant-supplied pods. The misnomer is most visible atx-skipper-function, the header tenants set on every request, and it leaks into the type vocabulary that contributors learn first.Assignmentdescribes what the carrier actually represents: the binding of a pod to a tenant for a request.The rename also clears the way for a follow-up redesign that adds a per-tenant policy surface (heartbeat timeout, retry policy, HPA tolerance, assign timeout, token TTL, transport, zone awareness) on the same carrier -- those are stuck as cluster-wide flags today, with no natural home on
Function. This PR does not touch the policy surface; it sets up the vocabulary the next round of work builds on.This PR is the internal rename plus K8s annotation dual-support. External surfaces (HTTP header, Prometheus labels, OTLP attrs, slog keys, CLI flags, web URL paths, user-visible UI labels) deliberately stay on legacy
function-form here -- follow-up PRs introduce dual-support for each so tenant SDKs, dashboards, and operator manifests can migrate at their own pace.The one external surface this PR changes is K8s pod annotations: the controller now dual-writes both
skipper/functionandskipper/assignmenton every assigned pod, and the read path prefers the new key with fallback to the legacy. Dual-write is required for rolling-deploy safety -- a controller running pre-rename code observing a pod that carries onlyskipper/assignmentwould treat it as unassigned and trigger cleanup. Removal of the legacy write is sequenced for a release boundary after one full deploy plus a deprecation window.Two typed keys live side by side:
LegacyFunctionKey(Name"function", used by every existing emission site this PR touches) andAssignmentKey(Name"assignment", declared but only wired into the K8s annotation write). Subsequent PRs routeAssignmentKeythrough HTTP header dual-parse and telemetry dual-emit, then CLI flags and web URLs.The proto rename is binary-wire-safe: field tag numbers stay stable, so mixed-version controller / router gRPC interoperates throughout the migration.
Test plan
dev test -short ./...-- 1216 pass, 34 skippeddev lintcleandev kube-lintcleaninternal/skipper/testdata/json.goldenregenerated for the proto rename;internal/key/testdata/keys.goldenbyte-identical (legacy emission preserved)TestAssignmentFromPodcover the four annotation-presence shapes (legacy-only, new-only, both, neither)