v1alpha1

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the catalog v1alpha1 API group. +kubebuilder:object:generate=true +groupName=catalog.bubustack.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "catalog.bubustack.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type EngramTemplate

type EngramTemplate struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of EngramTemplate
	// +required
	Spec EngramTemplateSpec `json:"spec"`

	// status defines the observed state of EngramTemplate
	// +optional
	Status EngramTemplateStatus `json:"status,omitzero"`
}

EngramTemplate defines a reusable "worker" component for stories

Think of EngramTemplates as specialized tools in a toolbox: - "http-client": Makes HTTP requests with retry and timeout support - "openai-chat": Integrates with OpenAI's GPT models - "postgres-query": Executes SQL queries against PostgreSQL - "slack-notify": Sends messages to Slack channels - "image-resize": Processes and resizes images

Templates are cluster-scoped because they're meant to be shared across teams and namespaces. They define WHAT can be done, while Engrams define HOW to configure and run them.

The relationship is: EngramTemplate (defines capabilities) → Engram (configured instance) → Used in Story steps

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=etpl,categories={bubu,ai,catalog} +kubebuilder:printcolumn:name="Description",type=string,JSONPath=.spec.description +kubebuilder:printcolumn:name="Version",type=string,JSONPath=.spec.version +kubebuilder:printcolumn:name="Usage",type=integer,JSONPath=.status.usageCount +kubebuilder:printcolumn:name="Status",type=string,JSONPath=.status.validationStatus +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp

func (*EngramTemplate) DeepCopy

func (in *EngramTemplate) DeepCopy() *EngramTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EngramTemplate.

func (*EngramTemplate) DeepCopyInto

func (in *EngramTemplate) DeepCopyInto(out *EngramTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EngramTemplate) DeepCopyObject

func (in *EngramTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*EngramTemplate) GetImage added in v0.1.4

func (t *EngramTemplate) GetImage() string

GetImage returns the template's container image.

func (*EngramTemplate) GetTemplateStatus added in v0.1.4

func (t *EngramTemplate) GetTemplateStatus() *TemplateStatus

GetTemplateStatus returns a pointer to the embedded TemplateStatus. This enables shared status update helpers to operate on both template types.

func (*EngramTemplate) GetVersion added in v0.1.4

func (t *EngramTemplate) GetVersion() string

GetVersion returns the template's version.

type EngramTemplateList

type EngramTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []EngramTemplate `json:"items"`
}

+kubebuilder:object:root=true

func (*EngramTemplateList) DeepCopy

func (in *EngramTemplateList) DeepCopy() *EngramTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EngramTemplateList.

func (*EngramTemplateList) DeepCopyInto

func (in *EngramTemplateList) DeepCopyInto(out *EngramTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EngramTemplateList) DeepCopyObject

func (in *EngramTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EngramTemplateSpec

type EngramTemplateSpec struct {
	// Common template fields (version, description, image, etc.)
	TemplateSpec `json:",inline"`

	// What data does this engram expect as input?
	// This defines the contract for the data flowing INTO this component
	// Examples:
	// - HTTP client: {"url": "string", "method": "string", "headers": "object"}
	// - OpenAI: {"prompt": "string", "model": "string", "temperature": "number"}
	// - Database: {"query": "string", "parameters": "object"}
	// +kubebuilder:pruning:PreserveUnknownFields
	InputSchema *runtime.RawExtension `json:"inputSchema,omitempty"`

	// What data does this engram produce as output?
	// This defines the contract for the data flowing OUT of this component
	// Examples:
	// - HTTP client: {"status": "integer", "body": "string", "headers": "object"}
	// - OpenAI: {"response": "string", "usage": "object", "model": "string"}
	// - Database: {"rows": "array", "rowCount": "integer", "duration": "number"}
	// +kubebuilder:pruning:PreserveUnknownFields
	OutputSchema *runtime.RawExtension `json:"outputSchema,omitempty"`

	// DeclaredOutputKeys lists the top-level keys this engram is expected to produce in its output.
	// Used for documentation, static analysis, and downstream template validation.
	// Example: ["body", "status", "headers"]
	// +optional
	DeclaredOutputKeys []string `json:"declaredOutputKeys,omitempty"`
}

EngramTemplateSpec defines the capabilities and contract of a worker component

func (*EngramTemplateSpec) DeepCopy

func (in *EngramTemplateSpec) DeepCopy() *EngramTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EngramTemplateSpec.

func (*EngramTemplateSpec) DeepCopyInto

func (in *EngramTemplateSpec) DeepCopyInto(out *EngramTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EngramTemplateStatus

type EngramTemplateStatus struct {
	TemplateStatus `json:",inline"`
}

EngramTemplateStatus defines the observed state of EngramTemplate

func (*EngramTemplateStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EngramTemplateStatus.

func (*EngramTemplateStatus) DeepCopyInto

func (in *EngramTemplateStatus) DeepCopyInto(out *EngramTemplateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImpulseTemplate

type ImpulseTemplate struct {
	metav1.TypeMeta `json:",inline"`
	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of ImpulseTemplate
	// +required
	Spec ImpulseTemplateSpec `json:"spec"`

	// status defines the observed state of ImpulseTemplate
	// +optional
	Status ImpulseTemplateStatus `json:"status,omitzero"`
}

ImpulseTemplate defines a reusable "trigger" component that launches stories

Think of ImpulseTemplates as event listeners or sensors that know how to handle specific types of events: - "github-webhook": Handles GitHub webhook events (push, PR, release, etc.) - "slack-handler": Processes Slack events (mentions, slash commands, reactions) - "file-watcher": Monitors file uploads/changes in cloud storage - "cron-scheduler": Triggers stories on schedules (like GitHub Actions cron) - "kafka-consumer": Consumes messages from Kafka topics

Templates are cluster-scoped because they're meant to be shared across teams and namespaces. They define WHAT events can be handled, while Impulses define HOW to configure and use them.

The relationship is: ImpulseTemplate (defines trigger capabilities) → Impulse (configured trigger) → Launches Stories

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=itpl,categories={bubu,ai,catalog} +kubebuilder:printcolumn:name="Description",type=string,JSONPath=.spec.description +kubebuilder:printcolumn:name="Version",type=string,JSONPath=.spec.version +kubebuilder:printcolumn:name="Usage",type=integer,JSONPath=.status.usageCount +kubebuilder:printcolumn:name="Status",type=string,JSONPath=.status.validationStatus +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp

func (*ImpulseTemplate) DeepCopy

func (in *ImpulseTemplate) DeepCopy() *ImpulseTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImpulseTemplate.

func (*ImpulseTemplate) DeepCopyInto

func (in *ImpulseTemplate) DeepCopyInto(out *ImpulseTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ImpulseTemplate) DeepCopyObject

func (in *ImpulseTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ImpulseTemplate) GetImage added in v0.1.4

func (t *ImpulseTemplate) GetImage() string

GetImage returns the template's container image.

func (*ImpulseTemplate) GetTemplateStatus added in v0.1.4

func (t *ImpulseTemplate) GetTemplateStatus() *TemplateStatus

GetTemplateStatus returns a pointer to the embedded TemplateStatus. This enables shared status update helpers to operate on both template types.

func (*ImpulseTemplate) GetVersion added in v0.1.4

func (t *ImpulseTemplate) GetVersion() string

GetVersion returns the template's version.

type ImpulseTemplateList

type ImpulseTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []ImpulseTemplate `json:"items"`
}

+kubebuilder:object:root=true

func (*ImpulseTemplateList) DeepCopy

func (in *ImpulseTemplateList) DeepCopy() *ImpulseTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImpulseTemplateList.

func (*ImpulseTemplateList) DeepCopyInto

func (in *ImpulseTemplateList) DeepCopyInto(out *ImpulseTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ImpulseTemplateList) DeepCopyObject

func (in *ImpulseTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ImpulseTemplateSpec

type ImpulseTemplateSpec struct {
	// Common template fields (version, description, image, etc.)
	TemplateSpec `json:",inline"`

	// What data does this trigger provide when events occur?
	// This defines the structure of the event context that will be available for mapping to Story inputs
	// Examples:
	// - GitHub webhook: {"repository": "object", "ref": "string", "commits": "array", "sender": "object"}
	// - File watcher: {"bucket": "string", "objectKey": "string", "size": "integer", "timestamp": "string"}
	// - Slack event: {"channel": "string", "user": "object", "message": "string", "timestamp": "string"}
	// - Cron trigger: {"scheduledTime": "string", "timezone": "string", "schedule": "string"}
	// +kubebuilder:pruning:PreserveUnknownFields
	ContextSchema *runtime.RawExtension `json:"contextSchema,omitempty"`

	// DeliveryPolicy defines default trigger delivery behavior (dedupe/retry) for Impulses.
	// +optional
	DeliveryPolicy *TriggerDeliveryPolicy `json:"deliveryPolicy,omitempty"`
}

ImpulseTemplateSpec defines the capabilities and contract of a trigger component

func (*ImpulseTemplateSpec) DeepCopy

func (in *ImpulseTemplateSpec) DeepCopy() *ImpulseTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImpulseTemplateSpec.

func (*ImpulseTemplateSpec) DeepCopyInto

func (in *ImpulseTemplateSpec) DeepCopyInto(out *ImpulseTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImpulseTemplateStatus

type ImpulseTemplateStatus struct {
	TemplateStatus `json:",inline"`
}

func (*ImpulseTemplateStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImpulseTemplateStatus.

func (*ImpulseTemplateStatus) DeepCopyInto

func (in *ImpulseTemplateStatus) DeepCopyInto(out *ImpulseTemplateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretDefinition

type SecretDefinition struct {
	// Whether this secret is required for the template to function
	Required bool `json:"required,omitempty"`

	// Human-readable description of what this secret is used for
	// Example: "API key for OpenAI authentication", "Database connection credentials"
	Description string `json:"description,omitempty"`

	// How this secret should be mounted and accessed
	// - env: As environment variables (default for simple secrets)
	// - file: As mounted files (better for certificates, config files)
	// - both: Available as both env vars and files
	MountType enums.SecretMountType `json:"mountType,omitempty"`

	// For env mounting: what environment variable prefix to use
	// If not specified, uses secret name in uppercase
	// Example: "DATABASE" -> DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD
	EnvPrefix string `json:"envPrefix,omitempty"`

	// For file mounting: where to mount the secret files
	// Example: "/etc/secrets/database", "/opt/certs"
	MountPath string `json:"mountPath,omitempty"`

	// Expected keys in this secret (for validation and documentation)
	// Example: ["host", "username", "password"] or ["api-key", "org-id"]
	ExpectedKeys []string `json:"expectedKeys,omitempty"`
}

SecretDefinition defines the structure and requirements of a secret This handles both simple key-value secrets and complex structured secrets

func (*SecretDefinition) DeepCopy

func (in *SecretDefinition) DeepCopy() *SecretDefinition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretDefinition.

func (*SecretDefinition) DeepCopyInto

func (in *SecretDefinition) DeepCopyInto(out *SecretDefinition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateExecutionPolicy

type TemplateExecutionPolicy struct {
	// Image handling recommendations (pull policies, etc.)
	Images *TemplateImagePolicy `json:"images,omitempty"`

	// Resource recommendations (how much CPU/memory this typically needs)
	Resources *TemplateResourcePolicy `json:"resources,omitempty"`

	// Security requirements and recommendations
	Security *TemplateSecurityPolicy `json:"security,omitempty"`

	// Job-specific recommendations (for templates that run as jobs)
	Job *TemplateJobPolicy `json:"job,omitempty"`

	// Retry behavior recommendations
	Retry *TemplateRetryPolicy `json:"retry,omitempty"`

	// Default timeout recommendation
	Timeout *string `json:"timeout,omitempty"`

	// Service exposure defaults for realtime components (and impulses)
	Service *TemplateServicePolicy `json:"service,omitempty"`

	// Health check probes (liveness, readiness, startup)
	// These are defined using standard Kubernetes probe format
	Probes *TemplateProbePolicy `json:"probes,omitempty"`

	// Storage recommendations for workloads that offload large inputs/outputs.
	Storage *TemplateStoragePolicy `json:"storage,omitempty"`

	// RBAC policies to bind to the generated ServiceAccount when using this template.
	RBAC *TemplateRBACPolicy `json:"rbac,omitempty"`
}

TemplateExecutionPolicy defines what template authors recommend for running this component These are the "manufacturer's recommended settings" that provide good defaults Users can override these when creating Engrams/Impulses if they have special requirements

func (*TemplateExecutionPolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateExecutionPolicy.

func (*TemplateExecutionPolicy) DeepCopyInto

func (in *TemplateExecutionPolicy) DeepCopyInto(out *TemplateExecutionPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateFileStorageProvider added in v0.1.4

type TemplateFileStorageProvider struct {
	Path            string                       `json:"path,omitempty"`
	VolumeClaimName string                       `json:"volumeClaimName,omitempty"`
	EmptyDir        *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}

TemplateFileStorageProvider configures file storage for templates.

func (*TemplateFileStorageProvider) DeepCopy added in v0.1.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateFileStorageProvider.

func (*TemplateFileStorageProvider) DeepCopyInto added in v0.1.4

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateImagePolicy

type TemplateImagePolicy struct {
	// Default image pull policy for this template (Always, Never, IfNotPresent)
	PullPolicy *string `json:"pullPolicy,omitempty"`
}

TemplateImagePolicy defines image-related template defaults Note: We don't include registry preferences as Kubernetes handles this natively

func (*TemplateImagePolicy) DeepCopy

func (in *TemplateImagePolicy) DeepCopy() *TemplateImagePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateImagePolicy.

func (*TemplateImagePolicy) DeepCopyInto

func (in *TemplateImagePolicy) DeepCopyInto(out *TemplateImagePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateJobPolicy

type TemplateJobPolicy struct {
	// Recommended backoff limit for this template
	RecommendedBackoffLimit *int32 `json:"recommendedBackoffLimit,omitempty"`
	// Recommended TTL after finished for this template
	RecommendedTTLSecondsAfterFinished *int32 `json:"recommendedTtlSecondsAfterFinished,omitempty"`
	// Recommended restart policy for this template
	RecommendedRestartPolicy *string `json:"recommendedRestartPolicy,omitempty"`
}

TemplateJobPolicy defines job configuration defaults for this template

func (*TemplateJobPolicy) DeepCopy

func (in *TemplateJobPolicy) DeepCopy() *TemplateJobPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateJobPolicy.

func (*TemplateJobPolicy) DeepCopyInto

func (in *TemplateJobPolicy) DeepCopyInto(out *TemplateJobPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateProbePolicy

type TemplateProbePolicy struct {
	// Liveness probe checks if the container is alive
	// If this probe fails, the container will be restarted
	// +optional
	Liveness *corev1.Probe `json:"liveness,omitempty"`

	// Readiness probe checks if the container is ready to serve traffic
	// If this probe fails, the pod will be removed from service endpoints
	// +optional
	Readiness *corev1.Probe `json:"readiness,omitempty"`

	// Startup probe checks if the application has started
	// All other probes are disabled until this succeeds
	// Useful for slow-starting containers
	// +optional
	Startup *corev1.Probe `json:"startup,omitempty"`
}

TemplateProbePolicy defines health check probes recommended by the template Uses standard Kubernetes probe format for maximum compatibility

func (*TemplateProbePolicy) DeepCopy

func (in *TemplateProbePolicy) DeepCopy() *TemplateProbePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateProbePolicy.

func (*TemplateProbePolicy) DeepCopyInto

func (in *TemplateProbePolicy) DeepCopyInto(out *TemplateProbePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateRBACPolicy added in v0.1.4

type TemplateRBACPolicy struct {
	// Rules lists additional Role rules appended to the default policy.
	// +optional
	Rules []rbacv1.PolicyRule `json:"rules,omitempty"`
}

TemplateRBACPolicy defines additional RBAC policies recommended by the template.

func (*TemplateRBACPolicy) DeepCopy added in v0.1.4

func (in *TemplateRBACPolicy) DeepCopy() *TemplateRBACPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateRBACPolicy.

func (*TemplateRBACPolicy) DeepCopyInto added in v0.1.4

func (in *TemplateRBACPolicy) DeepCopyInto(out *TemplateRBACPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateResourcePolicy

type TemplateResourcePolicy struct {
	// Recommended CPU request for this template
	RecommendedCPURequest *string `json:"recommendedCpuRequest,omitempty"`
	// Recommended CPU limit for this template
	RecommendedCPULimit *string `json:"recommendedCpuLimit,omitempty"`
	// Recommended memory request for this template
	RecommendedMemoryRequest *string `json:"recommendedMemoryRequest,omitempty"`
	// Recommended memory limit for this template
	RecommendedMemoryLimit *string `json:"recommendedMemoryLimit,omitempty"`
	// Minimum resource requirements for this template
	MinCPURequest    *string `json:"minCpuRequest,omitempty"`
	MinMemoryRequest *string `json:"minMemoryRequest,omitempty"`
}

TemplateResourcePolicy defines resource defaults for this template

func (*TemplateResourcePolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateResourcePolicy.

func (*TemplateResourcePolicy) DeepCopyInto

func (in *TemplateResourcePolicy) DeepCopyInto(out *TemplateResourcePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateRetryPolicy

type TemplateRetryPolicy struct {
	// Recommended max retries for this template
	RecommendedMaxRetries *int `json:"recommendedMaxRetries,omitempty"`
	// Recommended backoff strategy for this template
	RecommendedBackoff *string `json:"recommendedBackoff,omitempty"`
	// Recommended base delay for this template
	RecommendedBaseDelay *string `json:"recommendedBaseDelay,omitempty"`
	// Recommended max delay for this template
	RecommendedMaxDelay *string `json:"recommendedMaxDelay,omitempty"`
}

TemplateRetryPolicy defines retry defaults for this template

func (*TemplateRetryPolicy) DeepCopy

func (in *TemplateRetryPolicy) DeepCopy() *TemplateRetryPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateRetryPolicy.

func (*TemplateRetryPolicy) DeepCopyInto

func (in *TemplateRetryPolicy) DeepCopyInto(out *TemplateRetryPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateS3Authentication added in v0.1.4

type TemplateS3Authentication struct {
	ServiceAccountAnnotations map[string]string            `json:"serviceAccountAnnotations,omitempty"`
	SecretRef                 *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}

TemplateS3Authentication defines S3 auth defaults for templates.

func (*TemplateS3Authentication) DeepCopy added in v0.1.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateS3Authentication.

func (*TemplateS3Authentication) DeepCopyInto added in v0.1.4

func (in *TemplateS3Authentication) DeepCopyInto(out *TemplateS3Authentication)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateS3StorageProvider added in v0.1.4

type TemplateS3StorageProvider struct {
	Bucket         string                   `json:"bucket"`
	Region         string                   `json:"region,omitempty"`
	Endpoint       string                   `json:"endpoint,omitempty"`
	Authentication TemplateS3Authentication `json:"authentication"`

	// UsePathStyle forces path-style addressing when this template targets S3-compatible stores.
	// +optional
	UsePathStyle bool `json:"usePathStyle,omitempty"`
}

TemplateS3StorageProvider mirrors S3 storage configuration for templates.

func (*TemplateS3StorageProvider) DeepCopy added in v0.1.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateS3StorageProvider.

func (*TemplateS3StorageProvider) DeepCopyInto added in v0.1.4

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateSecurityPolicy

type TemplateSecurityPolicy struct {
	// Whether this template requires running as non-root
	RequiresNonRoot *bool `json:"requiresNonRoot,omitempty"`
	// Whether this template requires read-only root filesystem
	RequiresReadOnlyRoot *bool `json:"requiresReadOnlyRoot,omitempty"`
	// Whether this template requires no privilege escalation
	RequiresNoPrivilegeEscalation *bool `json:"requiresNoPrivilegeEscalation,omitempty"`
	// Recommended user ID for this template
	RecommendedRunAsUser *int64 `json:"recommendedRunAsUser,omitempty"`
}

TemplateSecurityPolicy defines security defaults for this template

func (*TemplateSecurityPolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSecurityPolicy.

func (*TemplateSecurityPolicy) DeepCopyInto

func (in *TemplateSecurityPolicy) DeepCopyInto(out *TemplateSecurityPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateServicePolicy

type TemplateServicePolicy struct {
	// Ports defines external service ports and their target container ports
	Ports []TemplateServicePort `json:"ports,omitempty"`
}

TemplateServicePolicy defines default service exposure settings recommended by the template

func (*TemplateServicePolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateServicePolicy.

func (*TemplateServicePolicy) DeepCopyInto

func (in *TemplateServicePolicy) DeepCopyInto(out *TemplateServicePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateServicePort

type TemplateServicePort struct {
	Name       string `json:"name,omitempty"`
	Protocol   string `json:"protocol,omitempty"`
	Port       int32  `json:"port"`
	TargetPort int32  `json:"targetPort"`
}

TemplateServicePort maps a Service port to a target container port

func (*TemplateServicePort) DeepCopy

func (in *TemplateServicePort) DeepCopy() *TemplateServicePort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateServicePort.

func (*TemplateServicePort) DeepCopyInto

func (in *TemplateServicePort) DeepCopyInto(out *TemplateServicePort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateSpec

type TemplateSpec struct {
	// Version of this template package (use semantic versioning like "1.2.3")
	// This allows users to pin to specific versions or upgrade safely
	Version string `json:"version"`

	// Human-readable description of what this template does
	// Examples: "HTTP client with retry and timeout support", "OpenAI GPT integration"
	Description string `json:"description,omitempty"`

	// Which Kubernetes workload types this template supports
	// - job: One-shot tasks (like batch processing, CI builds)
	// - deployment: Always-on stateless services (like APIs, webhooks)
	// - statefulset: Always-on stateful services (like databases, file processors)
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=3
	SupportedModes []enums.WorkloadMode `json:"supportedModes"`

	// JSON Schema defining how users can configure this template
	// This validates the "with" field when users create Engrams/Impulses
	// Example: {"timeout": {"type": "string"}, "retries": {"type": "integer"}}
	// +kubebuilder:pruning:PreserveUnknownFields
	ConfigSchema *runtime.RawExtension `json:"configSchema,omitempty"`

	// Secret definitions that this template can use
	// Defines what secrets this template expects and how they should be structured
	// Users must provide corresponding secrets when creating Engrams/Impulses
	SecretSchema map[string]SecretDefinition `json:"secretSchema,omitempty"`

	// Container image that implements this template's functionality
	// This is the actual code that runs when someone uses this template
	// +kubebuilder:validation:MaxLength=512
	Image string `json:"image,omitempty"`

	// Default execution settings that template authors recommend
	// These provide sensible defaults but can be overridden by users
	Execution *TemplateExecutionPolicy `json:"execution,omitempty"`
}

TemplateSpec defines the common "package definition" fields for templates This is like a package.json, Chart.yaml, or Dockerfile - it describes what the component can do

func (*TemplateSpec) DeepCopy

func (in *TemplateSpec) DeepCopy() *TemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.

func (*TemplateSpec) DeepCopyInto

func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateStatus

type TemplateStatus struct {
	// observedGeneration is the most recent generation observed for this Template. It corresponds to the
	// Template's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Standard Kubernetes conditions (Ready, Available, etc.)
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// How many Engrams/Impulses are currently using this template
	// Useful for understanding template popularity and impact of changes
	// +optional
	UsageCount int32 `json:"usageCount"`

	// Whether this template passed validation checks
	ValidationStatus enums.ValidationStatus `json:"validationStatus,omitempty"`

	// If validation failed, what were the specific errors?
	// Helps template authors fix issues with their schemas or configuration
	ValidationErrors []string `json:"validationErrors,omitempty"`
}

TemplateStatus shows the current state and usage of this template

func (*TemplateStatus) DeepCopy

func (in *TemplateStatus) DeepCopy() *TemplateStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateStatus.

func (*TemplateStatus) DeepCopyInto

func (in *TemplateStatus) DeepCopyInto(out *TemplateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateStoragePolicy added in v0.1.4

type TemplateStoragePolicy struct {
	S3             *TemplateS3StorageProvider   `json:"s3,omitempty"`
	File           *TemplateFileStorageProvider `json:"file,omitempty"`
	TimeoutSeconds int                          `json:"timeoutSeconds,omitempty"`
}

TemplateStoragePolicy defines default storage configuration for templates.

func (*TemplateStoragePolicy) DeepCopy added in v0.1.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateStoragePolicy.

func (*TemplateStoragePolicy) DeepCopyInto added in v0.1.4

func (in *TemplateStoragePolicy) DeepCopyInto(out *TemplateStoragePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TriggerDedupeMode added in v0.1.4

type TriggerDedupeMode string

TriggerDedupeMode enumerates supported dedupe strategies. +kubebuilder:validation:Enum=none;token;key

const (
	TriggerDedupeNone  TriggerDedupeMode = "none"
	TriggerDedupeToken TriggerDedupeMode = "token"
	TriggerDedupeKey   TriggerDedupeMode = "key"
)

type TriggerDedupePolicy added in v0.1.4

type TriggerDedupePolicy struct {
	// Mode selects the dedupe strategy.
	// - none: no deduplication
	// - token: use caller-provided trigger token
	// - key: derive a token from keyTemplate
	// +optional
	Mode *TriggerDedupeMode `json:"mode,omitempty"`

	// KeyTemplate is a template string used to derive a dedupe key when mode=key.
	// +optional
	KeyTemplate *string `json:"keyTemplate,omitempty"`
}

TriggerDedupePolicy configures trigger deduplication.

func (*TriggerDedupePolicy) DeepCopy added in v0.1.4

func (in *TriggerDedupePolicy) DeepCopy() *TriggerDedupePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerDedupePolicy.

func (*TriggerDedupePolicy) DeepCopyInto added in v0.1.4

func (in *TriggerDedupePolicy) DeepCopyInto(out *TriggerDedupePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TriggerDeliveryPolicy added in v0.1.4

type TriggerDeliveryPolicy struct {
	// Dedupe configures trigger deduplication behavior.
	// +optional
	Dedupe *TriggerDedupePolicy `json:"dedupe,omitempty"`

	// Retry configures trigger retry behavior for transient failures.
	// +optional
	Retry *TriggerRetryPolicy `json:"retry,omitempty"`
}

TriggerDeliveryPolicy controls how Impulses deliver trigger events to Stories. Template policies provide defaults; Impulse policies can override them.

func (*TriggerDeliveryPolicy) DeepCopy added in v0.1.4

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerDeliveryPolicy.

func (*TriggerDeliveryPolicy) DeepCopyInto added in v0.1.4

func (in *TriggerDeliveryPolicy) DeepCopyInto(out *TriggerDeliveryPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TriggerRetryPolicy added in v0.1.4

type TriggerRetryPolicy struct {
	// MaxAttempts caps total trigger attempts (including the first).
	// +kubebuilder:validation:Minimum=0
	// +optional
	MaxAttempts *int32 `json:"maxAttempts,omitempty"`

	// BaseDelay is the initial retry delay (Go duration string).
	// +optional
	BaseDelay *string `json:"baseDelay,omitempty"`

	// MaxDelay caps the computed retry delay (Go duration string).
	// +optional
	MaxDelay *string `json:"maxDelay,omitempty"`

	// Backoff controls how retry delays are computed.
	// +optional
	Backoff *enums.BackoffStrategy `json:"backoff,omitempty"`
}

TriggerRetryPolicy configures trigger retry settings.

func (*TriggerRetryPolicy) DeepCopy added in v0.1.4

func (in *TriggerRetryPolicy) DeepCopy() *TriggerRetryPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerRetryPolicy.

func (*TriggerRetryPolicy) DeepCopyInto added in v0.1.4

func (in *TriggerRetryPolicy) DeepCopyInto(out *TriggerRetryPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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