Documentation
¶
Overview ¶
Package discovery derives the consumer inventory automatically from cluster and config sources. No source ever requires the user to author a model file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
Merge combines consumer sets by identity, unioning expectations, endpoints, provenance and confidence. Two consumers merge when their identity sets — {StableID} ∪ Aliases — intersect, so the same workload discovered by two sources under different primary keys (Istio by service name, Kubernetes by service account) becomes one record (KI-28). The first-seen consumer's StableID is canonical, so ordering discoverers service-name-first yields the more readable identity.
func Run ¶
Run executes every discoverer over the scope and merges the results by StableID, so a consumer seen by both Istio (issuer/audience) and Kubernetes (endpoints, owner) becomes one enriched record. Errors from individual discoverers are returned joined so a single bad source does not lose the rest.
func StableID ¶
StableID derives a consumer's stable identity (PRD §4.2), first match wins:
- k8s://{cluster}/{namespace}/{service-account-name}
- k8s://{cluster}/{namespace}/{service-name}
- route://{gateway-name}/{route-name}
- url://{normalized-host}{path-prefix}
The result must survive redeploys and IP changes.
Types ¶
type Discoverer ¶
type Discoverer interface {
// Name is a stable identifier used in provenance records, e.g. "istio".
Name() string
// Discover returns the consumers this source can see within scope.
Discover(ctx context.Context, scope Scope) ([]model.Consumer, error)
}
Discoverer is one source of consumers (Istio, Envoy, K8s, OIDC client registry).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package envoy discovers consumers from Envoy jwt_authn provider configuration.
|
Package envoy discovers consumers from Envoy jwt_authn provider configuration. |
|
Package istio discovers consumers from Istio RequestAuthentication resources (confidence 1.0 — declarative and unambiguous).
|
Package istio discovers consumers from Istio RequestAuthentication resources (confidence 1.0 — declarative and unambiguous). |
|
Package k8s discovers consumers from Kubernetes Services, their backing workloads, and projected service-account token volumes (PRD §7.3).
|
Package k8s discovers consumers from Kubernetes Services, their backing workloads, and projected service-account token volumes (PRD §7.3). |
|
Package kube builds Kubernetes API clients for the in-cluster discovery path.
|
Package kube builds Kubernetes API clients for the in-cluster discovery path. |
|
Package oidcclient discovers consumers from an OIDC provider's client registry (Keycloak).
|
Package oidcclient discovers consumers from an OIDC provider's client registry (Keycloak). |