Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions charts/grid-operator/crds/gridnetwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,24 @@ spec:
items:
type: string
type: array
selectionPolicy:
description: |-
Local request distribution policy for the active selection group.

This is independent of scoring. When absent, the overlay carries no
selection override and Praxis uses deterministic selection.
nullable: true
properties:
mode:
description: Local selection mode used by the data-plane gateway.
enum:
- deterministic
- roundRobin
- random
type: string
required:
- mode
type: object
staleCandidateTtlSeconds:
description: |-
Maximum age in seconds before a stale (`fresh=false`) remote routing
Expand Down
17 changes: 17 additions & 0 deletions charts/grid-site/templates/gridnetwork.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{{- if .Values.gridNetwork.name }}
{{- $existing := lookup "grid.praxis-proxy.io/v1alpha1" "GridNetwork" .Release.Namespace .Values.gridNetwork.name }}
{{- $configuredSelectionPolicy := .Values.gridNetwork.selectionPolicy }}
{{- $existingSelectionPolicy := dig "spec" "selectionPolicy" nil $existing }}
{{- $selectionPolicy := $configuredSelectionPolicy }}
{{- if not $selectionPolicy }}
{{- if $existingSelectionPolicy }}
{{- $selectionPolicy = $existingSelectionPolicy }}
{{- else if not $existing }}
{{- $selectionPolicy = dict "mode" "roundRobin" }}
{{- end }}
{{- end }}
apiVersion: grid.praxis-proxy.io/v1alpha1
kind: GridNetwork
metadata:
Expand Down Expand Up @@ -33,6 +44,12 @@ spec:
admissionPolicy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $selectionPolicy }}
{{- if .mode }}
selectionPolicy:
mode: {{ .mode | quote }}
{{- end }}
{{- end }}
{{- with .Values.gridNetwork.metricsRefreshInterval }}
{{- if . }}
metricsRefreshInterval: {{ . | quote }}
Expand Down
9 changes: 9 additions & 0 deletions charts/grid-site/tests/gridnetwork_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ tests:
path: spec.gridId
value: ""

- it: defaults a new GridNetwork to roundRobin selection
set:
gridNetwork.name: prod-grid
gridSite.name: prod-site
asserts:
- equal:
path: spec.selectionPolicy.mode
value: roundRobin

- it: renders budgetPolicy.tenants verbatim when set
set:
gridNetwork.name: prod-grid
Expand Down
11 changes: 11 additions & 0 deletions charts/grid-site/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@
}
}
},
"selectionPolicy": {
"type": "object",
"additionalProperties": false,
"required": ["mode"],
"properties": {
"mode": {
"type": "string",
"enum": ["deterministic", "roundRobin", "random"]
}
}
},
"metricsRefreshInterval": {
"type": "string",
"pattern": "^([1-9][0-9]*s|[1-9][0-9]{3,}ms)$"
Expand Down
18 changes: 18 additions & 0 deletions deploy/crds/gridnetwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,24 @@ spec:
items:
type: string
type: array
selectionPolicy:
description: |-
Local request distribution policy for the active selection group.

This is independent of scoring. When absent, the overlay carries no
selection override and Praxis uses deterministic selection.
nullable: true
properties:
mode:
description: Local selection mode used by the data-plane gateway.
enum:
- deterministic
- roundRobin
- random
type: string
required:
- mode
type: object
staleCandidateTtlSeconds:
description: |-
Maximum age in seconds before a stale (`fresh=false`) remote routing
Expand Down
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- [Routing](architecture/routing.md) — versioned overlay contract, revision
lifecycle, candidate ordering, `intelligent_route`, `peer_identity_trust`, and
provider-side request forwarding.
- [Provider Selection and Load Balancing](architecture/provider-selection-and-load-balancing.md) —

Check warning on line 12 in docs/README.md

View workflow job for this annotation

GitHub Actions / Detect hidden unicode characters

Unicode Safety [non-ascii-identifier]

U+2014 <unnamed U+2014> -- Non-ASCII U+2014 <unnamed U+2014> in identifier '—' (policy: ascii-only)
eligibility, routing groups, scoring, selection modes, affinity, and
overlay lifecycle.
- [Scoring](architecture/scoring.md) — operator-side candidate scoring,
metrics input, and request-time scoring boundaries.
- [Auth and Policy](architecture/auth.md) — provider authentication strategies,
Expand All @@ -30,6 +33,9 @@

## Demos

- [Provider Traffic Selection](../tests/e2e/topologies/grid-provider-traffic/README.md) —

Check warning on line 36 in docs/README.md

View workflow job for this annotation

GitHub Actions / Detect hidden unicode characters

Unicode Safety [non-ascii-identifier]

U+2014 <unnamed U+2014> -- Non-ASCII U+2014 <unnamed U+2014> in identifier '—' (policy: ascii-only)
runnable three-cluster topology for Grid selection groups and request-time
round-robin provider choice.
- [Grid QuickStarts](https://github.com/praxis-proxy/demos) — deployable
demonstrations with automated runtime proofs of routing, failover, security
boundaries, and provider lifecycle.
Expand Down
Loading
Loading