Documentation
¶
Overview ¶
Package agents is the domain of agent-manager: an agent on the platform is a Flux HelmRelease of the Generic agent chart (2.x). One release renders one api.kagent.dev/v1alpha3 Agent (the template inline under spec.template, the Harness by name in spec.harnessRef) plus the agent's own muster RemoteMCPServer, the toolset carrier, sharing a per-namespace OCIRepository that tracks the chart. The package composes those two Flux objects exactly like the portal's create flow, pins every skill to an immutable source, validates the values against the chart's schema before anything is applied, and reads the agent back from the Agent object, its RemoteMCPServer and its owning HelmRelease. Readiness is the Agent object's own status.conditions; there is no per-agent Deployment or pod.
Index ¶
- Constants
- Variables
- func BuildHelmRelease(name, namespace string, values map[string]any, cfg ComposeConfig) *unstructured.Unstructured
- func BuildOCIRepository(namespace string, cfg ComposeConfig) *unstructured.Unstructured
- func BuildValues(spec Spec, cfg ComposeConfig) map[string]any
- func ManagedNamespaces(def string, additional []string) []string
- func ParseToolsetHeader(value string) []string
- func PlaceOnCluster(hr *unstructured.Unstructured, t Target, agent, ns string)
- func SkillsValues(list Skills) []any
- func ToYAML(obj *unstructured.Unstructured) string
- func ValidateEgress(list []string) error
- func ValidateName(name string) error
- func ValidatePlugins(list Plugins) error
- func ValidateSkills(list Skills) error
- func ValidateSystemMessage(message string) error
- func ValidateToolset(selectors []string, required bool) error
- func ValidateValues(ctx context.Context, src SchemaSource, values map[string]any) (chart.Schema, []string)
- type Agent
- type AgentRef
- type AgentSummary
- type ChartRef
- type ChartSource
- type CommitFile
- type CommitResult
- type ComposeConfig
- type Condition
- type Config
- type CreateResult
- type DeleteResult
- type Event
- type GitHubRemote
- type GitSkill
- type HelmReleaseHistory
- type HelmReleaseRef
- type HelmReleaseStatus
- type InfoResponse
- type Location
- type Manifests
- type ModelConfig
- type ObjectStatus
- type Plugin
- type Plugins
- type RemoteFor
- type SchemaSource
- type Service
- func (s *Service) CommitAvailable() bool
- func (s *Service) Create(ctx context.Context, spec Spec) (*CreateResult, error)
- func (s *Service) Delete(ctx context.Context, loc Location, name string, force bool, w WriteOptions) (*DeleteResult, error)
- func (s *Service) Get(ctx context.Context, loc Location, name string) (*Agent, error)
- func (s *Service) GetSession(ctx context.Context, sessionID string) (*SessionDetail, error)
- func (s *Service) Info(ctx context.Context) InfoResponse
- func (s *Service) List(ctx context.Context, loc Location) ([]Agent, error)
- func (s *Service) ListModelConfigs(ctx context.Context, loc Location) ([]ModelConfig, error)
- func (s *Service) ListSessions(ctx context.Context, namespace, name string, allCreators bool) (*SessionList, error)
- func (s *Service) ListSkills(ctx context.Context, repository, ref string, refresh bool) (*skills.Result, error)
- func (s *Service) Namespace(ns string) (string, error)
- func (s *Service) SessionsAvailable() bool
- func (s *Service) StartSession(ctx context.Context, in StartSession) (*SessionStart, error)
- func (s *Service) Status(ctx context.Context, loc Location, name string) (*Status, error)
- func (s *Service) Update(ctx context.Context, upd Update) (*UpdateResult, error)
- func (s *Service) ValidateCreate(ctx context.Context, spec Spec) (*ValidateResult, error)
- func (s *Service) ValidateUpdate(ctx context.Context, upd Update) (*ValidateResult, error)
- type SessionClient
- type SessionDetail
- type SessionList
- type SessionStart
- type Skill
- type SkillPinner
- type Skills
- type Spec
- type StartSession
- type Status
- type Target
- type ToolBinding
- type Update
- type UpdateResult
- type ValidateResult
- type WriteOptions
- type WriteOutcome
Constants ¶
const ( DefaultChartOCIURL = "oci://gsoci.azurecr.io/charts/giantswarm/agent" // DefaultChartSemver is the range the per-namespace OCIRepository tracks: // every 2.x release of the Generic chart, never a pre-release build and // never a next major. DefaultChartSemver = "2.x" DefaultHelmReleaseInterval = "10m" DefaultOCIRepositoryInterval = "30m" DefaultHelmReleaseAPIVersion = "helm.toolkit.fluxcd.io/v2" DefaultOCIRepositoryAPIVersion = "source.toolkit.fluxcd.io/v1" // DefaultHarnessName is the platform Harness every agent runs on. DefaultHarnessName = "kagent" )
const ( MaxEgress = 64 MaxEgressLength = 270 )
The Agent CRD's bounds on spec.egress.
const ( MaxPlugins = 20 MaxPluginSkills = 50 )
The chart schema's bounds on plugins.
const ( KagentAPIGroup = "api.kagent.dev" DefaultKagentAPIVersion = "v1alpha3" )
KagentAPIGroup is the API group of the Agent, Harness, RemoteMCPServer and ModelConfig kinds; DefaultKagentAPIVersion is composed when discovery cannot answer.
const ( // KubeconfigSecretSuffix: the Secret <cluster>-kubeconfig in the // organization namespace. KubeconfigSecretSuffix = "-kubeconfig" // #nosec G101 -- a Secret name suffix, not a credential // KubeconfigSecretKey is the key holding the kubeconfig. KubeconfigSecretKey = "value" // OrganizationNamespacePrefix: an organization's namespace on the // installation is org-<organization>. OrganizationNamespacePrefix = "org-" // ClusterLabel marks the HelmRelease of an agent placed on a workload // cluster with the cluster's name. ClusterLabel = "agent-platform.giantswarm.io/cluster" )
The Cluster API contract of a workload cluster's kubeconfig.
const ( // ToolsetValuesKey is the agent chart's top-level value carrying the // toolset (never `muster.tools`, which narrows the MCP binding). ToolsetValuesKey = "toolset" // ToolsetHeader is the header the chart renders on the agent's // RemoteMCPServer (spec.headersFrom[]). ToolsetHeader = "X-Muster-Toolset" // MaxToolsetSelectors is the inline cap; a longer list belongs in a preset. MaxToolsetSelectors = 32 )
const ( // ModeApply writes the objects live, as the caller. ModeApply = "apply" // ModeCommit writes them as files into the git repository that owns the // target and opens a pull request as the caller. ModeCommit = "commit" )
Write modes.
const ( // DisplayNameAnnotation is the agent chart's contract for the friendly // name; IconURLAnnotation for the avatar (the template has no icon // field). Both are rendered on the Agent object by the Generic chart and // read by the Dev Portal, Swarmgeist and agent-manager. DisplayNameAnnotation = "ui.giantswarm.io/display-name" IconURLAnnotation = "ui.giantswarm.io/icon-url" // HelmReleaseNameLabel / HelmReleaseNamespaceLabel are the Flux provenance // labels helm-controller stamps on every object a release renders. HelmReleaseNameLabel = "helm.toolkit.fluxcd.io/name" HelmReleaseNamespaceLabel = "helm.toolkit.fluxcd.io/namespace" // KustomizationNameLabel marks a HelmRelease whose desired state lives in // git (applied by a Flux Kustomization): a live write would be undone on // the next reconciliation. KustomizationNameLabel = "kustomize.toolkit.fluxcd.io/name" // ManagedByLabel / ManagedByValue mark the HelmReleases and // OCIRepositories agent-manager created. ManagedByLabel = "app.kubernetes.io/managed-by" ManagedByValue = "agent-manager" )
Labels and annotations the platform agrees on.
const ( // ManagedHelmRelease: a HelmRelease owns the agent and can be written live. ManagedHelmRelease = "helmrelease" // ManagedGitOps: the owning HelmRelease is applied by a Flux Kustomization; // changes belong in git (the meta agent opens a PR instead). ManagedGitOps = "gitops" // ManagedNone: a bare Agent object with no HelmRelease behind it. ManagedNone = "none" )
How an agent is managed.
const ( VerdictReady = "ready" VerdictProgressing = "progressing" VerdictFailed = "failed" VerdictUnknown = "unknown" )
Verdicts of a status check.
const CommitDirectory = "agent-manager"
CommitDirectory is the directory agent-manager writes an agent's files to, under the directory the owning Kustomization builds from (gitops-commit's layout, the one cluster-manager and model-manager write theirs to).
const FieldManager = "agent-manager"
Defaults of the composition, the values composeManifests.ts uses. FieldManager names this service as the manager of the fields it writes on HelmRelease and OCIRepository objects (metadata.managedFields[].manager): a field manager names the tool that applied a field, never the person — the caller is recorded in the requestedBy annotation and in the apiserver audit log (every write runs with the caller's token).
const KustomizationNamespaceLabel = "kustomize.toolkit.fluxcd.io/namespace"
KustomizationNamespaceLabel is the namespace of the Kustomization named by KustomizationNameLabel.
const ( // MaxSessionMessageLength bounds the first message of start_session, as // the portal bounds a message. MaxSessionMessageLength = 32000 )
const MaxSystemMessageLength = 20000
MaxSystemMessageLength is the agent chart's cap on agent.systemMessage: the compiled agent config must fit Substrate's 32768-character env value limit.
const SkillsGitAuthValuesKey = "skillsGitAuthSecretRef"
SkillsGitAuthValuesKey is the chart value that fans one read credential out to every git skill and git plugin: {name: <Secret>}.
Variables ¶
var ( RemovedValuePaths = []string{ "agent.runtime", "replicas", "resources", "nodeSelector", "tolerations", "muster.serverRef", "muster.allowedHeaders", "muster.stsWellKnownUri", "skills.gitAuthSecretRef", } RenamedValuePaths = map[string]string{"muster.toolNames": "muster.tools"} )
The Generic chart values contract since 1.x, for anyone rewriting 0.x values: RemovedValuePaths are the 0.x keys the chart refuses (additionalProperties: false), RenamedValuePaths the ones that moved.
var ( // ErrNotFound: the agent, HelmRelease or ModelConfig does not exist. ErrNotFound = errors.New("not found") // ErrInvalid: the request is malformed, fails the chart's values schema, // or names a skill reference that cannot be pinned. ErrInvalid = errors.New("invalid request") // ErrConflict: the object exists, is owned by GitOps, is suspended, or is // a bare Agent object with no HelmRelease behind it; force overrides // where documented. ErrConflict = errors.New("conflict") // ErrForbidden: the Kubernetes API refused the write for the identity // agent-manager runs with. ErrForbidden = errors.New("forbidden") // ErrUnsupported: the operation is not available on this installation. ErrUnsupported = errors.New("unsupported") // ErrUnauthenticated: the request reached the service without the caller // token it needs to act (the server runs as the caller only). 401. ErrUnauthenticated = errors.New("unauthenticated") // ErrGitOpsOwned: an apply-mode write targets a HelmRelease a Flux // Kustomization applies from git; the refusal names mode commit and the // repository and directory it would write. 409. ErrGitOpsOwned = errors.New("gitops_owned") // ErrAuthRequired: commit mode needs the person's GitHub authorization // and the call carries none (or GitHub refused it); the refusal names the // consent. 401. ErrAuthRequired = errors.New("auth_required") )
Sentinel errors the API layers map to HTTP statuses and MCP error codes.
var ShippedPresets = []string{"read-only", "none", "infrastructure", "agent-platform", "full"}
ShippedPresets are the presets every installation has: muster's built-ins (read-only, none, full) and the two the platform charts ship (infrastructure, agent-platform).
Functions ¶
func BuildHelmRelease ¶
func BuildHelmRelease(name, namespace string, values map[string]any, cfg ComposeConfig) *unstructured.Unstructured
BuildHelmRelease composes the HelmRelease of an agent.
func BuildOCIRepository ¶
func BuildOCIRepository(namespace string, cfg ComposeConfig) *unstructured.Unstructured
BuildOCIRepository composes the shared chart source of a namespace.
func BuildValues ¶
func BuildValues(spec Spec, cfg ComposeConfig) map[string]any
BuildValues composes the chart values from a spec whose skills are pinned (see pinSkills). Only what the caller set is emitted so the chart's defaults apply to everything else — the same rule as the portal (an empty prompt means "the chart's default prompt").
func ManagedNamespaces ¶ added in v1.8.0
ManagedNamespaces are the default namespace followed by the additional ones, without empty entries or the default repeated.
func ParseToolsetHeader ¶ added in v0.4.0
ParseToolsetHeader splits a rendered X-Muster-Toolset header value back into selectors (comma-separated, whitespace around selectors trimmed).
func PlaceOnCluster ¶ added in v1.9.0
func PlaceOnCluster(hr *unstructured.Unstructured, t Target, agent, ns string)
PlaceOnCluster turns an agent's HelmRelease into one that installs on the target cluster: named after cluster and agent in the organization namespace, installing the release named after the agent into ns there through the kubeconfig Secret. The chart source stays beside it. Flux impersonates spec.serviceAccountName on the remote cluster, where no such account exists, so it is dropped: the kubeconfig is the identity.
func SkillsValues ¶ added in v1.1.0
SkillsValues renders a pinned skills list as the chart's `skills` value; nil when the list is empty.
func ToYAML ¶
func ToYAML(obj *unstructured.Unstructured) string
ToYAML renders an object as YAML (what the applied manifest looks like).
func ValidateEgress ¶ added in v1.10.0
ValidateEgress checks what the Agent CRD refuses on spec.egress: at most MaxEgress origins, each an HTTP(S) origin of at most MaxEgressLength characters, no entry twice.
func ValidateName ¶
ValidateName checks the technical name: a DNS-1123 label of at most 63 characters, as the Agent object, Helm and the chart's schema require.
func ValidatePlugins ¶ added in v1.10.0
ValidatePlugins checks what the chart schema and the CRD refuse: exactly one source per entry, a full commit id or a digest (a plugin is never resolved, it comes pinned), a relative path, at least one skill name, unique per entry.
func ValidateSkills ¶ added in v1.0.0
ValidateSkills checks what can be checked before any lookup: exactly one source per entry, an http(s) repository URL, ref or commit but not both, a well-formed commit, a parseable OCI reference, a relative path without "..", unique names.
func ValidateSystemMessage ¶ added in v1.1.21
ValidateSystemMessage checks the system prompt against the chart's cap, counted in characters (code points), as the chart schema counts it.
func ValidateToolset ¶ added in v0.4.0
ValidateToolset checks a declared toolset against the inline grammar: non-empty, at most MaxToolsetSelectors selectors, each preset:<name> | server:<name> | workflow:<name> | tool:<name>; `toolset:` is reserved and `label:` exists inside presets only. A nil list is "absent": refused when required (create), fine otherwise (update: unchanged).
func ValidateValues ¶
func ValidateValues(ctx context.Context, src SchemaSource, values map[string]any) (chart.Schema, []string)
ValidateValues checks values against the chart's schema and returns every violation as a readable line (path: message). A schema that does not compile is reported as one error rather than letting invalid values through.
Types ¶
type Agent ¶
type Agent struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
// Target is the workload cluster the agent runs on; absent on the
// installation's own cluster.
Target
// Exists is false while the HelmRelease has not rendered the Agent
// object yet (or failed to).
Exists bool `json:"exists"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
ModelConfig string `json:"modelConfig,omitempty"`
IconURL string `json:"iconUrl,omitempty"`
SystemMessage string `json:"systemMessage,omitempty"`
// Harness is the Harness that runs the agent (spec.harnessRef.name, else
// the chart value agent.harness while nothing is rendered).
Harness string `json:"harness,omitempty"`
// Skills as pinned: git skills by commit, OCI skills by digest.
Skills Skills `json:"skills,omitempty"`
// Plugins as pinned.
Plugins Plugins `json:"plugins,omitempty"`
// Egress is the Agent's spec.egress (the chart value agent.egress while
// nothing is rendered).
Egress []string `json:"egress,omitempty"`
// Toolset is the toolset the agent declares: the owning HelmRelease's
// `toolset` value, or, for a bare Agent object, the X-Muster-Toolset
// header of the agent's RemoteMCPServer. Absent when none is declared.
Toolset []string `json:"toolset,omitempty"`
// ImplicitFullAccess is true when the agent declares no toolset but binds
// muster: its meta-tools see every tool the gateway exposes to the
// caller. Such agents predate toolsets and still need one assigned.
ImplicitFullAccess bool `json:"implicitFullAccess,omitempty"`
// Tools are the template's MCP bindings.
Tools []ToolBinding `json:"tools,omitempty"`
// Ready is the Agent object's verdict (Ready and the desired revision is
// the latest successful one); nil while the object is absent or its
// Harness has not reported.
Ready *bool `json:"ready"`
// Status is the Agent object's status, when it exists.
Status *ObjectStatus `json:"status,omitempty"`
// Managed is helmrelease, gitops or none.
Managed string `json:"managed"`
HelmRelease *HelmReleaseRef `json:"helmRelease,omitempty"`
// Values are the HelmRelease's inline values (the chart contract), when a
// HelmRelease owns the agent.
Values map[string]any `json:"values,omitempty"`
}
Agent is the read model of one agent.
func (Agent) Summary ¶ added in v1.10.0
func (a Agent) Summary() AgentSummary
Summary is the agent as an AgentSummary.
type AgentSummary ¶ added in v1.10.0
type AgentSummary struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Target
Exists bool `json:"exists"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
ModelConfig string `json:"modelConfig,omitempty"`
Harness string `json:"harness,omitempty"`
Toolset []string `json:"toolset,omitempty"`
ImplicitFullAccess bool `json:"implicitFullAccess,omitempty"`
Ready *bool `json:"ready"`
Managed string `json:"managed"`
// The owning HelmRelease's state, when it needs attention: suspended,
// being uninstalled, or not Ready (its reason and message).
Suspended bool `json:"suspended,omitempty"`
Deleting bool `json:"deleting,omitempty"`
ReleaseReason string `json:"releaseReason,omitempty"`
ReleaseMessage string `json:"releaseMessage,omitempty"`
}
AgentSummary is an agent as list_agents reports it unless asked for details: what tells the agents apart, without the system prompt, the skills, the status details and the values get_agent reports.
func Summaries ¶ added in v1.10.0
func Summaries(list []Agent) []AgentSummary
Summaries maps Summary over a list.
type ChartRef ¶
type ChartRef struct {
Kind string `json:"kind"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
}
ChartRef is a HelmRelease's spec.chartRef.
type ChartSource ¶
type ChartSource interface {
SchemaSource
Info(ctx context.Context) chart.Info
Name() string
OCIURL() string
SemverRange() string
}
ChartSource is what the service needs to know about the agent chart.
type CommitFile ¶ added in v1.5.0
type CommitFile struct {
Path string `json:"path"`
Action string `json:"action"`
Content string `json:"content,omitempty"`
}
CommitFile is one file of the commit; Content is shown on a dry run.
type CommitResult ¶ added in v1.5.0
type CommitResult struct {
// Repository is owner/name, Base the branch the change goes to.
Repository string `json:"repository"`
Base string `json:"base"`
// Directory is where the files go: CommitDirectory under the
// Kustomization's path (or the path the caller named).
Directory string `json:"directory"`
// Kustomization is the Flux Kustomization (namespace/name) that lands
// the files after the merge, and Prune its spec.prune. Empty for a target
// the caller named.
Kustomization string `json:"kustomization,omitempty"`
Prune bool `json:"prune"`
// Branch is the pull request's head branch.
Branch string `json:"branch"`
Files []CommitFile `json:"files"`
// PullRequest is the URL of the pull request opened as the caller, empty
// on a dry run and when nothing changes.
PullRequest string `json:"pullRequest,omitempty"`
Number int `json:"number,omitempty"`
// Author is the GitHub login the pull request is opened as.
Author string `json:"author,omitempty"`
// LiveSteps are what the merge alone does not do on the installation.
LiveSteps []string `json:"liveSteps,omitempty"`
}
CommitResult is the pull request a write in commit mode opened — or, dry run, would open — in the repository that owns the agent. The shape is cluster-manager's and model-manager's.
type ComposeConfig ¶
type ComposeConfig struct {
// ChartOCIURL is the agent chart, e.g. oci://gsoci.azurecr.io/charts/giantswarm/agent.
ChartOCIURL string
// ChartName is the OCIRepository's name (the chart name).
ChartName string
// ChartSemver is the OCIRepository ref.semver range (2.x).
ChartSemver string
// ChartSemverFilter is the OCIRepository ref.semverFilter: the regular
// expression the tags must match before the range is evaluated. Empty
// composes none.
ChartSemverFilter string
// HelmReleaseInterval / OCIRepositoryInterval are the Flux intervals.
HelmReleaseInterval string
OCIRepositoryInterval string
// ServiceAccountName is HelmRelease.spec.serviceAccountName, required by a
// Flux multi-tenancy admission policy in tenant namespaces; empty omits it.
ServiceAccountName string
// HelmReleaseAPIVersion / OCIRepositoryAPIVersion are the served Flux API
// versions (helm.toolkit.fluxcd.io/v2, source.toolkit.fluxcd.io/v1).
HelmReleaseAPIVersion string
OCIRepositoryAPIVersion string
// MusterURL is the platform's muster MCP URL, composed as the chart value
// muster.url; empty composes nothing and the chart default applies.
MusterURL string
// TargetMusterURL is the muster MCP URL composed into an agent on a
// workload cluster: one those clusters reach (the installation's public
// endpoint). Empty: agents are refused a target cluster.
TargetMusterURL string
// HarnessName is the platform Harness an agent runs on unless it names
// another: composed as the chart value agent.harness, the Agent object's
// spec.harnessRef.name.
HarnessName string
// SkillsGitAuthSecretName is the installation's skills credential: the
// Secret (key `token`) in the agent's namespace that every agent with a
// git skill or git plugin reads them with, unless the agent names its
// own. Empty: such agents fetch anonymously.
SkillsGitAuthSecretName string
}
ComposeConfig is the platform side of the composition.
func (ComposeConfig) ForTarget ¶ added in v1.9.0
func (c ComposeConfig) ForTarget() ComposeConfig
ForTarget is the composition of an agent on a workload cluster: muster at the URL the cluster reaches, and no installation skills credential (that Secret exists on the installation only; an agent on a cluster names its own).
type Condition ¶
type Condition struct {
Type string `json:"type"`
Status string `json:"status"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
Condition is a Kubernetes-style status condition, flattened.
type Config ¶
type Config struct {
// DefaultNamespace receives agents when a request names none.
DefaultNamespace string
// ManagedNamespaces are the namespaces the service may read and write
// (RBAC exists there); DefaultNamespace is always included.
ManagedNamespaces []string
// Compose is the platform side of the manifests.
Compose ComposeConfig
// KagentAPIVersion is the served api.kagent.dev version (v1alpha3).
KagentAPIVersion string
// Version is the service version reported by GET /info.
Version string
// GitHub offers commit mode: the pull request is opened as the person
// with the GitHub token the App-pinned registration carries. Nil: commit
// mode is refused as unsupported.
GitHub RemoteFor
// SkillsBootSecret keeps the installation's skills credential Secret
// filled with the skills GitHub App's token; nil: the Secret is
// provisioned by someone else.
SkillsBootSecret *skills.BootSecret
// Sessions is the kagent controller the session operations call through
// agentgateway as the caller. Nil: they are refused as unsupported.
Sessions SessionClient
}
Config configures the service.
type CreateResult ¶
type CreateResult struct {
Agent Agent `json:"agent"`
Manifests Manifests `json:"manifests"`
// Created says which objects were new; the OCIRepository is shared per
// namespace and reused when it exists.
Created struct {
OCIRepository bool `json:"ociRepository"`
HelmRelease bool `json:"helmRelease"`
} `json:"created"`
Status *Status `json:"status,omitempty"`
// RequestedBy is the authenticated caller the write ran as (email, else
// subject); empty when the server runs without OAuth.
RequestedBy string `json:"requestedBy,omitempty"`
WriteOutcome
}
CreateResult reports what a create applied.
type DeleteResult ¶
type DeleteResult struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Target
HelmReleaseDeleted bool `json:"helmReleaseDeleted"`
// AgentDeleted: the Agent object was deleted directly (a bare one, or the
// rendered objects of a suspended release, both with force).
AgentDeleted bool `json:"agentDeleted"`
RemoteMCPServerDeleted bool `json:"remoteMcpServerDeleted"`
OCIRepositoryDeleted bool `json:"ociRepositoryDeleted"`
// OCIRepositoryKept explains why the chart source stays (other agents
// reference it, or it could not be checked).
OCIRepositoryKept string `json:"ociRepositoryKept,omitempty"`
// RequestedBy is the authenticated caller the delete ran as.
RequestedBy string `json:"requestedBy,omitempty"`
WriteOutcome
}
DeleteResult reports what a delete removed.
type Event ¶
type Event struct {
Type string `json:"type"`
Reason string `json:"reason"`
Message string `json:"message"`
Object string `json:"object"`
Count int32 `json:"count,omitempty"`
Last string `json:"lastTimestamp,omitempty"`
}
Event is a recent Warning event on the agent's objects.
type GitHubRemote ¶ added in v1.5.0
GitHubRemote is what commit mode needs of GitHub: the pull request seams and the reads of the base, acting as the person.
type GitSkill ¶ added in v1.0.0
type GitSkill struct {
// URL of the git repository (http or https).
URL string `json:"url"`
// Ref is a branch, tag or commit a write resolves to its head commit at
// write time; empty (and no Commit) means the repository's default
// branch. Never written: the pin is Commit.
Ref string `json:"ref,omitempty"`
// Commit is the full commit id (40 or 64 hex characters) the skill is
// pinned to. Given by a caller who has one (list_skills reports it),
// resolved from Ref otherwise.
Commit string `json:"commit,omitempty"`
}
GitSkill is a skill in a git repository. A write takes the repository and, optionally, a Ref to resolve or a Commit to pin; what is written and read back is always the Commit.
type HelmReleaseHistory ¶
type HelmReleaseHistory struct {
Version int64 `json:"version"`
ChartVersion string `json:"chartVersion,omitempty"`
Status string `json:"status,omitempty"`
LastDeployed string `json:"lastDeployed,omitempty"`
}
HelmReleaseHistory is one Helm release revision from status.history.
type HelmReleaseRef ¶
type HelmReleaseRef struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
// Ready mirrors the Ready condition; nil while unreported.
Ready *bool `json:"ready"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
// ChartVersion is the deployed chart version (last history entry), else
// the last attempted revision.
ChartVersion string `json:"chartVersion,omitempty"`
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
Suspended bool `json:"suspended"`
GitOpsOwned bool `json:"gitOpsOwned"`
// Deleting is true while helm-controller uninstalls the release (the
// HelmRelease carries a deletionTimestamp); the template disappears with
// it.
Deleting bool `json:"deleting"`
ChartRef *ChartRef `json:"chartRef,omitempty"`
}
HelmReleaseRef is what an agent view says about its owning release.
type HelmReleaseStatus ¶
type HelmReleaseStatus struct {
Exists bool `json:"exists"`
Ready *bool `json:"ready"`
Suspended bool `json:"suspended"`
GitOpsOwned bool `json:"gitOpsOwned"`
Deleting bool `json:"deleting"`
Conditions []Condition `json:"conditions,omitempty"`
History []HelmReleaseHistory `json:"history,omitempty"`
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
}
HelmReleaseStatus is the release's conditions and recent history.
type InfoResponse ¶
type InfoResponse struct {
Version string `json:"version"`
Chart chart.Info `json:"chart"`
// Namespaces the service manages agents in.
Namespaces struct {
Default string `json:"default"`
Managed []string `json:"managed"`
} `json:"namespaces"`
// Capabilities are explicit flags; a false flag means the matching
// operation answers 501 unsupported (or, for commit, that the mode does
// not exist on this installation).
Capabilities map[string]bool `json:"capabilities"`
// Identity says how calls reach the API server: `caller` (every call
// presents the signed-in user's IdP token; the user's RBAC governs) or
// `serviceAccount` (the service's own identity behind a trusted proxy).
Identity string `json:"identity"`
// APIVersions are the served CRD versions the service composes and reads.
// Agent is the object a release renders; AgentTemplate is the same group
// and version (the template is inline in the Agent).
APIVersions struct {
Agent string `json:"agent"`
AgentTemplate string `json:"agentTemplate"`
Harness string `json:"harness"`
RemoteMCPServer string `json:"remoteMcpServer"`
ModelConfig string `json:"modelConfig"`
HelmRelease string `json:"helmRelease"`
OCIRepository string `json:"ociRepository"`
} `json:"apiVersions"`
// Flux settings the composed HelmReleases carry.
Flux struct {
HelmReleaseInterval string `json:"helmReleaseInterval"`
OCIRepositoryInterval string `json:"ociRepositoryInterval"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
} `json:"flux"`
// Harness is the platform Harness an agent runs on unless it names another.
Harness struct {
Name string `json:"name"`
} `json:"harness"`
// Muster is the platform's muster MCP gateway as composed into every
// agent: URL empty means the chart default applies.
Muster struct {
URL string `json:"url"`
// TargetURL is the muster URL composed into agents on workload
// clusters; empty: target clusters are refused.
TargetURL string `json:"targetUrl,omitempty"`
} `json:"muster"`
// SkillsRepositories are the configured skill repositories.
SkillsRepositories []string `json:"skillsRepositories"`
// SkillsGitAuthSecretName is the installation's skills credential Secret
// (key token) an agent with a git skill fetches with unless it names its
// own; empty: anonymous fetches.
SkillsGitAuthSecretName string `json:"skillsGitAuthSecretName,omitempty"`
// SkillsGitAuthMint is the state of that Secret when agent-manager keeps
// it filled with the skills GitHub App's token: the last refresh, the
// token's expiry and a failed refresh's error.
SkillsGitAuthMint *skills.BootSecretStatus `json:"skillsGitAuthMint,omitempty"`
}
InfoResponse is GET /info: what this installation can do, so the portal and agents feature-detect instead of guessing.
type Location ¶ added in v1.9.0
Location is where an agent is: its namespace (on the workload cluster when a target is set) and the target.
type Manifests ¶
type Manifests struct {
OCIRepository string `json:"ociRepository"`
HelmRelease string `json:"helmRelease"`
Values map[string]any `json:"values"`
}
Manifests are the objects a create/update applies, as YAML, plus the values.
func ComposeManifests ¶
func ComposeManifests(name, namespace string, values map[string]any, cfg ComposeConfig) Manifests
ComposeManifests renders the pair for a namespace and values.
type ModelConfig ¶
type ModelConfig struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Provider string `json:"provider,omitempty"`
Model string `json:"model,omitempty"`
// Accepted mirrors the kagent Accepted condition; nil while unreported.
Accepted *bool `json:"accepted"`
Message string `json:"message,omitempty"`
ManagedBy string `json:"managedBy,omitempty"`
}
ModelConfig is a kagent ModelConfig an agent can reference.
type ObjectStatus ¶ added in v1.10.0
type ObjectStatus struct {
// Exists is false while the HelmRelease has not rendered the Agent yet.
Exists bool `json:"exists"`
Generation int64 `json:"generation,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Harness is spec.harnessRef.name, the Harness that runs the agent.
Harness string `json:"harness,omitempty"`
// Ready / Accepted / ResolvedRefs / Compatible mirror the conditions; nil
// while unreported.
Ready *bool `json:"ready"`
Accepted *bool `json:"accepted"`
ResolvedRefs *bool `json:"resolvedRefs"`
Compatible *bool `json:"compatible"`
// DesiredRevision is the revision compiled from the current generation;
// LatestSuccessfulRevision the last one that became ready.
DesiredRevision string `json:"desiredRevision,omitempty"`
LatestSuccessfulRevision string `json:"latestSuccessfulRevision,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
// Warnings are the Harness's non-blocking compatibility decisions.
Warnings []string `json:"warnings,omitempty"`
}
ObjectStatus is the Agent object's own status: what its Harness reports on it (Accepted, ResolvedRefs, Compatible, then Ready once the golden snapshot exists) and the generations that say whether kagent has caught up.
type Plugin ¶ added in v1.10.0
type Plugin struct {
// Path is the bundle's directory within the artifact; empty for the root.
Path string `json:"path,omitempty"`
// Git is the git source: URL and Commit (Ref is refused).
Git *GitSkill `json:"git,omitempty"`
// OCI is the digest-pinned image reference.
OCI string `json:"oci,omitempty"`
// Skills names the bundle's skills to enable; at least one, unique.
Skills []string `json:"skills"`
}
Plugin is one plugins[] entry of the Generic chart values: an Agent Plugins bundle at an immutable source plus the names of the bundle's skills to enable. Unlike a skill, a plugin's source is written as given: a git commit or an OCI digest, never a ref to resolve.
type RemoteFor ¶ added in v1.5.0
type RemoteFor func(token string) (GitHubRemote, error)
RemoteFor builds the GitHub remote from the person's App user token.
type SchemaSource ¶
SchemaSource provides the agent chart's values.schema.json.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the agent lifecycle.
func New ¶
func New(k kube.Provider, c ChartSource, s *skills.Discoverer, p SkillPinner, cfg Config, log *slog.Logger) *Service
New builds the service. skills may be nil (list_skills then reports unsupported); pinner may be nil (skills must then come pinned).
func (*Service) CommitAvailable ¶ added in v1.5.0
CommitAvailable reports whether this server offers commit mode.
func (*Service) Create ¶
Create composes and applies the OCIRepository (when missing) and the HelmRelease of a new agent after pinning its skills and validating the values against the chart schema. Nothing is written when a check fails, or on a dry run. In commit mode the two land as files of a pull request in the repository that owns the namespace instead.
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, loc Location, name string, force bool, w WriteOptions) (*DeleteResult, error)
Delete removes the agent's HelmRelease (helm-controller uninstalls the rendered Agent and RemoteMCPServer) and the shared OCIRepository when no other release references it. A bare Agent object is only deleted with force. A dry run reports what would go and deletes nothing; in commit mode the files are removed with a pull request instead.
func (*Service) GetSession ¶ added in v1.10.0
GetSession is one session and its conversation: the A2A tasks of the session's context, read from the session's Agent.
func (*Service) Info ¶
func (s *Service) Info(ctx context.Context) InfoResponse
Info reports the installation's capabilities.
func (*Service) List ¶
List returns the agents of a namespace: every Agent object (with its RemoteMCPServer and its owning HelmRelease when Flux labels name one) plus every HelmRelease of the agent chart that has not rendered one yet.
func (*Service) ListModelConfigs ¶
ListModelConfigs lists the kagent ModelConfigs of a namespace, on the target cluster when one is named.
func (*Service) ListSessions ¶ added in v1.10.0
func (s *Service) ListSessions(ctx context.Context, namespace, name string, allCreators bool) (*SessionList, error)
ListSessions is the caller's sessions of one Agent (every person's with allCreators, when the controller grants the caller that).
func (*Service) ListSkills ¶
func (s *Service) ListSkills(ctx context.Context, repository, ref string, refresh bool) (*skills.Result, error)
ListSkills discovers skills in the configured (or the given) repository.
func (*Service) Namespace ¶
Namespace resolves an optional namespace argument against the managed set.
func (*Service) SessionsAvailable ¶ added in v1.10.0
SessionsAvailable says whether the session operations are offered: a kagent controller target is configured.
func (*Service) StartSession ¶ added in v1.10.0
func (s *Service) StartSession(ctx context.Context, in StartSession) (*SessionStart, error)
StartSession creates a session of the Agent and sends it the first message. The controller refuses the create while the Agent has no ready revision.
func (*Service) Status ¶
Status gathers the Agent object's status, the owning HelmRelease (conditions, history) and the namespace's recent Warning events for the agent, and folds them into one verdict. For an agent on a workload cluster the Agent and its events are read there, the HelmRelease and its events on the installation.
func (*Service) Update ¶
Update merges the change into the HelmRelease values, validates the result against the chart schema and writes it. The rendered objects are never touched: helm-controller renders the change.
The write is a read-modify-write, retried when the API server answers Conflict: helm-controller writes the release's status while it reconciles the previous change, so an update that follows another closely reads a resourceVersion that is stale by the time it writes — nothing the caller asked for is in conflict. Every attempt reads the release again and merges into its latest values; a Conflict that outlasts the attempts is reported. The refusals of writableHelmRelease are conflicts of the domain, not of the API server, and end the attempts at once.
func (*Service) ValidateCreate ¶
ValidateCreate is create_agent without the write.
func (*Service) ValidateUpdate ¶
ValidateUpdate is update_agent without the write.
type SessionClient ¶ added in v1.10.0
type SessionClient interface {
ListSessions(ctx context.Context, token string, agent kagent.Ref, allCreators bool) ([]*apiv1alpha1.Session, error)
GetSession(ctx context.Context, token, sessionID string) (*apiv1alpha1.Session, error)
ListSessionTasks(ctx context.Context, token string, agent kagent.Ref, contextID string) ([]*a2apb.Task, error)
CreateSession(ctx context.Context, token string, agent kagent.Ref, requestID, name string) (*apiv1alpha1.Session, error)
SendMessage(ctx context.Context, token string, agent kagent.Ref, contextID, messageID, text string) (*a2apb.StreamResponse, error)
}
SessionClient is what the session operations need from the kagent controller: SessionService and the A2A service, called through agentgateway with the caller's token (kagent.Client).
type SessionDetail ¶ added in v1.10.0
type SessionDetail struct {
Session json.RawMessage `json:"session"`
Tasks []json.RawMessage `json:"tasks"`
}
SessionDetail is the answer of get_session: the session and its conversation, every A2A task of the session's context oldest first (proto3 JSON of lf.a2a.v1.Task: status, history, artifacts).
type SessionList ¶ added in v1.10.0
type SessionList struct {
Agent AgentRef `json:"agent"`
Sessions []json.RawMessage `json:"sessions"`
}
SessionList is the answer of list_sessions: the Agent's sessions as kagent reports them (proto3 JSON of kagent.api.v1alpha1.Session, state as RUNTIME_STATE_*).
type SessionStart ¶ added in v1.10.0
type SessionStart struct {
Session json.RawMessage `json:"session"`
Turn json.RawMessage `json:"turn"`
}
SessionStart is the answer of start_session: the new session and the first event of its first turn (proto3 JSON of lf.a2a.v1.StreamResponse, usually {task} in TASK_STATE_SUBMITTED or WORKING). The turn keeps running; its answer is read with get_session.
type Skill ¶ added in v1.0.0
type Skill struct {
// Name is the skill's name under the template (spec.skills[].name), the
// directory it mounts under; defaults to the last path segment, else the
// repository name. Unique per agent.
Name string `json:"name,omitempty"`
// Path is the subdirectory holding SKILL.md (git skills); empty for the
// repository root. Relative, without "..".
Path string `json:"path,omitempty"`
// Git is the git source.
Git *GitSkill `json:"git,omitempty"`
// OCI is the OCI source: <registry>/<repository>@sha256:<digest> once
// written; a write also takes <registry>/<repository>:<tag> and resolves
// the digest.
OCI string `json:"oci,omitempty"`
}
Skill is one skills[] entry of the Generic chart values: a name, a subdirectory and exactly one source, git or OCI.
type SkillPinner ¶ added in v1.0.0
type SkillPinner interface {
// GitHead resolves ref of repoURL (empty: the default branch) to a commit.
GitHead(ctx context.Context, repoURL, ref string) (string, error)
// OCIDigest pins an OCI reference to <repository>@sha256:<digest>.
OCIDigest(ctx context.Context, ref string) (string, error)
// RequireReadable refuses a repository login (the caller's GitHub login,
// empty when unknown) cannot read: skills.ErrNotReadable.
RequireReadable(ctx context.Context, repoURL, login string) error
}
SkillPinner resolves mutable skill references to pins (skills.Resolver).
type Skills ¶
type Skills []Skill
Skills is an agent's skill list.
func PinSkills ¶ added in v1.1.0
PinSkills is the composer's pinning for other callers (the migrate command rewriting 0.x releases): every entry pinned to a commit or a digest and named the way create_agent names it, or an ErrInvalid naming the reference that could not be resolved.
func (*Skills) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON accepts the list and explains the 0.x object shape ({refs, gitRefs, gitAuthSecretName}) to a caller still sending it.
type Spec ¶
type Spec struct {
// Location is the agent's namespace (empty selects the default managed
// namespace) and, to run it on a workload cluster, the target cluster.
// Fixed at create.
Location
// Name is the DNS-1123 technical name: the HelmRelease name and the
// Agent object's name. The caller confirms it; agent-manager never
// derives it.
Name string `json:"name"`
// DisplayName is the friendly Unicode name (max 63 chars).
DisplayName string `json:"displayName,omitempty"`
// Description goes to spec.template.description.
Description string `json:"description,omitempty"`
// SystemMessage is the system prompt (spec.template.systemPrompt); empty
// keeps the chart default. At most MaxSystemMessageLength characters.
SystemMessage string `json:"systemMessage,omitempty"`
// ModelConfig names an existing kagent ModelConfig in the namespace.
ModelConfig string `json:"modelConfig"`
// Harness names the Harness of the namespace that runs the agent (chart
// agent.harness, the Agent object's spec.harnessRef.name); empty selects
// the platform Harness. Fixed at create.
Harness string `json:"harness,omitempty"`
// IconURL is the avatar URL (chart agent.iconUrl, rendered as the
// ui.giantswarm.io/icon-url annotation).
IconURL string `json:"iconUrl,omitempty"`
// Skills the agent mounts; every entry is pinned before it is written.
Skills Skills `json:"skills,omitempty"`
// Plugins the agent enables skills from; every entry comes pinned.
Plugins Plugins `json:"plugins,omitempty"`
// Egress lists the HTTP(S) origins the agent may reach besides what its
// revision compiles (chart value agent.egress, the Agent's spec.egress),
// such as https://github.com:443 or https://*.githubusercontent.com.
Egress []string `json:"egress,omitempty"`
// GitAuthSecretName names the Secret in the agent's namespace whose key
// `token` reads the agent's private git skills and plugins (chart value
// skillsGitAuthSecretRef.name, fanned out to every git source). Empty
// selects the installation's (ComposeConfig.SkillsGitAuthSecretName).
GitAuthSecretName string `json:"gitAuthSecretName,omitempty"`
// Toolset is the list of selectors that bounds which of the gateway's
// tools the agent can use (chart value `toolset`). Required on create;
// see ValidateToolset for the grammar.
Toolset []string `json:"toolset,omitempty"`
// Labels / Annotations are merged onto the Agent object by the chart.
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
// Removed arguments: they only exist so that a caller still passing them
// is told why they are gone (see rejectRemoved) instead of getting an
// "unknown field" error.
RemovedToolNames json.RawMessage `json:"toolNames,omitempty"`
RemovedRuntime json.RawMessage `json:"runtime,omitempty"`
WriteOptions
}
Spec is what a caller provides to create an agent. Everything but Name, ModelConfig and Toolset is optional; omitted fields keep the chart's defaults.
type StartSession ¶ added in v1.10.0
type StartSession struct {
Namespace string `json:"namespace,omitempty"`
Name string `json:"name"`
// Message is the first user message of the conversation.
Message string `json:"message"`
// RequestID makes a retried start idempotent: the same id answers the
// session the first attempt created. Empty: a new id per call.
RequestID string `json:"requestId,omitempty"`
// SessionName is the conversation's display name; empty leaves it unnamed.
SessionName string `json:"sessionName,omitempty"`
}
StartSession is the input of start_session.
type Status ¶
type Status struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Target
// Verdict is ready, progressing, failed or unknown.
Verdict string `json:"verdict"`
// Summary is one sentence a human or an agent can act on.
Summary string `json:"summary"`
Agent *ObjectStatus `json:"agent,omitempty"`
HelmRelease *HelmReleaseStatus `json:"helmRelease,omitempty"`
Events []Event `json:"events,omitempty"`
// contains filtered or unexported fields
}
Status is the compact verdict of get_agent_status.
type Target ¶ added in v1.9.0
type Target struct {
// Organization owns the cluster: its namespace org-<organization> on the
// installation holds the Cluster and its kubeconfig Secret.
Organization string `json:"organization,omitempty"`
// Cluster is the workload cluster's name.
Cluster string `json:"cluster,omitempty"`
}
Target names the workload cluster an agent runs on: both fields or none.
func (Target) FluxNamespace ¶ added in v1.9.0
FluxNamespace is the installation namespace the agent's HelmRelease lives in: the organization's.
func (Target) KubeconfigSecret ¶ added in v1.9.0
KubeconfigSecret is the name of the cluster's kubeconfig Secret.
func (Target) ReleaseName ¶ added in v1.9.0
ReleaseName is the HelmRelease name of an agent on the cluster: prefixed with the cluster, since one organization namespace holds the releases of all its clusters. Its length is checked by ValidateReleaseName.
func (Target) Validate ¶ added in v1.9.0
Validate checks that both fields are DNS-1123 labels, or both are empty.
func (Target) ValidateReleaseName ¶ added in v1.9.0
ValidateReleaseName refuses a cluster and agent name pair whose release name is not a label value (helm-controller stamps it on every object).
type ToolBinding ¶ added in v1.0.0
type ToolBinding struct {
// Server is the RemoteMCPServer bound (same namespace).
Server string `json:"server"`
// Tools narrows the binding to these tools; empty is every tool.
Tools []string `json:"tools,omitempty"`
}
ToolBinding is one MCP tool binding of the template (spec.template.tools[].mcp).
type Update ¶
type Update struct {
Location
Name string `json:"name"`
DisplayName *string `json:"displayName,omitempty"`
Description *string `json:"description,omitempty"`
SystemMessage *string `json:"systemMessage,omitempty"`
ModelConfig *string `json:"modelConfig,omitempty"`
IconURL *string `json:"iconUrl,omitempty"`
Skills *Skills `json:"skills,omitempty"`
Plugins *Plugins `json:"plugins,omitempty"`
// Egress replaces the agent's whole egress list; empty clears it.
Egress *[]string `json:"egress,omitempty"`
// GitAuthSecretName replaces the skills credential Secret; empty clears it
// back to the installation's.
GitAuthSecretName *string `json:"gitAuthSecretName,omitempty"`
Toolset *[]string `json:"toolset,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
Annotations *map[string]string `json:"annotations,omitempty"`
// RefreshSkills re-resolves every git skill of the agent to the head of
// its repository's default branch — a skill passed in Skills with a Ref
// goes to that ref's head — and changes nothing else on the release.
RefreshSkills bool `json:"refreshSkills,omitempty"`
// Removed arguments: see Spec.
RemovedToolNames json.RawMessage `json:"toolNames,omitempty"`
RemovedRuntime json.RawMessage `json:"runtime,omitempty"`
// Force writes to a suspended HelmRelease anyway. A GitOps-owned one is
// never written live: mode commit changes it in git.
Force bool `json:"force,omitempty"`
WriteOptions
}
Update is a partial change to an existing agent: nil pointers leave the current value; a pointer to an empty value clears it (falls back to the chart default). Skills, Plugins, Egress and Toolset replace the whole list (an empty toolset is refused: use preset:none).
type UpdateResult ¶
type UpdateResult struct {
Agent Agent `json:"agent"`
Before map[string]any `json:"before"`
After map[string]any `json:"after"`
Changed []string `json:"changed"`
Manifests Manifests `json:"manifests"`
// RequestedBy is the authenticated caller the write ran as.
RequestedBy string `json:"requestedBy,omitempty"`
WriteOutcome
}
UpdateResult reports before/after values of an update.
type ValidateResult ¶
type ValidateResult struct {
Valid bool `json:"valid"`
// Mode is create or update.
Mode string `json:"mode"`
// Errors lists every schema violation and precondition failure.
Errors []string `json:"errors,omitempty"`
// Notes lists the checks the dry run could not make, such as the name
// check for a caller who may not read the namespace's releases.
Notes []string `json:"notes,omitempty"`
// SchemaVersion / SchemaSource say which chart schema judged the values.
SchemaVersion string `json:"schemaVersion"`
SchemaSource string `json:"schemaSource"`
Manifests Manifests `json:"manifests"`
}
ValidateResult is a dry run: nothing was written.
type WriteOptions ¶ added in v1.5.0
type WriteOptions struct {
// Mode is apply (default) or commit.
Mode string `json:"mode,omitempty"`
// DryRun returns the manifests and, in commit mode, the files and the
// pull request that would be opened, and writes nothing.
DryRun bool `json:"dryRun,omitempty"`
// Repository (owner/name), Branch and Path name the commit target where
// no Flux Kustomization owns the namespace yet; given, they override the
// target derived from Flux. Commit mode only.
Repository string `json:"repository,omitempty"`
Branch string `json:"branch,omitempty"`
Path string `json:"path,omitempty"`
}
WriteOptions say how a write lands. Every write tool takes them.
type WriteOutcome ¶ added in v1.5.0
type WriteOutcome struct {
Mode string `json:"mode"`
DryRun bool `json:"dryRun"`
Commit *CommitResult `json:"commit,omitempty"`
}
WriteOutcome is how a write landed: its mode, whether it was a dry run (Created, the deleted flags and the agent then say what would happen) and, in commit mode, the pull request.