Documentation
¶
Index ¶
- Constants
- Variables
- func IsConditionTrue(conditions []Condition, condType string) bool
- func NormalizeRepoURL(url string) string
- func SetCondition(conditions *[]Condition, cond Condition)
- func UserOrgNameFromOauth(name string) string
- type APIToken
- type Addon
- type Annotation
- type Annotations
- type AzureCredentials
- type BuildArtifactSource
- type BuildArtifactSources
- type BuildArtifactSyncInfo
- type BuildConfigSpec
- type BuildContextSource
- type BuildFailureDetail
- type BuildImageRepository
- type BuildSourceRevision
- type Cluster
- type ClusterImageRegistry
- type ClusterImageRegistryOperand
- type ClusterImageRegistryStatus
- type ClusterInfo
- type ClusterInfoPhase
- type ClusterIngressClass
- type ClusterLoadBalancer
- type ClusterNode
- type ClusterStorageClass
- type Condition
- type ConditionStatus
- type ConnectionConfig
- type ConnectionConfigKey
- type ConnectionKind
- type ConnectionMapping
- type ConnectionMappings
- type ConnectionTarget
- type ConnectionTargetType
- type ContainerFailureDetail
- type Dependencies
- type DeployedClusterInfo
- type EnvSecretRef
- type EnvVar
- type EnvVars
- type ExecutionConfig
- type GCSCredentials
- type GitAccountType
- type GitBuildSource
- type GitHubAppCredentials
- type GitHubAppManifestFlow
- type GitHubAppMintResult
- type GitInstallation
- type GitIntegration
- type GitIntegrationAuth
- type GitIntegrationBasicAuth
- type GitIntegrationStatus
- type GitIntegrationType
- type GitRepoRevision
- type GitRepoRevisionType
- type GitRepoSource
- type GitRevision
- type ImageBuild
- type ImageBuildStatus
- type ImageConfigSpec
- type ImageOverrides
- type Ingress
- type InitConfig
- type InviteStatus
- type Label
- type Labels
- type LifecycleConfig
- type Meta
- type Namespace
- type NodeCapacity
- type OAuthState
- type ObjectStore
- type ObjectStoreConfiguration
- type ObjectStoreStatus
- type OrgInvite
- type OrgInviteOperand
- type OrgRegistryDefaults
- type Organisation
- type OrganisationDomain
- type OutputDescriptor
- type OutputValueRef
- type OutputValueType
- type Port
- type Ports
- type PostgresAddon
- func (p PostgresAddon) AddonName() string
- func (p PostgresAddon) DefaultDatabaseSpecified() bool
- func (p *PostgresAddon) EnsureDeclaredOutputs() []OutputDescriptor
- func (p *PostgresAddon) ExternalClusterRefName() string
- func (p *PostgresAddon) HasDatabase(name string) bool
- func (p *PostgresAddon) ImportPasswordSecretName() string
- func (p PostgresAddon) Type() string
- type PostgresAddonClusterSecrets
- type PostgresAddonConditionType
- type PostgresAddonConnectionInfo
- type PostgresAddonDatabase
- type PostgresAddonOperand
- type PostgresAddonState
- type PostgresAddonStatus
- type PostgresBackup
- type PostgresBackupConfig
- type PostgresBackupType
- type PostgresCPUResource
- type PostgresConfiguration
- type PostgresCredentials
- type PostgresDatabaseInfo
- type PostgresExtensions
- type PostgresImportFromExternal
- type PostgresInitialization
- type PostgresInstancePlacement
- type PostgresInstances
- type PostgresLifecycleConfig
- type PostgresMemoryResource
- type PostgresResources
- type PostgresRestoreFromBackup
- type PostgresRestoreFromObjectStore
- type PostgresStorage
- type PostgresToleration
- type PostgresVersion
- type PreviewGitRepository
- type PreviewReconcilerStatus
- type PreviewStack
- type PreviewStackOperand
- type PreviewStackOutputs
- type PreviewStackPhase
- type PreviewStackSource
- type PreviewStackStatus
- type PreviewURL
- type Project
- type ProjectMembership
- type ProjectRole
- type ReferentType
- type RefreshToken
- type RegistryCredential
- type RegistryCredentialPurpose
- type RegistryState
- type RelationKind
- type ReleaseCause
- type ReleaseCauseKind
- type ReleaseEvent
- type ReleaseEventLevel
- type ReleaseEventLink
- type ReleaseEventLinks
- type ReleaseEventMetadata
- type ReleaseEventScope
- type ReleaseEventSource
- type ReleaseEventType
- type ReleaseHealth
- type ReleaseLiveStatus
- type ReleaseManifest
- type ReleaseOutcome
- type ReleasePins
- type ReleaseSummary
- type ReleaseValidationError
- type ReleaseValidationErrors
- type ReleaseWorkerStatus
- type RemoteDirSource
- type ResourceMetrics
- type ResourceOutcome
- type ResourcePins
- type ResourceReference
- type ResourceValidationCheckKind
- type ResourceValidationRecord
- type S3Credentials
- type SSHConfig
- type Secret
- type SecretKeys
- type SecretReference
- type SecretType
- type SourceVolumeType
- type Stack
- func (ws *Stack) DirectConfigSecretsInUse() []string
- func (s *Stack) EffectiveSettings() StackSettings
- func (s *Stack) ExposedPortFqdnMap() map[string]map[int]string
- func (s *Stack) GetConvergedReleaseID() string
- func (s *Stack) GetGitCredentialsMap() map[string]string
- func (s *Stack) GetImagePullSecretIDMap() map[string]string
- func (s *Stack) GetImagePushSecretIDMap() map[string]string
- func (s *Stack) HasConvergedRelease() bool
- func (s *Stack) HasExposedPorts() bool
- func (s *Stack) HasGitCredentials() bool
- func (s *Stack) HasImageBuilds() bool
- func (s *Stack) HasImagePullSecrets() bool
- func (s *Stack) HasImagePushSecrets() bool
- func (ws *Stack) HasVolumeMounts() bool
- func (ws *Stack) ResourcesMap() map[string]*StackResource
- func (ws *Stack) SecretsInUse() []string
- func (ws *Stack) VolumeMountIds() []string
- func (ws *Stack) VolumesMap() map[string]*Volume
- type StackConditionType
- type StackConnection
- func (c *StackConnection) ComputeDiscriminator() string
- func (c StackConnection) ConfigBool(key string) (bool, bool, error)
- func (c StackConnection) ConfigString(key string) (string, bool, error)
- func (c StackConnection) IsKind(kind ConnectionKind) bool
- func (c StackConnection) RequiredConfigString(key string) (string, error)
- func (c StackConnection) SourceIs(nodeType TopologyNodeType) bool
- func (StackConnection) TableName() string
- func (c StackConnection) TargetIs(nodeType TopologyNodeType) bool
- func (c StackConnection) TargetsStackResource(resourceName string) bool
- type StackConnections
- func (connections StackConnections) EnvForStackResource(resourceName string) StackConnections
- func (connections StackConnections) FromType(sourceType TopologyNodeType) StackConnections
- func (connections StackConnections) HasAnyKind(kinds ...ConnectionKind) bool
- func (connections StackConnections) OfKind(kind ConnectionKind) StackConnections
- func (c *StackConnections) Scan(value interface{}) error
- func (c StackConnections) Value() (driver.Value, error)
- type StackConvergenceRecord
- type StackDomain
- type StackDomainList
- type StackOperand
- type StackPhase
- type StackPreviewConfig
- type StackRelease
- type StackReleaseOperand
- type StackReleaseRefs
- type StackReleaseState
- type StackResource
- func (r *StackResource) EnsureDeclaredOutputs() []OutputDescriptor
- func (s *StackResource) GitIntegrationID() string
- func (s *StackResource) HasGitCredentials() bool
- func (s *StackResource) HasImagePullSecrets() bool
- func (s *StackResource) HasImagePushSecrets() bool
- func (r *StackResource) InternalServiceHost() string
- func (s *StackResource) RegistryPullCredentialID() string
- func (s *StackResource) RegistryPushCredentialID() string
- func (r *StackResource) ToOutputMap() map[string]string
- func (v *StackResource) VolumeMountMap() map[string]*VolumeMount
- type StackResourceConditionType
- type StackResourceConvergenceRecord
- type StackResourceFailure
- type StackResourceFailureType
- type StackResourcePhase
- type StackResourceState
- type StackResourceStatus
- type StackResourceSummary
- type StackSettings
- type StackShellSnapshot
- type StackSnapshot
- type StackState
- type StackStatus
- type StackStorage
- type StackStorageState
- type StackStorageStatus
- type StackTopology
- type StackVolume
- type StringSlice
- type TopologyEdge
- type TopologyNode
- type TopologyNodeRef
- type TopologyNodeType
- type User
- type UserRole
- type ValidationRun
- type ValueRef
- type Volume
- type VolumeAccessMode
- type VolumeBuildSource
- type VolumeMount
- type VolumeMountPath
- type VolumeOperand
- type VolumeRevision
- type VolumeSource
- type VolumeStatus
- type WorkloadType
Constants ¶
const ( CloudflareAPITokenSecretName = "cloudflare-api-token" CloudflareAPITokenSecretKey = "api-token" DNSIssuerName = "letsencrypt-dns" DNSIssuerPrivateKeySecretName = "letsencrypt-dns-key" PlatformWildcardTLSName = "platform-wildcard-tls" )
Fixed names for the platform wildcard TLS resources. The DNS Issuer and its supporting Secret are namespace-scoped, so all of these resources reside in the namespace selected by the bootstrap configuration.
const ( // DefaultRegistryStorageSize applies to registries created via the API // on an org's own cluster. DefaultRegistryStorageSize = "50Gi" // DefaultPlatformOrgRegistryStorageSize applies to the registry seeded // for each org at signup on the shared-compute cluster. DefaultPlatformOrgRegistryStorageSize = "10Gi" )
const ( GitTokenMintedAtAnnotation = "stackdome.io/git-token-minted-at" GitTokenExpiresAtAnnotation = "stackdome.io/git-token-expires-at" GitIntegrationIDAnnotation = "stackdome.io/git-integration-id" )
Annotations stamped on cluster secrets synced from minted GitHub App installation tokens, driving hub-side refresh.
const ( GitTokenRefreshFailedConditionType = "GitTokenRefreshFailed" GitTokenRefreshFailedConditionReason = "MintFailed" )
Condition recorded on image builds when a GitHub App token refresh fails.
const ( DefaultDockerfilePath = "Dockerfile" DefaultBuildContext = "." )
const ( ManagedByLabelKey = "stackdome.io/managed-by" ManagedByLabelValue = "stackdome" CloudTenantLabelKey = "stackdome.io/cloud-tenant" CloudTenantLabelValue = "true" OrganizationIDLabelKey = "stackdome.io/organization-id" NamespaceRoleLabelKey = "stackdome.io/namespace-role" NamespaceRoleStack = "stack" NamespaceRoleAddon = "addon" )
const ( // KubernetesDNSLabelMaxLength is the RFC 1123 DNS-label cap Kubernetes // applies to namespace names and label values. KubernetesDNSLabelMaxLength = 63 // NamespaceNameSeparator joins the stack name and the UUID suffix in a // generated namespace name. NamespaceNameSeparator = "-" // NamespaceUUIDLength is the length of canonical RFC 4122 UUID text (as // produced by uuid.UUID.String()). NamespaceUUIDLength = 36 // NamespaceUUIDSuffixLength is the length of the full // "<separator><uuid>" suffix appended to the stack name before // truncation. Short stack names keep it whole. NamespaceUUIDSuffixLength = len(NamespaceNameSeparator) + NamespaceUUIDLength // MinNamespaceUUIDSuffixLength is the entropy floor: at least this many // UUID characters must survive truncation so generated namespace names // stay effectively collision-free. MinNamespaceUUIDSuffixLength = 8 // MaxStackNameLength is the stack-name budget inside a generated // namespace name: the DNS-label cap minus the separator and the entropy // floor (63 - 1 - 8 = 54). MaxStackNameLength = KubernetesDNSLabelMaxLength - len(NamespaceNameSeparator) - MinNamespaceUUIDSuffixLength )
Stack namespaces are generated as "<stack-name>-<uuid>" and then truncated from the end to the DNS-label cap (see PrepareNamespaceForStack in pkg/services/namespace_service.go). A Kubernetes namespace name is an RFC 1123 DNS label capped at 63 characters; truncation cuts the UUID tail, so the stack name only has to leave room for the separator plus the minimum surviving slice of UUID entropy — not the full UUID. Namespace generation and stack-name validation both derive from these constants — they are the single source of truth for that budget.
const ( // AddonNamespacePrefix prefixes every generated addon namespace name. AddonNamespacePrefix = "stackdome-addons" // MaxAddonTypeLength reserves room for the longest addon type slug // ("postgres") in the addon-name budget. MaxAddonTypeLength = 8 // MaxAddonNameLength is the addon-name budget inside a generated // namespace name: the DNS-label cap minus the prefix, the type reservation, // the three separators (prefix-type, type-name, name-uuid), and the entropy // floor (63 - 16 - 8 - 3 - 8 = 28). MaxAddonNameLength = KubernetesDNSLabelMaxLength - len(AddonNamespacePrefix) - MaxAddonTypeLength - 3*len(NamespaceNameSeparator) - MinNamespaceUUIDSuffixLength )
Addon namespaces are generated as "stackdome-addons-<type>-<name>-<uuid>" and truncated from the end to the DNS-label cap (see PrepareNamespaceForAddon in pkg/services/namespace_service.go). These constants are the single source of truth for the addon-name budget, mirroring the stack-name budget above.
const ( OAuthProviderGitHub = "github" OAuthStateTableName = "oauth_states" )
const ( OutputNameHost = "host" OutputNamePort = "port" OutputNameDatabase = "database" OutputNameUsername = "username" OutputNamePassword = "password" OutputNameSSLMode = "sslmode" OutputNameCACertificate = "ca_certificate" OutputNameURL = "url" OutputNamePublicHost = "public_host" OutputNamePublicURL = "public_url" )
const ( PostgresAddonIDLabel = "postgres-addon.stackdome.io/id" DefaultDatabaseName = "app" )
const ( PreviewStackLabel = "preview.stackdome.io/preview-stack" PreviewConfigIDLabel = "preview.stackdome.io/config-id" PreviewPRNumberLabel = "preview.stackdome.io/pr-number" PreviewStackIDLabel = "preview.stackdome.io/preview-id" )
const ( ReleaseEventMetaReason = "reason" ReleaseEventMetaCheck = "check" ReleaseEventMetaBuildID = "build_id" )
Well-known metadata keys.
const ( RegistrySecretKey = "registry" UsernameSecretKey = "username" PasswordSecretKey = "password" SshSecretKey = "ssh_private_key" TokenSecretKey = "token" )
const ( SecretDataHashAnnotation = "stackdome.io/secret-data-hash" SecretIDAnnotation = "stackdome.io/secret-id" )
const ( StackIDLabel = "core.stackdome.io/stack-id" StackIDAnnotation = "stack.stackdome.io/id" StackRevisionLabel = "stack.stackdome.io/revision" )
const ( SkipClusterProvisioningAnnotation = "stack.stackdome.io/skip-cluster-provisioning" SimulateReleaseStateAnnotation = "stack.stackdome.io/simulate-release-state" )
const ( DefaultReleaseRetentionLimit = 10 DefaultMinSuccessfulReleases = 5 MaxReleaseRetentionLimit = 50 MaxMinSuccessfulReleases = 20 )
const ( CredentialScopeOwner = "owner" CredentialScopeSuperuser = "superuser" )
Postgres credential_scope values
const ( DefaultMaxActivePreviews = 10 MaxMaxActivePreviews = 50 DefaultStackfilePath = "stackfile.yaml" DefaultBaseBranch = "main" )
const ( PortProtocolHTTP = "http" PortProtocolGRPC = "grpc" PortProtocolTCP = "tcp" )
const ( VolumePhasePending = "Pending" VolumePhaseReady = "Ready" )
const (
AssignedNodeAnnotation = "assigned-node"
)
const (
CreatedForUserLabel = "user.stackdome.io/id"
)
const DefaultClusterIssuerName = "letsencrypt-prod"
const (
DefaultObjectStoreRetentionPolicy = "7d"
)
const (
DefaultProjectName = "default"
)
const (
DependsOnTopologyEdgeKind = "depends_on"
)
const (
ImageRegistryIDLabel = "registry.stackdome.io/id"
)
const LabelValueTrue = "true"
const OAuthProviderGitHubAppInstall = "github_app_install"
OAuthProviderGitHubAppInstall scopes platform-app install state records.
const OAuthProviderGitHubAppManifest = "github_app_manifest"
OAuthProviderGitHubAppManifest scopes manifest-flow state records.
const (
ObjectServerGeneration = "managedobject.stackdome.io/generation"
)
const PlatformOrganisationName = "PlatformOrganisation"
const RegistryCredentialIDAnnotation = "stackdome.io/registry-credential-id"
RegistryCredentialIDAnnotation records which org-level registry credential a synced cluster secret was synthesized from.
const ReleaseCreatedByPreviewSync = "system:preview-sync"
const ReleaseEventLinkKindBuildLogs = "build_logs"
Link kinds.
const (
VolumeIDLabel = "volume.stackdome.io/id"
)
Variables ¶
var NonGrippingReleaseStates = []StackReleaseState{ ReleaseStateFailed, ReleaseStateSuperseded, ReleaseStateCancelled, }
NonGrippingReleaseStates lists release states that should NOT hold delete-protection ("grip") on referenced resources.
A release grips its referenced secrets/volumes/addons so that rolling back to it remains safe — the resources it needs must still exist. Only Released releases are valid rollback targets; Pending and InProgress releases may still converge and become the live deployment. Failed, Superseded, and Cancelled releases can never be redeployed, so their grip serves no purpose and would only block resource deletion until GC ages them out of the retention window.
Grip is derived at query time (LEFT JOIN on stack_releases.state) rather than toggled by a write on state transition, so it tracks release lifecycle automatically and cannot drift.
var SupportedPostgresExtensions = []string{
"vector",
}
Functions ¶
func IsConditionTrue ¶
func NormalizeRepoURL ¶
NormalizeRepoURL collapses scheme, userinfo, ".git" and trailing-slash variants to "host/owner/repo" so equivalent repo URLs compare equal.
func SetCondition ¶
func UserOrgNameFromOauth ¶
Types ¶
type APIToken ¶
type APIToken struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
Name string `gorm:"not null" json:"name"`
UserID string `gorm:"not null" json:"userId"`
TokenHash string `gorm:"not null" json:"-"`
TokenPrefix string `gorm:"not null" json:"tokenPrefix"`
Scopes StringSlice `gorm:"type:jsonb;not null" json:"scopes"`
ResourceIDs StringSlice `gorm:"type:jsonb" json:"resourceIds,omitempty"`
OrgID string `gorm:"not null" json:"orgId"`
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
CreatedAt time.Time `gorm:"not null" json:"createdAt"`
RevokedAt *time.Time `json:"revokedAt,omitempty"`
}
type Annotation ¶
type Annotations ¶
type Annotations []Annotation
func (*Annotations) Scan ¶
func (a *Annotations) Scan(value interface{}) error
type AzureCredentials ¶
type AzureCredentials struct {
ConnectionString SecretReference `json:"connectionString"`
StorageAccountName string `json:"storageAccountName"`
}
type BuildArtifactSource ¶
type BuildArtifactSource struct {
ResourceName string `json:"resource_name"`
SourcePath string `json:"source_path"`
DestinationPath string `json:"destination_path"`
}
func (*BuildArtifactSource) Scan ¶
func (b *BuildArtifactSource) Scan(value interface{}) error
type BuildArtifactSources ¶
type BuildArtifactSources []BuildArtifactSource
func (*BuildArtifactSources) Scan ¶
func (b *BuildArtifactSources) Scan(value interface{}) error
type BuildArtifactSyncInfo ¶
type BuildArtifactSyncInfo struct {
ResourceName string `json:"resource_name"`
BuildID string `json:"build_id"`
Status string `json:"status"`
}
func (*BuildArtifactSyncInfo) Scan ¶
func (b *BuildArtifactSyncInfo) Scan(value interface{}) error
type BuildConfigSpec ¶
type BuildConfigSpec struct {
SourceContext BuildContextSource `json:"source_context"`
ContextPathWithinSource string `json:"context_path_within_source"`
DockerfilePath string `json:"dockerfile_path"`
SourceRevision BuildSourceRevision `json:"source_revision"`
BuildImageRepository BuildImageRepository `json:"build_image_repository"`
// PushRegistryCredentialID pins an org-level registry credential for the
// push target, overriding host auto-attach.
PushRegistryCredentialID string `json:"push_registry_credential_id,omitempty"`
}
func (*BuildConfigSpec) Scan ¶
func (bc *BuildConfigSpec) Scan(value interface{}) error
func (*BuildConfigSpec) Validate ¶
func (b *BuildConfigSpec) Validate() error
type BuildContextSource ¶
type BuildContextSource struct {
Volume *VolumeBuildSource `json:"volume"`
Git *GitBuildSource `json:"git"`
}
type BuildFailureDetail ¶
type BuildImageRepository ¶
type BuildSourceRevision ¶
type BuildSourceRevision struct {
Volume *VolumeRevision `json:"volume"`
Git *GitRevision `json:"git"`
}
type Cluster ¶
type Cluster struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null"`
Name string `gorm:"not null;check:name <> ''"`
CreatedAt time.Time
UpdatedAt time.Time
DeletionTimestamp *time.Time `json:"deletion_timestamp,omitempty"`
ClusterURL string `gorm:"not null;check:cluster_url <> '';uniqueIndex:idx_clusters_cluster_url_unique"`
EncryptedClusterCAData string `gorm:"not null"`
EncryptedToken string `gorm:"not null"`
ManagerRunning bool
ClusterInfo *ClusterInfo `gorm:"type:jsonb"`
ImageRegistries []*ClusterImageRegistry `gorm:"foreignKey:ClusterID"`
// Transient fields — populated by service layer after decryption, never persisted
ClusterCAData string `gorm:"-"`
Token string `gorm:"-"`
}
type ClusterImageRegistry ¶
type ClusterImageRegistry struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
ClusterID string `gorm:"not null;index:idx_cluster_image_registry_cluster_id" json:"cluster_id"`
OrganisationID string `gorm:"not null;index:idx_cluster_image_registry_organisation_id" json:"organisation_id"`
Name string `gorm:"not null;check:name <> ''" json:"name"`
BackendStorageSize string `gorm:"not null;check:backend_storage_size <> ''" json:"backend_storage_size"`
BackendStorageClass string
Status *ClusterImageRegistryStatus `gorm:"type:jsonb" json:"status"`
}
type ClusterImageRegistryOperand ¶
type ClusterImageRegistryOperand struct{ ClusterID string }
ClusterImageRegistryOperand serializes all registry reconciliation for one cluster, including cluster deletion once its registries have been removed.
type ClusterImageRegistryStatus ¶
type ClusterImageRegistryStatus struct {
State RegistryState `json:"state"`
Conditions []Condition `json:"conditions"`
RegistryUrl string `json:"registry_url"`
}
func (*ClusterImageRegistryStatus) Scan ¶
func (c *ClusterImageRegistryStatus) Scan(value interface{}) error
Scan and value methods for ClusterImageRegistryStatus
type ClusterInfo ¶
type ClusterInfo struct {
Phase ClusterInfoPhase `json:"phase,omitempty"`
LastRefreshedAt *time.Time `json:"lastRefreshedAt,omitempty"`
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
TotalNodes int `json:"totalNodes,omitempty"`
ReadyNodes int `json:"readyNodes,omitempty"`
AvailabilityZones []string `json:"availabilityZones,omitempty"`
Nodes []ClusterNode `json:"nodes,omitempty"`
StorageClasses []ClusterStorageClass `json:"storageClasses,omitempty"`
LoadBalancers []ClusterLoadBalancer `json:"loadBalancers,omitempty"`
IngressClasses []ClusterIngressClass `json:"ingressClasses,omitempty"`
}
func (*ClusterInfo) DefaultStorageClass ¶
func (c *ClusterInfo) DefaultStorageClass() string
DefaultStorageClass returns the name of the cluster's default StorageClass, or "" when none is marked default.
func (*ClusterInfo) Scan ¶
func (c *ClusterInfo) Scan(value interface{}) error
type ClusterInfoPhase ¶
type ClusterInfoPhase string
const ( ClusterInfoPhaseReady ClusterInfoPhase = "Ready" ClusterInfoPhaseRefreshing ClusterInfoPhase = "Refreshing" ClusterInfoPhaseUnknown ClusterInfoPhase = "Unknown" )
type ClusterIngressClass ¶
type ClusterLoadBalancer ¶
type ClusterNode ¶
type ClusterNode struct {
Name string `json:"name"`
Ready bool `json:"ready"`
AllocatableCPU *resource.Quantity `json:"allocatableCpu,omitempty"`
AllocatableMemory *resource.Quantity `json:"allocatableMemory,omitempty"`
AllocatableEphemeralDisk *resource.Quantity `json:"allocatableEphemeralDisk,omitempty"`
CapacityEphemeralDisk *resource.Quantity `json:"capacityEphemeralDisk,omitempty"`
Zone string `json:"zone,omitempty"`
Region string `json:"region,omitempty"`
}
type ClusterStorageClass ¶
type Condition ¶
type Condition struct {
Type string `json:"type"`
Status string `json:"status"`
LastTransitionTime time.Time `json:"last_transition_time"`
Reason string `json:"reason"`
Message string `json:"message"`
}
func ConvertConditions ¶
func FindCondition ¶
type ConditionStatus ¶
type ConditionStatus string
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
type ConnectionConfig ¶
type ConnectionConfig map[string]interface{}
func (*ConnectionConfig) Scan ¶
func (c *ConnectionConfig) Scan(value interface{}) error
type ConnectionConfigKey ¶
type ConnectionConfigKey string
const ( // Postgres addon config keys ConnectionConfigKeyDatabase ConnectionConfigKey = "database" ConnectionConfigKeyCredentialScope ConnectionConfigKey = "credential_scope" ConnectionConfigKeySuperuser ConnectionConfigKey = "superuser" // Volume mount config keys ConnectionConfigKeyMountPath ConnectionConfigKey = "mount_path" ConnectionConfigKeySubPath ConnectionConfigKey = "sub_path" ConnectionConfigKeyReadOnly ConnectionConfigKey = "read_only" // Build artifact source config keys ConnectionConfigKeySourcePath ConnectionConfigKey = "source_path" ConnectionConfigKeyDestinationPath ConnectionConfigKey = "destination_path" )
type ConnectionKind ¶
type ConnectionKind string
const ( ConnectionKindEnv ConnectionKind = "env" ConnectionKindVolumeMount ConnectionKind = "volume_mount" ConnectionKindBuildArtifactSource ConnectionKind = "build_artifact_source" )
func (ConnectionKind) String ¶
func (k ConnectionKind) String() string
type ConnectionMapping ¶
type ConnectionMapping struct {
Target ConnectionTarget `json:"target"`
Value ValueRef `json:"value"`
}
type ConnectionMappings ¶
type ConnectionMappings []ConnectionMapping
func (*ConnectionMappings) Scan ¶
func (m *ConnectionMappings) Scan(value interface{}) error
type ConnectionTarget ¶
type ConnectionTarget struct {
Type ConnectionTargetType `json:"type"`
Name string `json:"name,omitempty"`
// Used when Type is file, represents the path where the file should be mounted inside the container
Path string `json:"path,omitempty"`
}
type ConnectionTargetType ¶
type ConnectionTargetType string
const ( ConnectionTargetTypeEnv ConnectionTargetType = "env" ConnectionTargetTypeFile ConnectionTargetType = "file" )
type ContainerFailureDetail ¶
type Dependencies ¶
type Dependencies []string
func (*Dependencies) Scan ¶
func (d *Dependencies) Scan(value interface{}) error
type DeployedClusterInfo ¶
type EnvSecretRef ¶
type EnvVar ¶
type EnvVar struct {
Name string `json:"name"`
Value string `json:"value,omitempty"`
SelfOutput string `json:"self_output,omitempty"`
SecretKeyRef *EnvSecretRef `json:"secret_key_ref,omitempty"`
}
type EnvVars ¶
type EnvVars []EnvVar
EnvVars is a top-level jsonb column of EnvVar entries (as opposed to ExecutionConfig.Env, which is serialized as part of its parent struct).
type ExecutionConfig ¶
type ExecutionConfig struct {
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Env []EnvVar `json:"env,omitempty"`
}
func (*ExecutionConfig) Scan ¶
func (ec *ExecutionConfig) Scan(value interface{}) error
type GCSCredentials ¶
type GCSCredentials struct {
ServiceAccountCredentials SecretReference `json:"serviceAccountCredentials"`
}
type GitAccountType ¶
type GitAccountType string
GitAccountType is the kind of account a GitHub App is installed on.
const ( GitAccountTypeUser GitAccountType = "User" GitAccountTypeOrganization GitAccountType = "Organization" )
GitHub account types as reported on installations.
type GitBuildSource ¶
type GitHubAppCredentials ¶
type GitHubAppCredentials struct {
AppID int64 `json:"app_id"`
Slug string `json:"slug"`
PEM string `json:"pem"`
WebhookSecret string `json:"webhook_secret"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
}
GitHubAppCredentials are the app-level credentials returned by the GitHub App manifest conversion; stored encrypted in the integration's auth blob.
type GitHubAppManifestFlow ¶
GitHubAppManifestFlow is what the UI needs to send the user to GitHub's app-creation page.
type GitHubAppMintResult ¶
type GitHubAppMintResult struct {
IntegrationID string
Host string
Token string
MintedAt time.Time
ExpiresAt time.Time
DataHash string
}
GitHubAppMintResult is a freshly minted installation token plus the identity of the integration it came from.
type GitInstallation ¶
type GitInstallation struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
GitIntegrationID string `gorm:"not null;index"`
InstallationID int64 `gorm:"not null"`
AccountLogin string `gorm:"not null"`
AccountType GitAccountType
RepositorySelection string
CreatedAt time.Time
UpdatedAt time.Time
}
GitInstallation records a GitHub App installation on a GitHub account, linked to the org's github_app integration.
type GitIntegration ¶
type GitIntegration struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null;index"`
Type GitIntegrationType `gorm:"not null"`
// Host is the git host this integration covers (required for
// git_credentials; github.com for github_app).
Host string `gorm:"index"`
EncryptedAuth string `gorm:"type:text"`
Status GitIntegrationStatus
DataHash string `gorm:"not null"` // for change detection / release freezing
CreatedAt time.Time
UpdatedAt time.Time
// Transient decrypted auth; never stored or serialized.
Auth *GitIntegrationAuth `gorm:"-" json:"-"`
// Transient GitHub install URL for github_app integrations.
InstallURL string `gorm:"-" json:"-"`
}
GitIntegration is an org-level git auth integration, auto-attached to repositories by host match when no explicit override is set.
type GitIntegrationAuth ¶
type GitIntegrationAuth struct {
Basic *GitIntegrationBasicAuth `json:"basic,omitempty"`
Token string `json:"token,omitempty"`
GitHubApp *GitHubAppCredentials `json:"github_app,omitempty"`
}
GitIntegrationAuth is the decrypted auth blob for a git integration. Exactly one of Basic or Token is set for git_credentials integrations; github_app integrations carry app credentials instead (added with the GitHub App flow). SSH auth is deferred.
func (GitIntegrationAuth) Empty ¶
func (a GitIntegrationAuth) Empty() bool
func (GitIntegrationAuth) Marshal ¶
func (a GitIntegrationAuth) Marshal() ([]byte, error)
type GitIntegrationBasicAuth ¶
type GitIntegrationBasicAuth struct {
Username string `json:"username"`
Password string `json:"password"`
}
GitIntegrationBasicAuth is username/password clone auth.
type GitIntegrationStatus ¶
type GitIntegrationStatus string
const ( GitIntegrationStatusActive GitIntegrationStatus = "active" GitIntegrationStatusPendingInstall GitIntegrationStatus = "pending_install" GitIntegrationStatusInstalled GitIntegrationStatus = "installed" )
type GitIntegrationType ¶
type GitIntegrationType string
const ( GitIntegrationTypeGitCredentials GitIntegrationType = "git_credentials" GitIntegrationTypeGitHubApp GitIntegrationType = "github_app" )
func (GitIntegrationType) Valid ¶
func (t GitIntegrationType) Valid() bool
type GitRepoRevision ¶
type GitRepoRevision struct {
Branch string `json:"branch"`
Tag string `json:"tag"`
Commit string `json:"commit"`
}
func (*GitRepoRevision) Scan ¶
func (g *GitRepoRevision) Scan(value interface{}) error
func (GitRepoRevision) Type ¶
func (g GitRepoRevision) Type() GitRepoRevisionType
type GitRepoRevisionType ¶
type GitRepoRevisionType string
const ( Branch GitRepoRevisionType = "branch" Tag GitRepoRevisionType = "tag" Commit GitRepoRevisionType = "commit" )
type GitRepoSource ¶
type GitRepoSource struct {
RepoUrl string `json:"repo_url"`
Revision GitRepoRevision `json:"revision"`
}
func (*GitRepoSource) Scan ¶
func (g *GitRepoSource) Scan(value interface{}) error
type GitRevision ¶
type ImageBuild ¶
type ImageBuild struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
Name string `gorm:"not null; <-:create" json:"name"`
Namespace string
StackID string
StackResourceID string
StackResourceName string
StackResource *StackResource `gorm:"foreignKey:StackResourceID"`
Spec BuildConfigSpec `gorm:"type:jsonb"`
Status *ImageBuildStatus `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
}
type ImageBuildStatus ¶
type ImageBuildStatus struct {
Conditions []Condition `json:"conditions"`
State string `json:"state"`
BuildSourceHash string `json:"build_source_hash"`
ImageURL string `json:"image_url"`
BuildSourceRevision string `json:"build_source_revision"`
LastObservedStatusHash string `json:"last_observed_status_hash,omitempty"`
LastBuildFailureDetail *BuildFailureDetail `json:"last_build_failure_detail,omitempty"`
// ReleaseID is the release that triggered this build: the agent copies the
// parent StackResource's release-id annotation onto the ImageBuild at
// creation, and builds are never mutated after that.
ReleaseID string `json:"release_id,omitempty"`
}
func (*ImageBuildStatus) IsConditionTrue ¶
func (s *ImageBuildStatus) IsConditionTrue(condType string) bool
IsConditionTrue reports whether the status carries the given condition type with status True, per the cluster-agent's condition vocabulary.
func (*ImageBuildStatus) Scan ¶
func (w *ImageBuildStatus) Scan(value interface{}) error
Unmarhsal and marshal JSONB column types
type ImageConfigSpec ¶
type ImageConfigSpec struct {
Image string `json:"image"`
ImagePullPolicy string `json:"image_pull_policy,omitempty"`
// RegistryCredentialID pins an org-level registry credential for image
// pulls, overriding host auto-attach.
RegistryCredentialID string `json:"registry_credential_id,omitempty"`
}
func (*ImageConfigSpec) Scan ¶
func (pc *ImageConfigSpec) Scan(value interface{}) error
func (ImageConfigSpec) Validate ¶
func (i ImageConfigSpec) Validate() error
type ImageOverrides ¶
ImageOverrides maps resource names to image references for preview stacks.
func (*ImageOverrides) Scan ¶
func (o *ImageOverrides) Scan(value any) error
type InitConfig ¶
func (*InitConfig) Scan ¶
func (ic *InitConfig) Scan(value interface{}) error
type InviteStatus ¶
type InviteStatus string
const ( InviteStatusPending InviteStatus = "pending" InviteStatusAccepted InviteStatus = "accepted" InviteStatusRevoked InviteStatus = "revoked" InviteStatusExpired InviteStatus = "expired" )
type LifecycleConfig ¶
func (*LifecycleConfig) Scan ¶
func (lc *LifecycleConfig) Scan(value interface{}) error
type Namespace ¶
type Namespace struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
Name string `gorm:"not null;unique"`
OrganisationID string `gorm:"not null"`
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (*Namespace) AddDefaultLabels ¶
func (n *Namespace) AddDefaultLabels()
func (*Namespace) AddSharedComputeTenantLabels ¶
AddSharedComputeTenantLabels preserves the legacy cloud-tenant label because the hardening controller uses it to select tenant namespaces.
type NodeCapacity ¶
type OAuthState ¶
type OAuthState struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
State string `gorm:"not null;uniqueIndex" json:"state"`
Provider string `gorm:"not null" json:"provider"`
InviteToken string `json:"inviteToken,omitempty"`
CreatedAt time.Time `gorm:"not null" json:"createdAt"`
}
func (OAuthState) TableName ¶
func (OAuthState) TableName() string
type ObjectStore ¶
type ObjectStore struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null;index"`
ProjectID string `gorm:"index" json:"project_id"`
Name string `gorm:"not null"`
// Spec fields
Configuration ObjectStoreConfiguration `gorm:"type:jsonb;not null"`
DestinationPath string `gorm:"not null"`
RetentionPolicy string
// Status fields
Status ObjectStoreStatus `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
}
type ObjectStoreConfiguration ¶
type ObjectStoreConfiguration struct {
S3Credentials *S3Credentials `json:"s3Credentials,omitempty"`
AzureCredentials *AzureCredentials `json:"azureCredentials,omitempty"`
GCSCredentials *GCSCredentials `json:"gcsCredentials,omitempty"`
}
func (*ObjectStoreConfiguration) Scan ¶
func (c *ObjectStoreConfiguration) Scan(value interface{}) error
Implement driver.Valuer and sql.Scanner for custom types
type ObjectStoreStatus ¶
type ObjectStoreStatus struct {
State string `json:"state,omitempty"`
Message string `json:"message,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
DeployedClusters []DeployedClusterInfo `json:"deployedClusters,omitempty"`
}
func (*ObjectStoreStatus) Scan ¶
func (s *ObjectStoreStatus) Scan(value interface{}) error
type OrgInvite ¶
type OrgInvite struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
Email string `gorm:"not null" json:"email"`
OrganisationID string `gorm:"not null" json:"organisation_id"`
ProjectID string `gorm:"not null" json:"project_id"`
ProjectRole ProjectRole `gorm:"not null;column:project_role" json:"project_role"`
TokenHash string `gorm:"not null" json:"-"`
EncryptedToken string `gorm:"not null" json:"-"`
Status InviteStatus `gorm:"not null;default:pending" json:"status"`
ExpiresAt time.Time `gorm:"not null" json:"expires_at"`
InvitedByID string `gorm:"not null" json:"invited_by_id"`
AcceptedAt *time.Time `json:"accepted_at,omitempty"`
EmailSent bool `gorm:"not null;default:false" json:"email_sent"`
EmailSentAt *time.Time `json:"email_sent_at,omitempty"`
EmailError *string `json:"email_error,omitempty"`
CreatedAt time.Time `gorm:"not null" json:"created_at"`
Organisation *Organisation `gorm:"foreignKey:OrganisationID" json:"organisation,omitempty"`
Project *Project `gorm:"foreignKey:ProjectID" json:"project,omitempty"`
InvitedBy *User `gorm:"foreignKey:InvitedByID" json:"invited_by,omitempty"`
}
type OrgInviteOperand ¶
type OrgInviteOperand struct{ ID string }
type OrgRegistryDefaults ¶
OrgRegistryDefaults are install-level storage defaults for the registry seeded for each org at signup.
type Organisation ¶
type OrganisationDomain ¶
type OutputDescriptor ¶
type OutputDescriptor struct {
Name string `json:"name"`
Type OutputValueType `json:"type"`
Sensitive bool `json:"sensitive"`
}
func PostgresAddonOutputDescriptors ¶
func PostgresAddonOutputDescriptors(_ *PostgresAddon) []OutputDescriptor
func SecretOutputDescriptors ¶
func SecretOutputDescriptors(secret *Secret) []OutputDescriptor
func StackResourceOutputDescriptors ¶
func StackResourceOutputDescriptors(resource *StackResource) []OutputDescriptor
type OutputValueRef ¶
type OutputValueRef struct {
Output string `json:"output"`
}
type OutputValueType ¶
type OutputValueType string
const ( OutputValueTypeString OutputValueType = "string" OutputValueTypeInteger OutputValueType = "integer" OutputValueTypeBoolean OutputValueType = "boolean" )
type Port ¶
type Port struct {
Name string `json:"name"`
Number int `json:"number"`
Protocol string `json:"protocol"`
ExposedToPublic bool `json:"exposed_to_public"`
SubdomainPrefix string `json:"subdomain_prefix"`
GeneratedSubdomainPrefix string `json:"generated_subdomain_prefix"`
ExposedFqdn string `json:"fqdn"`
}
type PostgresAddon ¶
type PostgresAddon struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null;index"`
ProjectID string `gorm:"index" json:"project_id"`
UserID string `gorm:"not null;index"`
ClusterID string `gorm:"not null;index"`
Name string `gorm:"not null"`
NamespaceID string `gorm:"not null;index"`
Namespace string `gorm:"not null"`
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
Revision string
// Spec fields
PostgresVersion PostgresVersion `gorm:"type:jsonb;not null"`
Instances PostgresInstances `gorm:"type:jsonb;not null"`
Resources PostgresResources `gorm:"type:jsonb;not null"`
Storage PostgresStorage `gorm:"type:jsonb;not null"`
Configuration PostgresConfiguration `gorm:"type:jsonb"`
Initialization PostgresInitialization `gorm:"type:jsonb"`
BackupConfig PostgresBackupConfig `gorm:"type:jsonb"`
// Lifecycle fields
BackupRequestedAt *time.Time `gorm:"default:NULL"`
LifecycleConfig PostgresLifecycleConfig `gorm:"type:jsonb"`
DeletionTimestamp *time.Time `gorm:"default:NULL"`
// Status fields
Status PostgresAddonStatus `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
// Relationships
Databases []PostgresAddonDatabase `gorm:"foreignKey:PostgresAddonID"`
Backups []PostgresBackup `gorm:"foreignKey:PostgresAddonID"`
Outputs []OutputDescriptor `gorm:"-" json:"outputs,omitempty"`
}
func (PostgresAddon) AddonName ¶
func (p PostgresAddon) AddonName() string
func (PostgresAddon) DefaultDatabaseSpecified ¶
func (p PostgresAddon) DefaultDatabaseSpecified() bool
func (*PostgresAddon) EnsureDeclaredOutputs ¶
func (p *PostgresAddon) EnsureDeclaredOutputs() []OutputDescriptor
func (*PostgresAddon) ExternalClusterRefName ¶
func (p *PostgresAddon) ExternalClusterRefName() string
ExternalClusterRefName returns the identifier used in the PostgresCluster CR bootstrap import spec to reference the external database connection definition.
func (*PostgresAddon) HasDatabase ¶
func (p *PostgresAddon) HasDatabase(name string) bool
func (*PostgresAddon) ImportPasswordSecretName ¶
func (p *PostgresAddon) ImportPasswordSecretName() string
ImportPasswordSecretName returns the predictable K8s Secret name used to store the password for importing from an external database.
func (PostgresAddon) Type ¶
func (p PostgresAddon) Type() string
type PostgresAddonConditionType ¶
type PostgresAddonConditionType string
PostgresAddonConditionType represents condition types for a PostgresAddon.
const ( PostgresAddonConditionClusterConfigValid PostgresAddonConditionType = "ClusterConfigurationValid" PostgresAddonConditionClusterReady PostgresAddonConditionType = "ClusterReady" PostgresAddonConditionClusterHibernated PostgresAddonConditionType = "ClusterHibernated" PostgresAddonConditionClusterFenced PostgresAddonConditionType = "ClusterFenced" PostgresAddonConditionDatabasesApplied PostgresAddonConditionType = "DatabasesApplied" PostgresAddonConditionWalArchivingSuccess PostgresAddonConditionType = "ContinuousWalArchivingSuccess" PostgresAddonConditionLastBaseBackupSucceeded PostgresAddonConditionType = "LastBaseBackupSucceeded" // PostgresAddonConditionReadyOnce is set by the API server (not the cluster-agent) // when the addon first reaches Ready state. Once set, it is never cleared. PostgresAddonConditionReadyOnce PostgresAddonConditionType = "ReadyOnce" )
type PostgresAddonConnectionInfo ¶
type PostgresAddonConnectionInfo struct {
Host string `json:"host,omitempty"`
Port int32 `json:"port,omitempty"`
SSLMode string `json:"sslMode,omitempty"`
WriteService string `json:"writeService,omitempty"`
ReadService string `json:"readService,omitempty"`
ClusterSecrets *PostgresAddonClusterSecrets `json:"clusterSecrets,omitempty"`
}
type PostgresAddonDatabase ¶
type PostgresAddonOperand ¶
type PostgresAddonOperand struct{ ID string }
type PostgresAddonState ¶
type PostgresAddonState string
PostgresAddonState represents the state of a PostgresAddon.
const ( PostgresAddonStatePending PostgresAddonState = "Pending" PostgresAddonStateCreating PostgresAddonState = "Creating" PostgresAddonStateInitializing PostgresAddonState = "Initializing" PostgresAddonStateReady PostgresAddonState = "Ready" PostgresAddonStateUpdating PostgresAddonState = "Updating" PostgresAddonStateBackingUp PostgresAddonState = "Backing Up" PostgresAddonStateRestoring PostgresAddonState = "Restoring" PostgresAddonStateError PostgresAddonState = "Error" PostgresAddonStateDeleting PostgresAddonState = "Deleting" PostgresAddonStateHibernated PostgresAddonState = "Hibernated" PostgresAddonStateFenced PostgresAddonState = "Fenced" )
type PostgresAddonStatus ¶
type PostgresAddonStatus struct {
State PostgresAddonState `json:"state,omitempty"`
Message string `json:"message,omitempty"`
Conditions []Condition `json:"conditions,omitempty"`
ConnectionInfo *PostgresAddonConnectionInfo `json:"connectionInfo,omitempty"`
Databases []PostgresDatabaseInfo `json:"databases,omitempty"`
LastObservedStatusHash string `json:"lastObservedStatusHash,omitempty"`
}
func (*PostgresAddonStatus) Scan ¶
func (s *PostgresAddonStatus) Scan(value interface{}) error
type PostgresBackup ¶
type PostgresBackup struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
PostgresAddonID string `gorm:"not null;index"`
Name string
Description string
Type PostgresBackupType
Phase string
StartedAt *time.Time
CompletedAt *time.Time
Error string
SizeBytes *int32
CreatedAt time.Time
UpdatedAt time.Time
}
type PostgresBackupConfig ¶
type PostgresBackupConfig struct {
ObjectStoreID string `json:"objectStoreId,omitempty"`
Schedule string `json:"schedule,omitempty"`
WALArchiving bool `json:"walArchiving,omitempty"`
}
func (*PostgresBackupConfig) Scan ¶
func (bc *PostgresBackupConfig) Scan(value interface{}) error
type PostgresBackupType ¶
type PostgresBackupType string
const ( PostgresBackupTypeManual PostgresBackupType = "Manual" PostgresBackupTypeScheduled PostgresBackupType = "Scheduled" )
type PostgresCPUResource ¶
type PostgresConfiguration ¶
type PostgresConfiguration struct {
EnableSuperuserAccess bool `json:"enableSuperuserAccess,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
}
func (*PostgresConfiguration) Scan ¶
func (c *PostgresConfiguration) Scan(value interface{}) error
type PostgresCredentials ¶
type PostgresCredentials struct {
Database string `json:"database"`
Host string `json:"host"`
Port int32 `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
SSLMode string `json:"sslMode"`
ConnectionString string `json:"connectionString"`
CACertificate string `json:"caCertificate,omitempty"`
}
PostgresCredentials is the JIT-fetched credential response (not stored in DB)
func (*PostgresCredentials) ToOutputMap ¶
func (c *PostgresCredentials) ToOutputMap() map[string]string
type PostgresDatabaseInfo ¶
type PostgresExtensions ¶
type PostgresExtensions []string
Domain types for PostgreSQL addon
func (*PostgresExtensions) Scan ¶
func (e *PostgresExtensions) Scan(value interface{}) error
type PostgresImportFromExternal ¶
type PostgresImportFromExternal struct {
Host string `json:"host"`
Port int `json:"port"`
Database string `json:"database"`
Username string `json:"username"`
PasswordSecretID string `json:"passwordSecretId"`
SslMode *string `json:"sslMode,omitempty"`
DatabasesToImport []string `json:"databasesToImport,omitempty"`
}
type PostgresInitialization ¶
type PostgresInitialization struct {
RestoreFromBackup *PostgresRestoreFromBackup `json:"restoreFromBackup,omitempty"`
RestoreFromObjectStore *PostgresRestoreFromObjectStore `json:"restoreFromObjectStore,omitempty"`
ImportFromExternal *PostgresImportFromExternal `json:"importFromExternal,omitempty"`
}
func (*PostgresInitialization) Scan ¶
func (i *PostgresInitialization) Scan(value interface{}) error
type PostgresInstancePlacement ¶
type PostgresInstancePlacement struct {
TopologyKey string `json:"topology_key,omitempty"`
Policy string `json:"policy,omitempty"` // preferred or required
NodeSelector map[string]string `json:"node_selector,omitempty"`
Tolerations []PostgresToleration `json:"tolerations,omitempty"`
}
type PostgresInstances ¶
type PostgresInstances struct {
Count int `json:"count"`
Placement *PostgresInstancePlacement `json:"placement,omitempty"`
}
func (*PostgresInstances) Scan ¶
func (i *PostgresInstances) Scan(value interface{}) error
type PostgresLifecycleConfig ¶
type PostgresLifecycleConfig struct {
HibernationEnabled bool `json:"hibernationEnabled,omitempty"`
FencingEnabled bool `json:"fencingEnabled,omitempty"`
}
func (*PostgresLifecycleConfig) Scan ¶
func (lc *PostgresLifecycleConfig) Scan(value interface{}) error
type PostgresMemoryResource ¶
type PostgresResources ¶
type PostgresResources struct {
CPU PostgresCPUResource `json:"cpu"`
Memory PostgresMemoryResource `json:"memory"`
}
func (*PostgresResources) Scan ¶
func (r *PostgresResources) Scan(value interface{}) error
type PostgresRestoreFromBackup ¶
type PostgresRestoreFromBackup struct {
BackupID string `json:"backupId"`
}
type PostgresStorage ¶
type PostgresStorage struct {
Size string `json:"size"`
StorageClass string `json:"storageClass,omitempty"`
}
func (*PostgresStorage) Scan ¶
func (s *PostgresStorage) Scan(value interface{}) error
type PostgresToleration ¶
type PostgresVersion ¶
type PostgresVersion struct {
Major int `json:"major"`
Minor int `json:"minor"`
EnableMajorVersionUpgrade bool `json:"enableMajorVersionUpgrade,omitempty"`
EnableMinorVersionUpgrade bool `json:"enableMinorVersionUpgrade,omitempty"`
}
func (*PostgresVersion) Scan ¶
func (pv *PostgresVersion) Scan(value interface{}) error
Implement driver.Valuer and sql.Scanner for custom types
type PreviewGitRepository ¶
type PreviewGitRepository struct {
RepoURL string `json:"repo_url"`
BaseBranch string `json:"base_branch"`
// IntegrationID pins an org-level git integration for clone auth;
// otherwise clone auth follows host auto-match, then anonymous.
IntegrationID string `json:"integration_id,omitempty"`
}
PreviewGitRepository holds the git configuration for a preview environment.
func (*PreviewGitRepository) Scan ¶
func (r *PreviewGitRepository) Scan(value any) error
type PreviewReconcilerStatus ¶
type PreviewReconcilerStatus struct {
LastAppliedCommitSHA string `json:"last_applied_commit_sha,omitempty"`
LastAppliedStackfileHash string `json:"last_applied_stackfile_hash,omitempty"`
LastAppliedOverridesHash string `json:"last_applied_overrides_hash,omitempty"`
LastProcessedForceSyncAt time.Time `json:"last_processed_force_sync_at,omitempty"`
}
func (*PreviewReconcilerStatus) Scan ¶
func (s *PreviewReconcilerStatus) Scan(value any) error
type PreviewStack ¶
type PreviewStack struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null"`
ProjectID string `gorm:"not null"`
UserID string `gorm:"not null"`
StackPreviewConfigID string `gorm:"not null"`
StackID *string
ActiveReleaseID *string
Name string `gorm:"not null"`
PRNumber string `gorm:"not null"`
Branch string `gorm:"not null"`
CommitSHA string `gorm:"not null"`
Source PreviewStackSource `gorm:"not null"`
GitHubCommentID int64 `gorm:"column:github_comment_id;not null;default:0"`
GitHubCommentPending bool `gorm:"column:github_comment_pending;not null;default:false"`
ImageOverrides ImageOverrides `gorm:"type:jsonb"`
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
Status PreviewStackStatus `gorm:"type:jsonb;not null"`
ReconcilerStatus PreviewReconcilerStatus `gorm:"type:jsonb;not null;default:'{}'"`
ForceSyncRequestedAt *time.Time
StackfileContent *string
DeletionTimestamp *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
PreviewStack represents a preview environment spawned from a StackPreviewConfig.
func (PreviewStack) TableName ¶
func (PreviewStack) TableName() string
type PreviewStackOperand ¶
type PreviewStackOperand struct{ ID string }
type PreviewStackOutputs ¶
type PreviewStackOutputs struct {
CommitSHA string `json:"commit_sha,omitempty"`
URLs []PreviewURL `json:"urls,omitempty"`
}
PreviewStackOutputs holds deployment outputs for a preview stack.
type PreviewStackPhase ¶
type PreviewStackPhase string
PreviewStackPhase represents the lifecycle phase of a preview stack.
const ( PreviewStackPhaseProvisioning PreviewStackPhase = "Provisioning" PreviewStackPhaseDeploying PreviewStackPhase = "Deploying" PreviewStackPhaseReady PreviewStackPhase = "Ready" PreviewStackPhaseFailed PreviewStackPhase = "Failed" PreviewStackPhaseDeleting PreviewStackPhase = "Deleting" )
type PreviewStackSource ¶
type PreviewStackSource string
PreviewStackSource indicates how a preview stack was created.
const ( PreviewStackSourceManual PreviewStackSource = "manual" PreviewStackSourceWebhook PreviewStackSource = "webhook" )
type PreviewStackStatus ¶
type PreviewStackStatus struct {
Phase PreviewStackPhase `json:"phase"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
Outputs *PreviewStackOutputs `json:"outputs,omitempty"`
}
PreviewStackStatus holds the current status of a preview stack.
func (*PreviewStackStatus) Scan ¶
func (s *PreviewStackStatus) Scan(value any) error
type PreviewURL ¶
PreviewURL maps a resource name to its public URL.
type Project ¶
type Project struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
Name string `gorm:"not null" json:"name"`
OrganisationID string `gorm:"not null" json:"organisation_id"`
DefaultProject bool `gorm:"not null;default:false" json:"default_project"`
CreatedAt time.Time
UpdatedAt time.Time
}
type ProjectMembership ¶
type ProjectMembership struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
ProjectID string `gorm:"not null" json:"project_id"`
UserID string `gorm:"not null" json:"user_id"`
Role ProjectRole `gorm:"not null" json:"role"`
CreatedAt time.Time
Project *Project `gorm:"foreignKey:ProjectID" json:"project,omitempty"`
User *User `gorm:"foreignKey:UserID" json:"user,omitempty"`
}
type ProjectRole ¶
type ProjectRole string
const ( DeveloperRole ProjectRole = "Developer" ViewerRole ProjectRole = "Viewer" )
func (ProjectRole) String ¶
func (r ProjectRole) String() string
type ReferentType ¶
type ReferentType string
const ( ReferentSecret ReferentType = "secret" ReferentVolume ReferentType = "volume" ReferentPostgresAddon ReferentType = "postgres_addon" ReferentRegistryCredential ReferentType = "registry_credential" ReferentGitIntegration ReferentType = "git_integration" )
type RefreshToken ¶
type RefreshToken struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
UserID string `gorm:"not null" json:"userId"`
TokenHash string `gorm:"not null" json:"-"`
ExpiresAt time.Time `gorm:"not null" json:"expiresAt"`
CreatedAt time.Time `gorm:"not null" json:"createdAt"`
RevokedAt *time.Time `json:"revokedAt,omitempty"`
}
func (RefreshToken) TableName ¶
func (RefreshToken) TableName() string
type RegistryCredential ¶
type RegistryCredential struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null;index"`
Host string `gorm:"not null"` // normalized registry host
Purpose RegistryCredentialPurpose `gorm:"not null;default:'both'"`
Username string `gorm:"not null"`
EncryptedPassword string `gorm:"type:text;not null"`
DataHash string `gorm:"not null"` // for change detection / release freezing
CreatedAt time.Time
UpdatedAt time.Time
// Transient plaintext password; never stored or serialized.
Password string `gorm:"-" json:"-"`
}
RegistryCredential is an org-level credential for a container registry host, auto-attached by host match when no explicit per-resource credential is set.
type RegistryCredentialPurpose ¶
type RegistryCredentialPurpose string
const ( RegistryCredentialPurposePull RegistryCredentialPurpose = "pull" RegistryCredentialPurposePush RegistryCredentialPurpose = "push" RegistryCredentialPurposeBoth RegistryCredentialPurpose = "both" )
func (RegistryCredentialPurpose) ConflictsWith ¶
func (p RegistryCredentialPurpose) ConflictsWith(other RegistryCredentialPurpose) bool
ConflictsWith reports whether two credentials for the same (org, host) pair overlap: 'both' conflicts with everything, otherwise only exact duplicates conflict.
func (RegistryCredentialPurpose) Covers ¶
func (p RegistryCredentialPurpose) Covers(requested RegistryCredentialPurpose) bool
Covers reports whether a credential with purpose p can be used for the requested purpose.
func (RegistryCredentialPurpose) Valid ¶
func (p RegistryCredentialPurpose) Valid() bool
type RegistryState ¶
type RegistryState string
const ( RegistryStatePending RegistryState = "Pending" RegistryStateRunning RegistryState = "Running" RegistryStateError RegistryState = "Error" RegistryStateDeleting RegistryState = "Deleting" )
type RelationKind ¶
type RelationKind string
const ( RelationEnv RelationKind = "env" RelationVolumeMount RelationKind = "volume_mount" RelationBuildArtifact RelationKind = "build_artifact_source" RelationGitCredential RelationKind = "git_credential" RelationImagePull RelationKind = "image_pull" RelationImagePush RelationKind = "image_push" )
type ReleaseCause ¶
type ReleaseCause struct {
Kind ReleaseCauseKind `json:"kind"`
Detail string `json:"detail,omitempty"`
}
func (*ReleaseCause) Scan ¶
func (c *ReleaseCause) Scan(value interface{}) error
type ReleaseCauseKind ¶
type ReleaseCauseKind string
const ( ReleaseCauseManual ReleaseCauseKind = "manual" ReleaseCauseRollback ReleaseCauseKind = "rollback" ReleaseCauseWebhookPush ReleaseCauseKind = "webhook_push" ReleaseCausePreviewSync ReleaseCauseKind = "preview_sync" )
type ReleaseEvent ¶
type ReleaseEvent struct {
ID string `gorm:"primaryKey;default:gen_random_uuid()"`
ReleaseID string `gorm:"not null"`
StackID string `gorm:"not null"`
Sequence int `gorm:"not null"`
OccurredAt time.Time `gorm:"not null;default:now()"`
Source ReleaseEventSource `gorm:"not null"`
Scope ReleaseEventScope `gorm:"not null"`
ResourceName *string
Type ReleaseEventType `gorm:"not null"`
Level ReleaseEventLevel `gorm:"not null"`
Message string `gorm:"not null"`
DedupeKey string `gorm:"not null"`
Links ReleaseEventLinks `gorm:"type:jsonb"`
Metadata ReleaseEventMetadata `gorm:"type:jsonb"`
CreatedAt time.Time
}
func (ReleaseEvent) TableName ¶
func (ReleaseEvent) TableName() string
type ReleaseEventLevel ¶
type ReleaseEventLevel string
const ( ReleaseEventLevelInfo ReleaseEventLevel = "info" ReleaseEventLevelSuccess ReleaseEventLevel = "success" ReleaseEventLevelWarning ReleaseEventLevel = "warning" ReleaseEventLevelError ReleaseEventLevel = "error" )
type ReleaseEventLink ¶
type ReleaseEventLinks ¶
type ReleaseEventLinks []ReleaseEventLink
func (*ReleaseEventLinks) Scan ¶
func (l *ReleaseEventLinks) Scan(value interface{}) error
type ReleaseEventMetadata ¶
func (*ReleaseEventMetadata) Scan ¶
func (m *ReleaseEventMetadata) Scan(value interface{}) error
type ReleaseEventScope ¶
type ReleaseEventScope string
const ( ReleaseEventScopeRelease ReleaseEventScope = "release" ReleaseEventScopeResource ReleaseEventScope = "resource" )
type ReleaseEventSource ¶
type ReleaseEventSource string
const ( ReleaseEventSourceHub ReleaseEventSource = "hub" ReleaseEventSourceCluster ReleaseEventSource = "cluster" )
type ReleaseEventType ¶
type ReleaseEventType string
const ( ReleaseEventTypeReleaseCreated ReleaseEventType = "release_created" ReleaseEventTypeReleaseChecksStarted ReleaseEventType = "release_checks_started" ReleaseEventTypeReleaseCheckFailed ReleaseEventType = "release_check_failed" ReleaseEventTypeReleaseChecksPassed ReleaseEventType = "release_checks_passed" ReleaseEventTypeReleaseStarted ReleaseEventType = "release_started" ReleaseEventTypeBuildQueued ReleaseEventType = "build_queued" // reserved; not emitted in v1 ReleaseEventTypeBuildStarted ReleaseEventType = "build_started" ReleaseEventTypeBuildSucceeded ReleaseEventType = "build_succeeded" // ReleaseEventTypeBuildAttemptFailed: a build attempt errored but the build // job is still retrying (ImageBuild phase stays Pending until the job's // backoff limit is exhausted). ReleaseEventTypeBuildAttemptFailed ReleaseEventType = "build_attempt_failed" ReleaseEventTypeBuildFailed ReleaseEventType = "build_failed" ReleaseEventTypeResourceWaiting ReleaseEventType = "resource_waiting" ReleaseEventTypeResourceDeploying ReleaseEventType = "resource_deploying" ReleaseEventTypeResourceReady ReleaseEventType = "resource_ready" ReleaseEventTypeResourceFailed ReleaseEventType = "resource_failed" // ReleaseEventTypeResourcePortsClosed: the rollout landed but a declared // port is not accepting connections. ReleaseEventTypeResourcePortsClosed ReleaseEventType = "resource_ports_closed" ReleaseEventTypeResourceTLSIssuing ReleaseEventType = "resource_tls_issuing" ReleaseEventTypeResourceTLSReady ReleaseEventType = "resource_tls_ready" ReleaseEventTypeResourceTLSFailed ReleaseEventType = "resource_tls_failed" ReleaseEventTypeReleaseReleased ReleaseEventType = "release_released" ReleaseEventTypeReleaseFailed ReleaseEventType = "release_failed" ReleaseEventTypeReleaseSuperseded ReleaseEventType = "release_superseded" ReleaseEventTypeReleaseCancelled ReleaseEventType = "release_cancelled" )
type ReleaseHealth ¶
type ReleaseHealth string
ReleaseHealth is the computed runtime rollup for a live/active release.
const ( ReleaseHealthOK ReleaseHealth = "ok" ReleaseHealthProgressing ReleaseHealth = "progressing" ReleaseHealthDegraded ReleaseHealth = "degraded" ReleaseHealthFailed ReleaseHealth = "failed" )
type ReleaseLiveStatus ¶
type ReleaseLiveStatus struct {
Health ReleaseHealth
Resources map[string]*StackResourceStatus
Conditions []Condition
TargetRevision string
ObservedRevision string
}
ReleaseLiveStatus is a read-time overlay: current stack/resource status attributed to a release. Never persisted.
func BuildReleaseLiveStatus ¶
func BuildReleaseLiveStatus(release *StackRelease, stack *Stack) *ReleaseLiveStatus
BuildReleaseLiveStatus overlays current stack/resource status onto a release. Returns nil unless the release is active (Pending/InProgress) or live (the stack's last converged release).
type ReleaseManifest ¶
type ReleaseManifest struct {
StackCR json.RawMessage `json:"stack_cr"`
StackResourceCRs map[string]json.RawMessage `json:"stack_resource_crs"`
ResourceNames []string `json:"resource_names"`
VolumeBuildSources map[string][]BuildArtifactSource `json:"volume_build_sources,omitempty"`
ResourceRevisions map[string]string `json:"resource_revisions"`
}
ReleaseManifest holds the rendered Kubernetes CRs produced by the renderer. Once written it is immutable (enforced by a DB trigger).
func (*ReleaseManifest) Scan ¶
func (m *ReleaseManifest) Scan(value interface{}) error
type ReleaseOutcome ¶
type ReleaseOutcome struct {
Resources map[string]ResourceOutcome `json:"resources,omitempty"`
Duration time.Duration `json:"duration"`
}
ReleaseOutcome records per-resource convergence results.
func (*ReleaseOutcome) Scan ¶
func (o *ReleaseOutcome) Scan(value interface{}) error
type ReleasePins ¶
type ReleasePins struct {
// Resource Name -> Resolved artifact src.
Resources map[string]ResourcePins `json:"resources,omitempty"`
}
ReleasePins captures the resolved artifact coordinates for each resource.
func (*ReleasePins) Scan ¶
func (p *ReleasePins) Scan(value interface{}) error
type ReleaseSummary ¶
type ReleaseSummary struct {
ID string
Sequence int
State StackReleaseState
}
ReleaseSummary is a lightweight projection used for release GC decisions.
type ReleaseValidationError ¶
type ReleaseValidationError struct {
ResourceName string `json:"resource_name"`
Field string `json:"field"`
Code string `json:"code"`
Message string `json:"message"`
}
ReleaseValidationError is one structured validation failure attached to a release, addressed to a resource and a field of its spec.
type ReleaseValidationErrors ¶
type ReleaseValidationErrors []ReleaseValidationError
func (*ReleaseValidationErrors) Scan ¶
func (v *ReleaseValidationErrors) Scan(value interface{}) error
type ReleaseWorkerStatus ¶
type ReleaseWorkerStatus struct {
// ConvergeClockStartedAt is when the convergence timeout clock started.
// The deadline reconciler stamps it once the release has no builds left
// to wait for, and clears it again if a build shows up running. Nil means
// the clock has not started and the release cannot converge-timeout.
ConvergeClockStartedAt *time.Time `json:"converge_clock_started_at,omitempty"`
}
ReleaseWorkerStatus is bookkeeping the release worker persists while a release is in flight. It is not part of the user-facing release contract.
func (*ReleaseWorkerStatus) Scan ¶
func (w *ReleaseWorkerStatus) Scan(value interface{}) error
type RemoteDirSource ¶
type RemoteDirSource struct {
// Path within the client where the directory to be synced is located.
Path string `json:"path"`
// We use this to track the current state of the remote directory.
CurrentDirectoryHash string `json:"current_directory_hash"`
}
func (*RemoteDirSource) Scan ¶
func (l *RemoteDirSource) Scan(value interface{}) error
type ResourceMetrics ¶
type ResourceMetrics struct {
AssignedNodes []string `json:"assigned_node"` // Node where the resource is assigned
CPUUsage resource.Quantity `json:"cpu_usage"` // CPU usage in percentage
CPULimit resource.Quantity `json:"cpu_limit"` // CPU limit in cores
MemoryUsage resource.Quantity `json:"memory_usage"` // Memory usage in percentage
MemoryLimit resource.Quantity `json:"memory_limit"` // Memory limit in bytes
NetworkIO float64 `json:"network_io"` // Network I/O in bytes
StorageIO float64 `json:"storage_io"` // Storage I/O in bytes
NodeCapacities []*NodeCapacity `json:"node_capacity"` // Node capacity metrics
TimeStamp time.Time `json:"time_stamp"` // Timestamp of the metrics
}
type ResourceOutcome ¶
type ResourceOutcome struct {
Phase StackResourcePhase `json:"phase"`
ReadyReplicas int32 `json:"ready_replicas"`
Replicas int32 `json:"replicas"`
Message string `json:"message,omitempty"`
}
ResourceOutcome tracks the final state of a single resource in a release.
type ResourcePins ¶
type ResourcePins struct {
GitSHA string `json:"git_sha,omitempty"`
// Branch records the branch a default-branch resolution landed on, so the
// snapshot can carry it (the CRD requires branch-or-tag on git revisions).
Branch string `json:"branch,omitempty"`
VolumeHash string `json:"volume_hash,omitempty"`
ImageDigest string `json:"image_digest,omitempty"`
}
ResourcePins holds the pinned artifact identifiers for a single resource.
type ResourceReference ¶
type ResourceReference struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
StackID string `gorm:"not null;index"`
ReleaseID *string `gorm:"index"` // nil => live spec
ReferentType ReferentType `gorm:"not null"`
ReferentID string `gorm:"not null"`
RelationKind RelationKind `gorm:"not null"`
CreatedAt time.Time
}
ResourceReference is a derived index row: a scope (the live stack spec when ReleaseID is nil, or a specific release) references a deletable referent.
func (ResourceReference) TableName ¶
func (ResourceReference) TableName() string
type ResourceValidationCheckKind ¶
type ResourceValidationCheckKind string
ResourceValidationCheckKind names an expensive release-time check.
const ( ValidationCheckImagePull ResourceValidationCheckKind = "image_pull" ValidationCheckPushAccess ResourceValidationCheckKind = "push_access" )
type ResourceValidationRecord ¶
type ResourceValidationRecord struct {
StackID string `gorm:"primaryKey"`
ResourceName string `gorm:"primaryKey"`
CheckKind ResourceValidationCheckKind `gorm:"primaryKey"`
Fingerprint string `gorm:"not null"`
ValidatedAt time.Time `gorm:"not null"`
}
ResourceValidationRecord remembers the last successful expensive validation for a resource so unchanged targets are not re-probed on every release. Failures are never recorded.
func (ResourceValidationRecord) TableName ¶
func (ResourceValidationRecord) TableName() string
type S3Credentials ¶
type S3Credentials struct {
AccessKeyID SecretReference `json:"accessKeyId"`
SecretAccessKey SecretReference `json:"secretAccessKey"`
Region string `json:"region"`
Endpoint string `json:"endpoint,omitempty"`
}
type SSHConfig ¶
type SSHConfig struct {
// Users public key.
PublicKey string `json:"public_key"`
}
type Secret ¶
type Secret struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null;index"`
ProjectID string `gorm:"index" json:"project_id"`
UserID string `gorm:"not null;index"`
Name string `gorm:"not null"`
Description string
Type SecretType `gorm:"not null" json:"type"`
EncryptedData string `gorm:"type:text;not null"`
Keys SecretKeys `gorm:"type:jsonb" json:"keys"`
DataHash string `gorm:"not null" ` // For change detection
CreatedAt time.Time
UpdatedAt time.Time
// Transient field for API responses (not stored in DB)
Data map[string]string `gorm:"-" json:"data,omitempty"`
Outputs []OutputDescriptor `gorm:"-" json:"outputs,omitempty"`
}
func (*Secret) ClusterSecretName ¶
func (*Secret) EnsureDeclaredOutputs ¶
func (s *Secret) EnsureDeclaredOutputs() []OutputDescriptor
func (*Secret) ToOutputMap ¶
type SecretKeys ¶
type SecretKeys []string
func (*SecretKeys) Scan ¶
func (s *SecretKeys) Scan(value interface{}) error
type SecretReference ¶
type SecretReference struct {
SecretID string `json:"secret_id"` // UUID of the secret
Key string `json:"key"` // Key within the secret
}
SecretReference points to a secret and an optional key within that secret.
type SecretType ¶
type SecretType string
const ( SecretTypeGeneric SecretType = "Generic" SecretTypeDockerRegistry SecretType = "DockerRegistry" SecretTypeGitCredentials SecretType = "GitCredentials" SecretTypeUsernamePassword SecretType = "UsernamePassword" SecretTypeToken SecretType = "Token" SecretTypeSSHKey SecretType = "SSHKey" )
type SourceVolumeType ¶
type SourceVolumeType string
const ( EmptyVolume SourceVolumeType = "EmptyVolume" RemoteDirSyncedVolume SourceVolumeType = "RemoteDirSyncedVolume" BuildArtifactSyncedVolume SourceVolumeType = "BuildArtifactSyncedVolume" GitRepoVolume SourceVolumeType = "GitRepoVolume" )
type Stack ¶
type Stack struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
OrganisationID string `gorm:"not null"`
ProjectID string `gorm:"index" json:"project_id"`
ClusterID string `gorm:"not null"`
UserID string `gorm:"not null"`
Name string `gorm:"not null;<-:create"`
NamespaceID string `gorm:"not null"`
Namespace string `gorm:"unique;not null;<-:create"`
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
CrRevision string
Connections StackConnections `gorm:"-"`
StackResources []*StackResource `gorm:"foreignKey:StackID"`
Volumes []*Volume `gorm:"-"`
Status *StackStatus `gorm:"type:jsonb"`
Settings *StackSettings `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
DeletionTimestamp *time.Time `gorm:"default:NULL"`
}
func (*Stack) DirectConfigSecretsInUse ¶
func (*Stack) EffectiveSettings ¶
func (s *Stack) EffectiveSettings() StackSettings
func (*Stack) GetConvergedReleaseID ¶
func (*Stack) GetGitCredentialsMap ¶
func (*Stack) GetImagePullSecretIDMap ¶
returns a map of image names to their pull secret IDs
func (*Stack) GetImagePushSecretIDMap ¶
GetImagePushSecretIDMap returns a map of resource names to their push secret IDs.
func (*Stack) HasConvergedRelease ¶
func (*Stack) HasExposedPorts ¶
func (*Stack) HasGitCredentials ¶
func (*Stack) HasImagePullSecrets ¶
func (*Stack) HasImagePushSecrets ¶
HasImagePushSecrets checks if any stack resource has an image push secret configured.
func (*Stack) HasVolumeMounts ¶
func (*Stack) ResourcesMap ¶
func (ws *Stack) ResourcesMap() map[string]*StackResource
func (*Stack) SecretsInUse ¶
func (*Stack) VolumeMountIds ¶
func (*Stack) VolumesMap ¶
type StackConditionType ¶
type StackConditionType string
const ( StackConditionAvailable StackConditionType = "Available" StackConditionConverged StackConditionType = "Converged" StackConditionResourcesReady StackConditionType = "ResourcesReady" StackConditionStalled StackConditionType = "Stalled" StackConditionDegraded StackConditionType = "Degraded" StackConditionProgressing StackConditionType = "Progressing" )
type StackConnection ¶
type StackConnection struct {
ID string `json:"id" gorm:"column:id;primary_key;default:gen_random_uuid()"`
StackID string `json:"-" gorm:"not null;index"`
Kind ConnectionKind `json:"kind" gorm:"not null"`
From TopologyNodeRef `json:"from" gorm:"column:from_ref;type:jsonb;not null"`
To TopologyNodeRef `json:"to" gorm:"column:to_ref;type:jsonb;not null"`
Mappings ConnectionMappings `json:"mappings,omitempty" gorm:"type:jsonb"`
Config ConnectionConfig `json:"config,omitempty" gorm:"type:jsonb"`
Discriminator string `json:"-" gorm:"not null;default:''"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
}
StackConnection represents a directed edge between two topology nodes in a stack.
The unique constraint on (stack_id, kind, from_ref, to_ref, discriminator) prevents duplicate edges. The Discriminator field is a config-derived scoping key that allows multiple connections between the same (from, to) pair when they target different logical sub-resources — e.g., two env connections from the same PostgresAddon to the same stack resource, each targeting a different database. For connection types that don't need sub-resource scoping, the discriminator is an empty string and the constraint behaves like a simple (stack_id, kind, from_ref, to_ref) unique index.
To extend discriminator support for new connection types, add a case to ComputeDiscriminator(). The store layer calls it automatically before persistence.
func (*StackConnection) ComputeDiscriminator ¶
func (c *StackConnection) ComputeDiscriminator() string
ComputeDiscriminator derives a scoping key from the connection's config based on the source type and kind. This allows the unique index to permit multiple connections between the same (from, to) pair when they address different sub-resources.
Currently supported:
- addon/postgres + env → config.database (allows wiring multiple databases from one addon)
Returns "" for all other connection types, preserving standard edge uniqueness.
func (StackConnection) ConfigBool ¶
func (c StackConnection) ConfigBool(key string) (bool, bool, error)
func (StackConnection) ConfigString ¶
func (c StackConnection) ConfigString(key string) (string, bool, error)
func (StackConnection) IsKind ¶
func (c StackConnection) IsKind(kind ConnectionKind) bool
func (StackConnection) RequiredConfigString ¶
func (c StackConnection) RequiredConfigString(key string) (string, error)
func (StackConnection) SourceIs ¶
func (c StackConnection) SourceIs(nodeType TopologyNodeType) bool
func (StackConnection) TableName ¶
func (StackConnection) TableName() string
func (StackConnection) TargetIs ¶
func (c StackConnection) TargetIs(nodeType TopologyNodeType) bool
func (StackConnection) TargetsStackResource ¶
func (c StackConnection) TargetsStackResource(resourceName string) bool
type StackConnections ¶
type StackConnections []StackConnection
func (StackConnections) EnvForStackResource ¶
func (connections StackConnections) EnvForStackResource(resourceName string) StackConnections
func (StackConnections) FromType ¶
func (connections StackConnections) FromType(sourceType TopologyNodeType) StackConnections
func (StackConnections) HasAnyKind ¶
func (connections StackConnections) HasAnyKind(kinds ...ConnectionKind) bool
func (StackConnections) OfKind ¶
func (connections StackConnections) OfKind(kind ConnectionKind) StackConnections
func (*StackConnections) Scan ¶
func (c *StackConnections) Scan(value interface{}) error
type StackConvergenceRecord ¶
type StackDomain ¶
type StackDomain struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
OrganisationID string `gorm:"not null"`
Fqdn string `gorm:"unique;not null"`
StackID string `gorm:"not null;index"`
StackResourceID string `gorm:"not null;index"`
StackResourceName string `gorm:"not null"`
TargetPort int `gorm:"not null"`
CreatedAt time.Time
UpdatedAt time.Time
}
type StackDomainList ¶
type StackDomainList []*StackDomain
func (*StackDomainList) FindByFqdn ¶
func (d *StackDomainList) FindByFqdn(fqdn string) *StackDomain
func (*StackDomainList) FqdnPresent ¶
func (d *StackDomainList) FqdnPresent(fqdn string) bool
type StackOperand ¶
type StackOperand struct{ ID string }
Workqueue operands. Must be comparable values, never pointers:
- the workqueue dedups and rate-limits by map-key equality,
- a pointer's map key is its address, so every allocation looks like new work and duplicates accumulate for long-running operands,
- value keys also guarantee no two goroutines process the same operand concurrently once workers run with multiple goroutines.
type StackPhase ¶
type StackPhase string
StackPhase mirrors the cluster-agent's phase vocabulary for API-facing typed enums.
const ( StackPhaseReady StackPhase = "Ready" StackPhasePending StackPhase = "Pending" StackPhaseFailed StackPhase = "Failed" StackPhaseDegraded StackPhase = "Degraded" StackPhaseProgressing StackPhase = "Progressing" )
type StackPreviewConfig ¶
type StackPreviewConfig struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
OrganisationID string `gorm:"not null"`
ProjectID string `gorm:"not null"`
UserID string `gorm:"not null"`
Name string `gorm:"not null"`
Description string
GitRepository PreviewGitRepository `gorm:"type:jsonb;not null"`
StackfilePath string `gorm:"not null;default:'stackfile.yaml'"`
MaxActivePreviews int `gorm:"not null;default:10"`
Env EnvVars `gorm:"type:jsonb" json:"env"`
RepoURLNormalized string `gorm:"column:repo_url_normalized" json:"-"`
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
}
StackPreviewConfig defines how preview environments are created for a stack.
func (*StackPreviewConfig) GitBaseBranch ¶
func (s *StackPreviewConfig) GitBaseBranch() string
func (*StackPreviewConfig) GitRepoURL ¶
func (s *StackPreviewConfig) GitRepoURL() string
func (*StackPreviewConfig) NormalizedRepoURL ¶
func (s *StackPreviewConfig) NormalizedRepoURL() string
NormalizedRepoURL returns the config's repo URL in normalized form, for comparison and for persisting into RepoURLNormalized.
func (StackPreviewConfig) TableName ¶
func (StackPreviewConfig) TableName() string
type StackRelease ¶
type StackRelease struct {
ID string `gorm:"primary_key;default:gen_random_uuid()"`
StackID string `gorm:"not null"`
Sequence int `gorm:"not null"`
State StackReleaseState `gorm:"not null"`
Message string
Cause ReleaseCause `gorm:"type:jsonb"`
Snapshot StackSnapshot `gorm:"type:jsonb;not null"`
SnapshotRevision string `gorm:"not null"`
Manifest *ReleaseManifest `gorm:"type:jsonb"`
ManifestRevision string
Pins ReleasePins `gorm:"type:jsonb"`
RendererVersion string
Outcome *ReleaseOutcome `gorm:"type:jsonb"`
ValidationErrors ReleaseValidationErrors `gorm:"type:jsonb"`
WorkerStatus *ReleaseWorkerStatus `gorm:"type:jsonb"`
CreatedBy string
CreatedAt time.Time
UpdatedAt time.Time
RenderedAt *time.Time
CompletedAt *time.Time
}
StackRelease represents a single atomic deployment attempt for a stack.
func (*StackRelease) ConvergeClockStartedAt ¶
func (r *StackRelease) ConvergeClockStartedAt() *time.Time
ConvergeClockStartedAt returns the stamped clock start, or nil when the worker status block is absent entirely.
func (StackRelease) TableName ¶
func (StackRelease) TableName() string
type StackReleaseOperand ¶
type StackReleaseOperand struct{ ID string }
type StackReleaseRefs ¶
type StackReleaseRefs struct {
Converged *StackRelease
Latest *StackRelease
}
StackReleaseRefs pairs the currently converged (live) release with the highest-sequence one for stack embedding.
type StackReleaseState ¶
type StackReleaseState string
StackReleaseState tracks the lifecycle of a release.
const ( ReleaseStatePending StackReleaseState = "Pending" ReleaseStateInProgress StackReleaseState = "InProgress" ReleaseStateReleased StackReleaseState = "Released" ReleaseStateFailed StackReleaseState = "Failed" ReleaseStateSuperseded StackReleaseState = "Superseded" ReleaseStateCancelled StackReleaseState = "Cancelled" )
func TerminalStackReleaseStates ¶
func TerminalStackReleaseStates() []StackReleaseState
func (StackReleaseState) Active ¶
func (s StackReleaseState) Active() bool
Active returns true if the release is still in-flight (not terminal).
func (StackReleaseState) Terminal ¶
func (s StackReleaseState) Terminal() bool
Terminal returns true if the release has reached a final state.
type StackResource ¶
type StackResource struct {
ID string `gorm:"default:gen_random_uuid()"`
UserID string `gorm:"not null"`
StackID string
Name string `gorm:"<-:create"`
Namespace string `gorm:"<-:create"`
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
// Tracks the version of the object in the database.
Version int
BuildConfig *BuildConfigSpec `gorm:"type:jsonb"`
ImageConfig *ImageConfigSpec `gorm:"type:jsonb"`
Init *InitConfig `gorm:"type:jsonb"`
ExecutionConfig *ExecutionConfig `gorm:"type:jsonb"`
VolumeMounts []*VolumeMount `gorm:"-"`
DependsOn Dependencies `gorm:"type:jsonb"`
LifecycleConfig *LifecycleConfig `gorm:"type:jsonb"`
Ports Ports `gorm:"type:jsonb"`
Outputs []OutputDescriptor `gorm:"-" json:"outputs,omitempty"`
WorkloadType WorkloadType
Schedule string
Replicas *int32
Status *StackResourceStatus `gorm:"type:jsonb"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (*StackResource) EnsureDeclaredOutputs ¶
func (r *StackResource) EnsureDeclaredOutputs() []OutputDescriptor
func (*StackResource) GitIntegrationID ¶
func (s *StackResource) GitIntegrationID() string
GitIntegrationID returns the pinned org-level git integration for clone auth, or "" if none is set.
func (*StackResource) HasGitCredentials ¶
func (s *StackResource) HasGitCredentials() bool
func (*StackResource) HasImagePullSecrets ¶
func (s *StackResource) HasImagePullSecrets() bool
func (*StackResource) HasImagePushSecrets ¶
func (s *StackResource) HasImagePushSecrets() bool
HasImagePushSecrets checks if any stack resource has an image push secret configured.
func (*StackResource) InternalServiceHost ¶
func (r *StackResource) InternalServiceHost() string
func (*StackResource) RegistryPullCredentialID ¶
func (s *StackResource) RegistryPullCredentialID() string
RegistryPullCredentialID returns the pinned org-level registry credential for image pulls, or "" if none is set.
func (*StackResource) RegistryPushCredentialID ¶
func (s *StackResource) RegistryPushCredentialID() string
RegistryPushCredentialID returns the pinned org-level registry credential for the push target, or "" if none is set.
func (*StackResource) ToOutputMap ¶
func (r *StackResource) ToOutputMap() map[string]string
func (*StackResource) VolumeMountMap ¶
func (v *StackResource) VolumeMountMap() map[string]*VolumeMount
type StackResourceConditionType ¶
type StackResourceConditionType string
const ( StackResourceConditionAvailable StackResourceConditionType = "Available" StackResourceConditionProgressing StackResourceConditionType = "Progressing" StackResourceConditionConverged StackResourceConditionType = "StackResourceConverged" StackResourceConditionBuildReady StackResourceConditionType = "BuildReady" )
type StackResourceFailure ¶
type StackResourceFailure struct {
Type StackResourceFailureType `json:"type"`
Container *ContainerFailureDetail `json:"container,omitempty"`
InitContainer *ContainerFailureDetail `json:"init_container,omitempty"`
Build *BuildFailureDetail `json:"build,omitempty"`
}
type StackResourceFailureType ¶
type StackResourceFailureType string
const ( FailureTypeRuntimeCrash StackResourceFailureType = "runtime_crash" FailureTypeBuildFailure StackResourceFailureType = "build_failure" FailureTypeReadinessFailure StackResourceFailureType = "readiness_failure" )
type StackResourcePhase ¶
type StackResourcePhase string
type StackResourceState ¶
type StackResourceState string
const ( StackResourcePhasePending StackResourceState = "Pending" StackResourcePhaseReady StackResourceState = "Ready" StackResourcePhaseFailed StackResourceState = "Failed" StackResourcePhaseUnknown StackResourceState = "Error" )
type StackResourceStatus ¶
type StackResourceStatus struct {
State StackResourceState `json:"state"`
Message string `json:"message"`
ObservedCrRevision string `json:"observed_cr_revision"`
Conditions []Condition `json:"conditions"`
PublicIngresses []Ingress `json:"public_ingresses"`
InternalServiceName *string `json:"internal_service_name,omitempty"`
LastObservedStatusHash string `json:"last_observed_status_hash,omitempty"`
LastRestartRequestProcessedAt *time.Time `json:"last_restart_request_processed_at,omitempty"`
LastFailure *StackResourceFailure `json:"last_failure,omitempty"`
Replicas int32 `json:"replicas,omitempty"`
AvailableReplicas int32 `json:"available_replicas,omitempty"`
UpdatedReplicas int32 `json:"updated_replicas,omitempty"`
LastRunTime *time.Time `json:"last_run_time,omitempty"`
LastRunSucceeded *bool `json:"last_run_succeeded,omitempty"`
}
func (*StackResourceStatus) Scan ¶
func (rs *StackResourceStatus) Scan(value interface{}) error
type StackResourceSummary ¶
type StackResourceSummary struct {
Name string `json:"name"`
Phase StackResourcePhase `json:"phase,omitempty"`
ObservedRevision string `json:"observed_revision,omitempty"`
ConvergedRevision string `json:"converged_revision,omitempty"`
LastConverged *StackResourceConvergenceRecord `json:"last_converged,omitempty"`
AvailableReplicas int32 `json:"available_replicas,omitempty"`
UpdatedReplicas int32 `json:"updated_replicas,omitempty"`
Replicas int32 `json:"replicas,omitempty"`
Missing bool `json:"missing,omitempty"`
Message string `json:"message,omitempty"`
}
type StackSettings ¶
type StackSettings struct {
ReleaseRetentionLimit int `json:"release_retention_limit"`
MinSuccessfulReleases int `json:"min_successful_releases"`
}
func (*StackSettings) Scan ¶
func (s *StackSettings) Scan(value interface{}) error
type StackShellSnapshot ¶
type StackShellSnapshot struct {
ID string `json:"id"`
OrganisationID string `json:"organisation_id"`
ProjectID string `json:"project_id"`
ClusterID string `json:"cluster_id"`
UserID string `json:"user_id"`
Name string `json:"name"`
NamespaceID string `json:"namespace_id"`
Namespace string `json:"namespace"`
Labels Labels `json:"labels"`
Annotations Annotations `json:"annotations"`
}
StackShellSnapshot captures the identifying fields of a Stack at a point in time.
type StackSnapshot ¶
type StackSnapshot struct {
Stack StackShellSnapshot `json:"stack"`
Resources []*StackResource `json:"resources"`
Volumes []*Volume `json:"volumes"`
Connections StackConnections `json:"connections"`
CapturedAt time.Time `json:"captured_at"`
}
StackSnapshot is an immutable copy of a stack's full spec at the time a release was created.
func NewStackSnapshot ¶
func NewStackSnapshot(stack *Stack) (StackSnapshot, error)
NewStackSnapshot deep-copies a Stack into a snapshot. Uses JSON round-trip to break pointer sharing so downstream mutations don't corrupt live objects.
func (*StackSnapshot) Scan ¶
func (s *StackSnapshot) Scan(value interface{}) error
func (*StackSnapshot) ToStack ¶
func (s *StackSnapshot) ToStack() *Stack
ToStack reconstructs a Stack from the snapshot for rendering.
type StackState ¶
type StackState string
const ( StackReady StackState = "Ready" StackDeleting StackState = "Deleting" StackPending StackState = "Pending" StackFailed StackState = "Failed" StackError StackState = "Error" StackDegraded StackState = "Degraded" StackProgressing StackState = "Progressing" )
type StackStatus ¶
type StackStatus struct {
State StackState `json:"state"`
Message string `json:"message"`
ObservedCrRevision string `json:"observed_cr_revision"`
Conditions []Condition `json:"conditions"`
LastObservedStatusHash string `json:"last_observed_status_hash"`
LastValidationRun *ValidationRun `json:"last_validation_run"`
TargetRevision string `json:"target_revision,omitempty"`
LastConverged *StackConvergenceRecord `json:"last_converged,omitempty"`
Resources []StackResourceSummary `json:"resources,omitempty"`
}
func (*StackStatus) GetLastConverged ¶
func (s *StackStatus) GetLastConverged() *StackConvergenceRecord
func (*StackStatus) Scan ¶
func (ws *StackStatus) Scan(value interface{}) error
type StackStorage ¶
type StackStorage struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
OrganisationID string `gorm:"not null"`
UserID string `gorm:"not null"`
Name string `gorm:"not null; <-:create"`
Namespace string `gorm:"unique;not null; <-:create"`
WorkspaceName string `gorm:"<-:create"`
// Tracks the version of the object in the database.
Version int
Labels Labels `gorm:"type:jsonb"`
Annotations Annotations `gorm:"type:jsonb"`
SSHConfig SSHConfig `gorm:"type:jsonb"`
Volumes []*Volume `gorm:"foreignKey:StorageID"`
Status *StackStorageStatus `gorm:"type:jsonb"`
DeletionTimeStamp *time.Time `json:"deletion_timestamp"`
CreatedAt time.Time
UpdatedAt time.Time
}
func (*StackStorage) SetState ¶
func (w *StackStorage) SetState(state StackStorageState) bool
func (*StackStorage) VolumeExists ¶
func (w *StackStorage) VolumeExists(volumeID string) bool
func (*StackStorage) VolumeMap ¶
func (w *StackStorage) VolumeMap() map[string]*Volume
type StackStorageState ¶
type StackStorageState string
const ( StackStorageStateCreating StackStorageState = "Creating" StackStorageStateReady StackStorageState = "Ready" StackStorageStateDeleting StackStorageState = "Deleting" StackStorageStateFailed StackStorageState = "Failed" StackStorageStateCreated StackStorageState = "Created" StackStorageStatePending StackStorageState = "Pending" )
type StackStorageStatus ¶
type StackStorageStatus struct {
State StackStorageState `json:"state"`
Conditions []Condition `json:"conditions"`
Phase string `json:"phase"`
StorageServerServiceName string `json:"storage_server_service_name"`
LastObservedStatusHash string `json:"last_observed_status_hash,omitempty"`
ObservedVersion int64 `json:"observed_version"`
// Subpath within the storage pod where different volumes are mounted.
VolumeMountPaths []VolumeMountPath `json:"volume_mount_paths,omitempty"`
}
func (*StackStorageStatus) Scan ¶
func (s *StackStorageStatus) Scan(value interface{}) error
type StackTopology ¶
type StackTopology struct {
Nodes []TopologyNode `json:"nodes"`
Edges []TopologyEdge `json:"edges"`
}
type StackVolume ¶
type StringSlice ¶
type StringSlice []string
func (*StringSlice) Scan ¶
func (s *StringSlice) Scan(src any) error
type TopologyEdge ¶
type TopologyEdge struct {
Id string `json:"id,omitempty"`
Kind string `json:"kind"`
Source TopologyNodeRef `json:"source"`
Target TopologyNodeRef `json:"target"`
Mappings []ConnectionMapping `json:"mappings,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
// If its from user's explicit connection or inferred by the system, Like consuming pull secrets, git credentials.
SourceOfTruth string `json:"source_of_truth"`
}
type TopologyNode ¶
type TopologyNode struct {
Ref TopologyNodeRef `json:"ref"`
Label string `json:"label"`
Outputs []OutputDescriptor `json:"outputs,omitempty"`
State string `json:"state,omitempty"`
}
type TopologyNodeRef ¶
type TopologyNodeRef struct {
Type TopologyNodeType `json:"type"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
func (*TopologyNodeRef) Scan ¶
func (r *TopologyNodeRef) Scan(value interface{}) error
type TopologyNodeType ¶
type TopologyNodeType string
const ( TopologyNodeTypeStackResource TopologyNodeType = "stack_resource" TopologyNodeTypePostgresAddon TopologyNodeType = "addon/postgres" TopologyNodeTypeSecret TopologyNodeType = "secret" TopologyNodeTypeVolume TopologyNodeType = "volume" TopologyNodeTypeObjectStore TopologyNodeType = "object_store" )
type User ¶
type User struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
CreatedAt time.Time
UpdatedAt time.Time
Name string
Email string `gorm:"unique"`
Password string
Organisation *Organisation `gorm:"foreignKey:OrganisationID"`
Role UserRole
OrganisationID string
GithubID *string `gorm:"column:github_id;uniqueIndex"`
AvatarURL *string `gorm:"column:avatar_url"`
}
func (*User) ClusterAccessRules ¶
func (u *User) ClusterAccessRules() []rbacv1.PolicyRule
func (*User) IsOrgAdmin ¶
type UserRole ¶
type UserRole string
UserRole represents org-level roles stored on the User model. OrgAdmin = full org access. Empty string = permissions derived from project memberships. OrgMemberRole is not stored on User.Role; it is a Casbin-only grouping auto-managed by project membership lifecycle.
type ValidationRun ¶
type ValueRef ¶
type ValueRef struct {
Output string `json:"output,omitempty"`
Template string `json:"template,omitempty"`
Values map[string]OutputValueRef `json:"values,omitempty"`
}
type Volume ¶
type Volume struct {
ID string `gorm:"primary_key;default:gen_random_uuid()" json:"id"`
OrganisationID string `gorm:"not null" json:"organisation_id"`
ProjectID string `gorm:"index" json:"project_id"`
UserID string `gorm:"not null" json:"user_id"`
Name string `gorm:"not null; <-:create" json:"name"`
NamespaceID string `gorm:"not null" json:"namespace_id"`
Namespace string `gorm:"not null; <-:create" json:"namespace"`
Labels Labels `gorm:"type:jsonb" json:"labels"`
Annotations Annotations `gorm:"type:jsonb" json:"annotations"`
Size string `gorm:"<-:create" json:"size"`
StorageClass string `gorm:"<-:create" json:"storage_class,omitempty"`
AccessMode VolumeAccessMode `gorm:"not null; <-:create"`
VolumeSource *VolumeSource `gorm:"type:jsonb" json:"volume_source,omitempty"`
SyncBeforeUse bool `json:"sync_before_use"`
Status *VolumeStatus `gorm:"type:jsonb" json:"volume_status,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*Volume) VolumeSourceType ¶
func (v *Volume) VolumeSourceType() SourceVolumeType
type VolumeAccessMode ¶
type VolumeAccessMode string
const ( READ_WRITE_ONCE VolumeAccessMode = "ReadWriteOnce" READ_WRITE_MANY VolumeAccessMode = "ReadWriteMany" READ_ONLY_MANY VolumeAccessMode = "ReadOnlyMany" )
type VolumeBuildSource ¶
type VolumeMount ¶
type VolumeMountPath ¶
func (*VolumeMountPath) Scan ¶
func (vmp *VolumeMountPath) Scan(value interface{}) error
Scan and Value methods for VolumeMountPath
type VolumeOperand ¶
type VolumeOperand struct{ ID string }
type VolumeRevision ¶
type VolumeRevision struct {
// Hash of the contents of the volume.
CurrentVolumeHash string `json:"current_volume_hash"`
}
type VolumeSource ¶
type VolumeSource struct {
RemoteDirSource *RemoteDirSource `json:"remote_dir_source,omitempty"`
BuildSource BuildArtifactSources `json:"build_source,omitempty"`
GitRepoSource *GitRepoSource `json:"git_repo_source,omitempty"`
}
func (*VolumeSource) Scan ¶
func (v *VolumeSource) Scan(value interface{}) error
type VolumeStatus ¶
type VolumeStatus struct {
ObservedGeneration int64 `json:"observed_generation"`
Conditions []Condition `json:"conditions"`
Phase string `json:"phase"`
BuildArtifactSyncs []BuildArtifactSyncInfo `json:"build_artifact_syncs,omitempty"`
LastObservedStatusHash string `json:"last_observed_status_hash,omitempty"`
InUse bool `json:"in_use"`
LastSyncedGitRevision string `json:"last_synced_git_revision,omitempty"`
LastRemoteDirSyncHash string `json:"last_remote_dir_sync_hash,omitempty"`
}
func (*VolumeStatus) Scan ¶
func (v *VolumeStatus) Scan(value interface{}) error
type WorkloadType ¶
type WorkloadType string
const ( WorkloadTypeService WorkloadType = "Service" WorkloadTypeStatefulService WorkloadType = "StatefulService" WorkloadTypeWorker WorkloadType = "Worker" WorkloadTypeJob WorkloadType = "Job" WorkloadTypeCronJob WorkloadType = "CronJob" )
Source Files
¶
- addon.go
- api_token.go
- cluster.go
- cluster_image_registry.go
- cluster_info.go
- git_installation.go
- git_integration.go
- image_build.go
- k8s.go
- meta.go
- metrics.go
- namespace.go
- oauth_state.go
- object_store.go
- org_invite.go
- organisation.go
- organisation_domain.go
- output_descriptor.go
- postgres_addon.go
- preview_stack.go
- project.go
- refresh_token.go
- registry_credential.go
- release_event.go
- release_live_status.go
- resource_reference.go
- resource_validation_record.go
- secret.go
- stack.go
- stack_connection.go
- stack_domain.go
- stack_preview_config.go
- stack_release.go
- stack_resource.go
- stack_storage.go
- stack_topology.go
- stack_volume.go
- user.go
- volume.go
- volume_mount.go
- worker_operands.go