app

package
v0.13.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOverrides added in v0.13.0

func ApplyOverrides(cfg *config.Config, deploymentIdentifier string, valuesFiles, sets []string) error

ApplyOverrides merges values files and --set overrides into a deployment's values.yaml. Overrides are persisted to disk rather than passed as ephemeral helmfile flags so the deployment directory stays the single declarative record — `obol app sync` and stack-up resume replay exactly what was last applied.

Files are merged in order, then set expressions on top (later wins).

func Delete

func Delete(cfg *config.Config, u *ui.UI, deploymentIdentifier string, force bool) error

Delete removes an application deployment and its cluster resources

func GetHelmfileModTime added in v0.3.0

func GetHelmfileModTime(dir string) (modTime string, err error)

GetHelmfileModTime returns the modification time of helmfile.yaml

func Install

func Install(cfg *config.Config, u *ui.UI, chartRef string, opts InstallOptions) error

Install scaffolds a new application from a Helm chart reference

func List added in v0.3.0

func List(cfg *config.Config, u *ui.UI, opts ListOptions) error

List displays installed applications

func ListInstanceIDs added in v0.5.0

func ListInstanceIDs(cfg *config.Config) ([]string, error)

ListInstanceIDs returns all installed app deployment identifiers (as "app/id" strings) by walking the applications directory on disk.

func PrintSellHint added in v0.13.0

func PrintSellHint(cfg *config.Config, u *ui.UI, deploymentIdentifier string)

PrintSellHint discovers the Services a just-synced app exposes and prints a ready-to-run `obol sell http` command for each, connecting app installs to the monetization flow. Best-effort: any discovery failure (no kubeconfig, kubectl missing, no Services yet) prints nothing.

func ResolveInstance added in v0.5.0

func ResolveInstance(cfg *config.Config, args []string) (identifier string, remaining []string, err error)

ResolveInstance determines which app deployment to target based on how many deployments are installed:

  • 0 deployments: returns an error prompting the user to install one
  • 1 deployment: auto-selects it, returns args unchanged
  • 2+ deployments: expects args[0] to be a known "app/id" identifier; consumes it from args and returns the rest. Errors if no match.

func ResumeAll added in v0.13.0

func ResumeAll(cfg *config.Config, u *ui.UI)

ResumeAll re-syncs every installed app deployment into the (possibly freshly recreated) cluster. App deployments are declarative on disk (helmfile.yaml + values.yaml under applications/<app>/<id>/) but their cluster resources live in etcd, which `obol stack down` + recreate destroys — without this replay a fresh `stack up` comes back with the deployment directories still on disk but no matching cluster resources, and any `obol sell http` offer gating an app upstream dangles.

Best-effort, mirroring agentcrd.ResumeAll: a failed app warns and does not block stack-up.

func Sync

func Sync(cfg *config.Config, u *ui.UI, deploymentIdentifier string) error

Sync deploys or updates an application to the cluster

Types

type ArtifactHubClient added in v0.3.0

type ArtifactHubClient struct {
	// contains filtered or unexported fields
}

ArtifactHubClient handles chart resolution via the ArtifactHub API

func NewArtifactHubClient added in v0.3.0

func NewArtifactHubClient() *ArtifactHubClient

NewArtifactHubClient creates a new ArtifactHub API client

func (*ArtifactHubClient) ResolveChart added in v0.3.0

func (c *ArtifactHubClient) ResolveChart(ref string) (*ChartInfo, error)

ResolveChart resolves a repo/chart[@version] reference to full chart info Input formats:

  • "bitnami/redis" -> resolves to latest version
  • "bitnami/redis@19.0.0" -> resolves to specific version

type ArtifactHubPackage added in v0.3.0

type ArtifactHubPackage struct {
	Name              string                `json:"name"`
	Version           string                `json:"version"`
	Repository        ArtifactHubRepository `json:"repository"`
	ContentURL        string                `json:"content_url"`
	AvailableVersions []ArtifactHubVersion  `json:"available_versions"`
}

ArtifactHubPackage represents the API response for a package

type ArtifactHubRepository added in v0.3.0

type ArtifactHubRepository struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

ArtifactHubRepository represents repository info in the API response

type ArtifactHubVersion added in v0.3.0

type ArtifactHubVersion struct {
	Version string `json:"version"`
}

ArtifactHubVersion represents a version in the available_versions list

type ChartFormat added in v0.3.0

type ChartFormat int

ChartFormat represents the type of chart reference

const (
	FormatURL       ChartFormat = iota // https://.../*.tgz
	FormatRepoChart                    // repo/chart[@version]
	FormatOCI                          // oci://...
)

type ChartInfo added in v0.3.0

type ChartInfo struct {
	RepoName  string // Repository name (e.g., "bitnami")
	RepoURL   string // Repository URL (e.g., "https://charts.bitnami.com/bitnami")
	ChartName string // Chart name (e.g., "redis")
	Version   string // Resolved version (e.g., "19.6.4")
}

ChartInfo holds resolved chart information from ArtifactHub

type ChartReference added in v0.3.0

type ChartReference struct {
	Original  string      // Original input string
	Format    ChartFormat // Detected format type
	ChartName string      // Chart name
	ChartURL  string      // Full URL (for URL/OCI formats)
	RepoName  string      // Repository name (for repo/chart format)
	RepoURL   string      // Repository URL (for repo/chart format, resolved)
	Version   string      // Chart version (may be empty)
}

ChartReference holds parsed chart information

func ParseChartReference added in v0.3.0

func ParseChartReference(ref string) (*ChartReference, error)

ParseChartReference parses a chart reference in any supported format

func (*ChartReference) GetChartName added in v0.3.0

func (c *ChartReference) GetChartName() string

GetChartName returns the name to use for the app directory

func (*ChartReference) NeedsResolution added in v0.3.0

func (c *ChartReference) NeedsResolution() bool

NeedsResolution returns true if this reference needs ArtifactHub resolution

type HelmfileInfo added in v0.3.0

type HelmfileInfo struct {
	ChartRef string // Original chart reference (from comment)
	Chart    string // Chart field value
	Version  string // Chart version
}

HelmfileInfo holds parsed information from a helmfile.yaml

func ParseHelmfile added in v0.3.0

func ParseHelmfile(dir string) (*HelmfileInfo, error)

ParseHelmfile extracts chart information from a helmfile.yaml

type InstallOptions added in v0.3.0

type InstallOptions struct {
	Name        string   // Optional app name override
	Version     string   // Chart version (empty = latest for repo/chart, extracted for URL)
	ID          string   // Deployment ID (empty = generate petname)
	Force       bool     // Overwrite existing deployment
	ValuesFiles []string // Values files merged onto chart defaults (in order)
	Set         []string // key.path=value overrides applied after values files
}

InstallOptions contains options for the install command

type ListOptions added in v0.3.0

type ListOptions struct {
	Verbose bool // Show detailed information
}

ListOptions contains options for the list command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL