ownapplication

package
v0.57.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ownapplication defines Techstack-owned desired state consumed by the node's StackKits renderer. It grants no host, daemon or provider authority.

Index

Constants

View Source
const APIVersion = "techstack.own-application/v1"
View Source
const BundleVersion = "stackkit.own-application-bundle/v1"
View Source
const ModuleRef = "stackkits-own-application-runtime"

Variables

This section is empty.

Functions

func Decode

func Decode(raw []byte, target any) error

func SplitImage

func SplitImage(image string) (string, string, error)

func ValidName

func ValidName(name string) bool

func ValidateRegistry

func ValidateRegistry(registry string) error

ValidateRegistry is the single image-host admission rule. It performs no DNS lookup; transport additionally rejects non-public resolved addresses.

Types

type Application

type Application struct {
	APIVersion  string            `json:"apiVersion"`
	Name        string            `json:"name"`
	Image       string            `json:"image"`
	HTTPPort    int               `json:"httpPort"`
	Hostname    string            `json:"hostname"`
	SignIn      *bool             `json:"signIn,omitempty"`
	Environment map[string]string `json:"environment,omitempty"`
	SecretRefs  map[string]string `json:"secretRefs,omitempty"`
	Volume      *Volume           `json:"volume,omitempty"`
	Resources   Resources         `json:"resources,omitempty"`
}

Application is deliberately closed: users supply an image, never Compose, commands, capabilities, host mounts, devices or network configuration.

func Parse

func Parse(raw []byte) (Application, error)

func (Application) AdmitImageConfiguration

func (a Application) AdmitImageConfiguration(raw []byte) error

AdmitImageConfiguration closes authority inherited from an image rather than the desired document. In particular Dockerfile routing labels must not create a second ingress path outside the reviewed router and Access Gate.

func (Application) Limits

func (a Application) Limits() Resources

func (Application) Protected

func (a Application) Protected() bool

func (Application) Validate

func (a Application) Validate() error

func (Application) WorkloadRef

func (a Application) WorkloadRef() string

type Bundle

type Bundle struct {
	APIVersion    string       `json:"apiVersion"`
	Application   Application  `json:"application"`
	Installation  Installation `json:"installation"`
	ResolvedImage string       `json:"resolvedImage,omitempty"`
	// ImageID is derived from the verified manifest/config by the node, never desired state.
	ImageID string `json:"imageID,omitempty"`
}

Bundle adapts desired state into the common application delivery graph. ResolvedImage is registry-observed before approval; execution uses that digest.

func (Bundle) Validate

func (b Bundle) Validate() error

type Installation

type Installation struct {
	Domain        string `json:"domain"`
	SiteRef       string `json:"siteRef"`
	NodeRef       string `json:"nodeRef"`
	CoreModuleRef string `json:"coreModuleRef"`
	TLSIssuerRef  string `json:"tlsIssuerRef"`
	TLSProfileRef string `json:"tlsProfileRef"`
	Exposure      string `json:"exposure"`
}

Installation is supplied by verified applied state, never by a live write's caller. Offline rendering accepts an explicit installation for inspection.

type Resources

type Resources struct {
	MemoryMiB int     `json:"memoryMiB,omitempty"`
	CPUs      float64 `json:"cpus,omitempty"`
}

type Volume

type Volume struct {
	MountPath string `json:"mountPath"`
}

Jump to

Keyboard shortcuts

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