fix(serviceoffer-controller): harden agent reconciliation and storefront#463
Merged
Merged
Conversation
Pulls forward five small correctness fixes that were carried on the integration branch behind #452 but did not survive the squash merges. - Re-queue offers when their referenced Agent changes. Without this an Agent status edit (e.g. status.pinnedModel after the user edits spec.model) never propagates into the offer's status.agentResolution because the offer reconciler only runs when the offer itself changes. - Refuse to Update Namespace and PersistentVolumeClaim during applyAgentObject. PVCs reject wholesale Update with "spec is immutable after creation", and the controller's RBAC only grants `create` on Namespaces. Treat existence as success for these kinds and move on; mutable kinds (ConfigMap, Secret, Deployment, Service, ServiceAccount) keep going through the normal Update path. - Fall back to status.agentResolution.Model in the storefront catalog when an offer's spec.model is empty (the canonical state for type=agent offers, where the model lives on the linked Agent). - Bump the serviceoffer-controller Deployment memory request from 64Mi to 128Mi and the limit from 256Mi to 512Mi. The Agent informer + agent reconciler + in-controller keystore generation pushed steady-state past 256Mi after #453 and triggered OOMKilled restart loops. - Set GATEWAY_ALLOW_ALL_USERS=true on CRD-rendered agent pods. CRD agents only expose the API (gated by API_SERVER_KEY + ForwardAuth); no Telegram/Discord/dashboard platforms are wired. The flag silences Hermes' user-gateway startup warning without opening any real surface.
OisinKyne
force-pushed
the
fix/serviceoffer-controller-agent-hardening
branch
from
May 11, 2026 11:59
0a478ca to
5027cff
Compare
OisinKyne
approved these changes
May 11, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Pulls forward five small correctness fixes that were carried on the integration branch behind #452 but did not survive the squash merges.
controller.go,agent.go). Re-queue every ServiceOffer whosespec.agent.refpoints at an Agent when the Agent changes. Without this, an Agent status edit (e.g.status.pinnedModelafter the user editsspec.model) never propagates into the offer'sstatus.agentResolutionbecause the offer reconciler only runs when the offer itself changes.agent.go).applyAgentObjectreturns success forNamespaceandPersistentVolumeClaiminstead of trying toUpdate. PVCs reject wholesale Update withspec is immutable after creation, and the controller's RBAC only grantscreateon Namespaces. Mutable kinds (ConfigMap, Secret data, Deployment, Service ports, ServiceAccount) keep going through the normal Update path so reconciles still pick up rendered changes.render.go).type=agentoffers leavespec.modelempty by design (the model lives on the linked Agent). Fall back tostatus.agentResolution.Modelso the storefront catalog can display it.x402.yaml). Bump the serviceoffer-controller Deployment request from 64Mi → 128Mi and limit from 256Mi → 512Mi. The Agent informer + agent reconciler + in-controller keystore generation pushed steady-state past 256Mi after #453 and triggered OOMKilled restart loops.GATEWAY_ALLOW_ALL_USERS=true(agent_render.go). CRD agents expose only the API (gated byAPI_SERVER_KEY+ ForwardAuth); no Telegram/Discord/dashboard platforms are wired. The flag silences Hermes' user-gateway startup warning without opening any real surface.Test plan
go build ./...go test ./internal/serviceoffercontroller/...— all green, including the existing storefront catalog testsspec.modeland confirm the linked offer'sstatus.agentResolution.Modelupdates without manually poking the offerOOMKilledrestarts after seeding several Agents