feat: load service adapters from ConfigMap, remove k8s API dependency
CI / Vet, test, build (push) Canceled after 2m10s
CI / Build and push image (push) Canceled after 0s

Adapters defined in config.yaml alongside routes and models.
Parsed by existing config loader, populated into registry at startup.
Removed: client-go deps, REST loader, informer, nginx proxy,
CiliumNetworkPolicy, apis/gateway/v1/ (duplicate types).
Kept: merged CI pipeline, imagePullPolicy Always, CA certs in Dockerfile.
This commit is contained in:
Admin Bot
2026-08-26 16:39:30 -07:00
parent 0cdfae2a93
commit 9c5fb0ce84
13 changed files with 276 additions and 423 deletions
+17 -17
View File
@@ -6,39 +6,39 @@ import (
// Upstream defines an upstream target.
type Upstream struct {
URL string `json:"url"`
TimeoutSeconds int32 `json:"timeoutSeconds"`
URL string `json:"url" yaml:"url"`
TimeoutSeconds int32 `json:"timeoutSeconds" yaml:"timeoutSeconds"`
}
// Auth defines authentication requirements.
type Auth struct {
Required bool `json:"required"`
Capability string `json:"capability,omitempty"`
Required bool `json:"required" yaml:"required"`
Capability string `json:"capability,omitempty" yaml:"capability,omitempty"`
}
// Method defines an HTTP method endpoint.
type Method struct {
Verb string `json:"verb"`
UpstreamPath string `json:"upstreamPath"`
RequestSchema string `json:"requestSchema,omitempty"`
ResponseSchema string `json:"responseSchema,omitempty"`
Auth *Auth `json:"auth,omitempty"`
Verb string `json:"verb" yaml:"verb"`
UpstreamPath string `json:"upstreamPath" yaml:"upstreamPath"`
RequestSchema string `json:"requestSchema,omitempty" yaml:"requestSchema,omitempty"`
ResponseSchema string `json:"responseSchema,omitempty" yaml:"responseSchema,omitempty"`
Auth *Auth `json:"auth,omitempty" yaml:"auth,omitempty"`
}
// Resource defines a resource with multiple methods.
type Resource struct {
Name string `json:"name"`
Methods []Method `json:"methods"`
Auth *Auth `json:"auth,omitempty"`
Name string `json:"name" yaml:"name"`
Methods []Method `json:"methods" yaml:"methods"`
Auth *Auth `json:"auth,omitempty" yaml:"auth,omitempty"`
}
// Spec is the ServiceAdapter spec.
type Spec struct {
ServiceName string `json:"serviceName"`
Upstream Upstream `json:"upstream"`
Auth Auth `json:"auth"`
Retryable bool `json:"retryable,omitempty"`
Resources []Resource `json:"resources"`
ServiceName string `json:"serviceName" yaml:"serviceName"`
Upstream Upstream `json:"upstream" yaml:"upstream"`
Auth Auth `json:"auth" yaml:"auth"`
Retryable bool `json:"retryable,omitempty" yaml:"retryable,omitempty"`
Resources []Resource `json:"resources" yaml:"resources"`
}
// Status is the ServiceAdapter status.