fix(crd): AgentRuntime.spec.auth.outbound[].destination.hostRegex should be documented as glob, not regex
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go, kubernetes
- Domain
- devops, documentation
Research direction
Locate the AgentRuntime CRD type and its hostRegex field documentation, then read authbridge/authlib/routing/router.go and PR #517's warning to confirm the glob syntax. Resolve whether to document hostRegex in place or use the proposed deprecation and rename, then update the affected description and examples so the CRD clearly reflects the supported syntax.
Written by the indexing model from the issue text.
Description
Problem
The AgentRuntime CRD field spec.auth.outbound[].destination.hostRegex is documented as accepting regex patterns, but AuthBridge's routing engine expects glob patterns.
Current CRD documentation:
// HostRegex is a regex pattern to match hostnames.
// Example: ".*\\.team1\\.svc\\.cluster\\.local"
AuthBridge reality:
// authbridge/authlib/routing/router.go
g, err := glob.Compile(r.Host, '.') // Uses github.com/gobwas/glob, not regexp
Users who follow the CRD documentation and provide regex syntax (e.g., .*\.team1\.svc\.cluster\.local) will get routes that don't match because glob syntax is different from regex.
Impact
- Silent mismatch: Routes silently fail to match because regex metacharacters are interpreted as literal characters in glob matching
- Wrong examples: The CRD example shows regex syntax that won't work
- Confusing field name:
hostRegeximplies regex when it should be glob
Proposed Solution
Option A: Rename field + deprecate (breaking change)
// HostGlob is a glob pattern to match hostnames.
// Supports * (any chars) and ? (single char).
// Example: "*.team1.svc.cluster.local"
HostGlob string `json:"hostGlob,omitempty"`
// HostRegex is deprecated - use HostGlob instead.
// This field was misnamed; it expects glob syntax, not regex.
// +deprecated
HostRegex string `json:"hostRegex,omitempty"`
Option B: Fix documentation only (non-breaking)
// HostRegex is a glob pattern to match hostnames (name is misleading).
// Supports * (any chars) and ? (single char), NOT regex syntax.
// Example: "*.team1.svc.cluster.local"
HostRegex string `json:"hostRegex,omitempty"`
Workaround
PR #517 added a warning log when hostRegex is used:
mutatorLog.Info("hostRegex field is mapped to AuthBridge glob pattern (not regex)",
"note", "use glob syntax like '*.team1.svc.cluster.local', not regex")
This helps users discover the issue but doesn't fix the root cause.
Related
- PR #517 discovered this while implementing routes generation
- No examples currently use
hostRegex(all use exacthostmatches) - AuthBridge glob implementation: https://github.com/gobwas/glob
/cc @alantech
- Dominant language
- Go
- Stars
- 18
- Forks
- 50
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rossoctl/operator
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
enhancement go good first issue ux
Difficulty 4/5 3-5 days Newbie friendliness 66/100
rossoctl/operator#526 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement go high priority
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 2 days
All issues in rossoctl/operator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
resend/resend-skills#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cloudnativelabs/kube-router#2189 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
🕷️ bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sysadminsmedia/homebox#1770 ·
Maintainers usually reply within 2 days