-
Notifications
You must be signed in to change notification settings - Fork 22
Migrate stellar-core Ingress to Gateway API HTTPRoute via a scalable nginx proxy #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Jonathan-Eid
wants to merge
21
commits into
stellar:main
Choose a base branch
from
Jonathan-Eid:jonathan/ingress-to-gateway-httproute
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+629
−162
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9ffd563
Convert per-mission stellar-core Ingress to Gateway API HTTPRoute
Jonathan-Eid 2761815
Bump KubernetesClient 15.0.1 -> 17.0.14
Jonathan-Eid 69f0941
Per-pod services: ClusterIP + pod-name selector instead of ExternalName
Jonathan-Eid f7871ce
Rename IngressName -> HttpRouteName; drop -ingress from the object name
Jonathan-Eid 74a7f36
Front driver->core routing with a scalable nginx proxy; ingress->rout…
Jonathan-Eid ab49e35
Convert parallel-catchup job-monitor Ingress -> HTTPRoute
Jonathan-Eid 44a2c1b
Address review + fix fantomas formatting
Jonathan-Eid a357372
Drop --ingress-class from CI workflow + docs (flag removed)
Jonathan-Eid d92aa6a
CI: provision Gateway API + traefik gateway for BootAndSync
Jonathan-Eid d17c2af
CI: bump k3s to v1.28.5 (traefik chart needs k8s >=1.25)
Jonathan-Eid 1ba2221
CI: isolate our traefik from k3s bundled traefik (fullnameOverride, n…
Jonathan-Eid 80c895a
Parameterize the gateway the HTTPRoute attaches to (--gateway-name/-n…
Jonathan-Eid 5600441
CI: run BootAndSync on k3d + Envoy Gateway (validated locally)
Jonathan-Eid 12290dd
Dispose the gateway GenericClient in the HTTPRoute orphan sweep
Jonathan-Eid a8e1a13
Refactor comments in NetworkCfg to improve clarity and remove redundancy
Jonathan-Eid cd158d4
Fix orphan sweep: use 'new' without disposing the shared client
Jonathan-Eid 52611e5
Strip trailing whitespace so fantomas --check passes
Jonathan-Eid b6d0096
Drop redundant comments in orphan sweep
Jonathan-Eid 67242f4
Merge branch 'main' into jonathan/ingress-to-gateway-httproute
Jonathan-Eid 32c31c5
Address review: proxy readiness probe, route-Accepted wait, sweep guard
Jonathan-Eid a63bc7a
PCv2: attach job-monitor HTTPRoute to the mission's configured Gateway
Jonathan-Eid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| // Typed models for the subset of the Gateway API (gateway.networking.k8s.io/v1) | ||
| // that Supercluster needs to route to per-pod core/history endpoints. | ||
| // | ||
| // The official KubernetesClient package ships no Gateway API models (CRDs are | ||
| // out of scope for it), so these POCOs are hand-maintained to the upstream | ||
| // gateway-api v1 schema. Only the fields Supercluster uses are modelled. | ||
| // Usable with GenericClient<HTTPRoute> thanks to the [KubernetesEntity] attribute. | ||
|
|
||
| using System.Collections.Generic; | ||
| using System.Text.Json.Serialization; | ||
| using k8s; | ||
| using k8s.Models; | ||
|
|
||
| namespace GatewayApiModels | ||
| { | ||
| [KubernetesEntity(Group = "gateway.networking.k8s.io", ApiVersion = "v1", Kind = "HTTPRoute", PluralName = "httproutes")] | ||
| public class HTTPRoute : IKubernetesObject<V1ObjectMeta>, ISpec<HTTPRouteSpec> | ||
| { | ||
| [JsonPropertyName("apiVersion")] | ||
| public string ApiVersion { get; set; } = "gateway.networking.k8s.io/v1"; | ||
|
|
||
| [JsonPropertyName("kind")] | ||
| public string Kind { get; set; } = "HTTPRoute"; | ||
|
|
||
| [JsonPropertyName("metadata")] | ||
| public V1ObjectMeta Metadata { get; set; } | ||
|
|
||
| [JsonPropertyName("spec")] | ||
| public HTTPRouteSpec Spec { get; set; } | ||
|
|
||
| [JsonPropertyName("status")] | ||
| public HTTPRouteStatus Status { get; set; } | ||
| } | ||
|
|
||
| // Minimal route status: each parent (Gateway) the route attached to reports | ||
| // conditions (notably "Accepted"). Used to wait for the gateway to admit the | ||
| // route before the driver sends traffic. | ||
| public class HTTPRouteStatus | ||
| { | ||
| [JsonPropertyName("parents")] | ||
| public IList<RouteParentStatus> Parents { get; set; } | ||
| } | ||
|
|
||
| public class RouteParentStatus | ||
| { | ||
| [JsonPropertyName("conditions")] | ||
| public IList<V1Condition> Conditions { get; set; } | ||
| } | ||
|
|
||
| [KubernetesEntity(Group = "gateway.networking.k8s.io", ApiVersion = "v1", Kind = "HTTPRouteList", PluralName = "httproutes")] | ||
| public class HTTPRouteList : IKubernetesObject<V1ListMeta>, IItems<HTTPRoute> | ||
| { | ||
| [JsonPropertyName("apiVersion")] | ||
| public string ApiVersion { get; set; } = "gateway.networking.k8s.io/v1"; | ||
|
|
||
| [JsonPropertyName("kind")] | ||
| public string Kind { get; set; } = "HTTPRouteList"; | ||
|
|
||
| [JsonPropertyName("metadata")] | ||
| public V1ListMeta Metadata { get; set; } | ||
|
|
||
| [JsonPropertyName("items")] | ||
| public IList<HTTPRoute> Items { get; set; } | ||
| } | ||
|
|
||
| public class HTTPRouteSpec | ||
| { | ||
| [JsonPropertyName("parentRefs")] | ||
| public IList<ParentReference> ParentRefs { get; set; } | ||
|
|
||
| [JsonPropertyName("hostnames")] | ||
| public IList<string> Hostnames { get; set; } | ||
|
|
||
| [JsonPropertyName("rules")] | ||
| public IList<HTTPRouteRule> Rules { get; set; } | ||
| } | ||
|
|
||
| public class ParentReference | ||
| { | ||
| [JsonPropertyName("group")] | ||
| public string Group { get; set; } | ||
|
|
||
| [JsonPropertyName("kind")] | ||
| public string Kind { get; set; } | ||
|
|
||
| [JsonPropertyName("namespace")] | ||
| public string Namespace { get; set; } | ||
|
|
||
| [JsonPropertyName("name")] | ||
| public string Name { get; set; } | ||
|
|
||
| [JsonPropertyName("sectionName")] | ||
| public string SectionName { get; set; } | ||
|
|
||
| [JsonPropertyName("port")] | ||
| public int? Port { get; set; } | ||
| } | ||
|
|
||
| public class HTTPRouteRule | ||
| { | ||
| [JsonPropertyName("matches")] | ||
| public IList<HTTPRouteMatch> Matches { get; set; } | ||
|
|
||
| [JsonPropertyName("filters")] | ||
| public IList<HTTPRouteFilter> Filters { get; set; } | ||
|
|
||
| [JsonPropertyName("backendRefs")] | ||
| public IList<HTTPBackendRef> BackendRefs { get; set; } | ||
| } | ||
|
|
||
| public class HTTPRouteMatch | ||
| { | ||
| [JsonPropertyName("path")] | ||
| public HTTPPathMatch Path { get; set; } | ||
| } | ||
|
|
||
| public class HTTPPathMatch | ||
| { | ||
| // "Exact" | "PathPrefix" | "RegularExpression" | ||
| [JsonPropertyName("type")] | ||
| public string Type { get; set; } | ||
|
|
||
| [JsonPropertyName("value")] | ||
| public string Value { get; set; } | ||
| } | ||
|
|
||
| public class HTTPRouteFilter | ||
| { | ||
| // "RequestHeaderModifier" | "URLRewrite" | ... | ||
| [JsonPropertyName("type")] | ||
| public string Type { get; set; } | ||
|
|
||
| [JsonPropertyName("urlRewrite")] | ||
| public HTTPURLRewriteFilter UrlRewrite { get; set; } | ||
| } | ||
|
|
||
| public class HTTPURLRewriteFilter | ||
| { | ||
| [JsonPropertyName("hostname")] | ||
| public string Hostname { get; set; } | ||
|
|
||
| [JsonPropertyName("path")] | ||
| public HTTPPathModifier Path { get; set; } | ||
| } | ||
|
|
||
| public class HTTPPathModifier | ||
| { | ||
| // "ReplaceFullPath" | "ReplacePrefixMatch" | ||
| [JsonPropertyName("type")] | ||
| public string Type { get; set; } | ||
|
|
||
| [JsonPropertyName("replaceFullPath")] | ||
| public string ReplaceFullPath { get; set; } | ||
|
|
||
| [JsonPropertyName("replacePrefixMatch")] | ||
| public string ReplacePrefixMatch { get; set; } | ||
| } | ||
|
|
||
| public class HTTPBackendRef | ||
| { | ||
| [JsonPropertyName("group")] | ||
| public string Group { get; set; } | ||
|
|
||
| [JsonPropertyName("kind")] | ||
| public string Kind { get; set; } | ||
|
|
||
| [JsonPropertyName("name")] | ||
| public string Name { get; set; } | ||
|
|
||
| [JsonPropertyName("namespace")] | ||
| public string Namespace { get; set; } | ||
|
|
||
| [JsonPropertyName("port")] | ||
| public int? Port { get; set; } | ||
|
|
||
| [JsonPropertyName("weight")] | ||
| public int? Weight { get; set; } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.