feat: add Gateway API exposure for CloudShell - #714
Open
panpan0000 wants to merge 2 commits into
Open
panpan0000 wants to merge 2 commits into
panpan0000 wants to merge 2 commits into
Conversation
|
Hi @panpan0000, DetailsInstructions for interacting with me using comments are available here. |
Member
Author
|
to address #707 |
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.
Summary
GatewayAPIas a CloudShell exposure mode.HTTPRouteper CloudShell, with an owner reference, path rewrite, and worker Service backend.status.accessUrlonly after the configured Gateway reportsAccepted=TrueandResolvedRefs=Truefor the current route generation.cleanup: falsecase.User-facing configuration
Install/configure the operator with an existing Gateway:
Users then create a CloudShell with
spec.exposureMode: GatewayAPI. The operator creates the HTTPRoute in the CloudShell namespace; the Gateway administrator controls namespace admission throughallowedRoutes.Functional validation
Environment: OrbStack Kubernetes v1.34.8, an
agentgatewayGatewayClass, and an isolated HTTP Gateway withallowedRoutes.namespaces.from: All.Code/build checks:
CGO_ENABLED=0 GOFLAGS=-mod=vendor go test $(go list ./... | rg -v '/test/e2e$')— passed.CGO_ENABLED=0 GOFLAGS=-mod=vendor go vet ./...— passed.helm lint charts/cloudtty— passed.docker --context orbstack build -f docker/operator/Dockerfile -t cloudtty-gatewayapi:final .— passed.Core end-to-end records:
Verify the generated HTTPRoute
The route was accessed through the Gateway Service:
Gateway admission rejection and recovery
Change the Gateway listener from All to Same:
Restore allowedRoutes.from: All:
delete it
TTL cleanup with cleanup=false
The rejection/recovery test changed the Gateway listener admission policy from
AlltoSameand restored it afterward. The TTL test usedcleanup: false, proving that the CloudShell CR can remain while its HTTPRoute and URL are removed.