Documentation
¶
Index ¶
- type AWSCredentialProvider
- type ApplicationAlert
- type ApplicationEdge
- type ApplicationNode
- type ApplicationTopology
- type Cache
- type Cluster
- type Component
- type HelmRelease
- type IngressConfigSyncReport
- type KubernetesIngress
- type KubernetesIngressDocument
- type KubernetesIngressPath
- type KubernetesIngressValidation
- type KubernetesService
- type ManagedStorage
- type ManagedStorageReport
- type Node
- type PodSummary
- type Report
- type Service
- func (s *Service) ApplicationTopology(ctx context.Context, name string, fresh bool) (*ApplicationTopology, error)
- func (s *Service) ApplyIngress(ctx context.Context, targetName string, source []byte, ...) (KubernetesIngressDocument, error)
- func (s *Service) Cached(ctx context.Context, name string) (*Report, bool, error)
- func (s *Service) CachedMany(ctx context.Context, names []string) map[string]*Report
- func (s *Service) Collect(ctx context.Context, name string) (*Report, error)
- func (s *Service) CollectFresh(ctx context.Context, name string) (*Report, error)
- func (s *Service) DeleteIngress(ctx context.Context, ...) error
- func (s *Service) GetIngress(ctx context.Context, targetName, namespace, ingressName string) (KubernetesIngressDocument, error)
- func (s *Service) Invalidate(ctx context.Context, name string)
- func (s *Service) ListClickVisualStorage(ctx context.Context, name string) (*ManagedStorageReport, error)
- func (s *Service) ListIngresses(ctx context.Context, name string) ([]KubernetesIngress, error)
- func (s *Service) ListOpenTelemetryStorage(ctx context.Context, name string) (*ManagedStorageReport, error)
- func (s *Service) ListServices(ctx context.Context, name string) ([]KubernetesService, error)
- func (s *Service) SetAWSCredentialProvider(provider AWSCredentialProvider)
- func (s *Service) SetTerraformOutputProvider(provider TerraformOutputProvider)
- func (s *Service) ValidateIngress(ctx context.Context, targetName string, source []byte) (KubernetesIngressValidation, error)
- type ServicePort
- type TerraformOutputProvider
- type TopologySource
- type TopologySummary
- type UnhealthyPod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSCredentialProvider ¶
type ApplicationAlert ¶
type ApplicationAlert struct {
Name string `json:"name"`
Severity string `json:"severity"`
State string `json:"state"`
Namespace string `json:"namespace,omitempty"`
Workload string `json:"workload,omitempty"`
Pod string `json:"pod,omitempty"`
Service string `json:"service,omitempty"`
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
StartedAt string `json:"started_at,omitempty"`
}
type ApplicationEdge ¶
type ApplicationEdge struct {
ID string `json:"id"`
Source string `json:"source"`
Target string `json:"target"`
Relation string `json:"relation"`
Protocol string `json:"protocol,omitempty"`
Label string `json:"label,omitempty"`
Evidence string `json:"evidence"`
Verified bool `json:"verified"`
State string `json:"state"`
ReadyEndpoints int `json:"ready_endpoints,omitempty"`
TotalEndpoints int `json:"total_endpoints,omitempty"`
RequestRate float64 `json:"request_rate,omitempty"`
}
type ApplicationNode ¶
type ApplicationNode struct {
ID string `json:"id"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Kind string `json:"kind"`
Layer string `json:"layer"`
State string `json:"state"`
StateReason string `json:"state_reason"`
DesiredReplicas int `json:"desired_replicas,omitempty"`
ReadyReplicas int `json:"ready_replicas,omitempty"`
Pods int `json:"pods,omitempty"`
ReadyPods int `json:"ready_pods,omitempty"`
Restarts int `json:"restarts,omitempty"`
CPUCores float64 `json:"cpu_cores,omitempty"`
MemoryBytes float64 `json:"memory_bytes,omitempty"`
ReadyEndpoints int `json:"ready_endpoints,omitempty"`
TotalEndpoints int `json:"total_endpoints,omitempty"`
Services []string `json:"services"`
Ports []ServicePort `json:"ports"`
Hosts []string `json:"hosts"`
Labels map[string]string `json:"labels,omitempty"`
}
type ApplicationTopology ¶
type ApplicationTopology struct {
ObservedAt time.Time `json:"observed_at"`
Source TopologySource `json:"source"`
Summary TopologySummary `json:"summary"`
Nodes []ApplicationNode `json:"nodes"`
Edges []ApplicationEdge `json:"edges"`
Alerts []ApplicationAlert `json:"alerts"`
Warnings []string `json:"warnings"`
}
ApplicationTopology is a read-only, project-scoped view of the workloads already running in Kubernetes. It deliberately contains no Secret data.
type HelmRelease ¶
type IngressConfigSyncReport ¶
type IngressConfigSyncReport struct {
UpdatedDomains int `json:"updated_domains"`
ImportedDomains int `json:"imported_domains"`
ImportedRoutes int `json:"imported_routes"`
ConsolidatedDomains int `json:"consolidated_domains"`
PreservedDomains int `json:"preserved_domains"`
Skipped []string `json:"skipped"`
}
func SyncIngressesToDomainConfig ¶
func SyncIngressesToDomainConfig(doc environment.Document, inventory []KubernetesIngress) IngressConfigSyncReport
SyncIngressesToDomainConfig imports only route data that can be mapped back safely to an existing project domain. Routes are grouped by host because one domain is commonly split into several Higress objects. The side with more valid, non-conflicting paths wins; equal counts preserve deployment config.
func SyncIngressesToDomainConfigFromCluster ¶
func SyncIngressesToDomainConfigFromCluster(doc environment.Document, inventory []KubernetesIngress) IngressConfigSyncReport
SyncIngressesToDomainConfigFromCluster treats EKS as authoritative for every registered host and imports new, unambiguous Ingress hosts from namespaces owned by this project environment. It never removes desired routes that have not reached the cluster yet.
type KubernetesIngress ¶
type KubernetesIngress struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
ClassName string `json:"class_name"`
ResourceVersion string `json:"resource_version"`
Hosts []string `json:"hosts"`
Paths []KubernetesIngressPath `json:"paths"`
TLSSecrets []string `json:"tls_secrets"`
Addresses []string `json:"addresses"`
CreationTimestamp string `json:"creation_timestamp,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
BackendProtocol string `json:"backend_protocol,omitempty"`
SyncStatus string `json:"sync_status"`
Desired bool `json:"desired"`
ConfigIndex *int `json:"config_index,omitempty"`
}
func DecodeKubernetesIngressList ¶
func DecodeKubernetesIngressList(payload []byte) ([]KubernetesIngress, error)
DecodeKubernetesIngressList exposes the same safe decoder used by the platform API for maintenance commands that only read cluster inventory.
type KubernetesIngressDocument ¶
type KubernetesIngressDocument struct {
Ingress KubernetesIngress `json:"ingress"`
YAML string `json:"yaml"`
}
type KubernetesIngressPath ¶
type KubernetesIngressValidation ¶
type KubernetesIngressValidation struct {
Valid bool `json:"valid"`
Ingress KubernetesIngress `json:"ingress"`
NormalizedYAML string `json:"normalized_yaml"`
Warnings []string `json:"warnings"`
}
type KubernetesService ¶
type KubernetesService struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Type string `json:"type"`
Ports []ServicePort `json:"ports"`
LoadBalancerHosts []string `json:"load_balancer_hosts"`
EndpointHealthKnown bool `json:"endpoint_health_known"`
ReadyEndpoints int `json:"ready_endpoints"`
TotalEndpoints int `json:"total_endpoints"`
}
type ManagedStorage ¶
type ManagedStorage struct {
Component string `json:"component"`
Namespace string `json:"namespace"`
PVCName string `json:"pvc_name"`
Requested string `json:"requested"`
Capacity string `json:"capacity"`
Phase string `json:"phase"`
StorageClass string `json:"storage_class"`
AllowExpansion bool `json:"allow_expansion"`
WorkloadKind string `json:"workload_kind"`
WorkloadName string `json:"workload_name"`
VolumeName string `json:"volume_name"`
Active bool `json:"active"`
Retained bool `json:"retained"`
Project string `json:"-"`
Environment string `json:"-"`
}
ManagedStorage describes one PVC owned by a platform-managed stateful stack. Kubernetes object names are returned for display only; mutation endpoints rediscover them from trusted labels and never accept them from the browser.
type ManagedStorageReport ¶
type ManagedStorageReport struct {
ObservedAt time.Time `json:"observed_at"`
Items []ManagedStorage `json:"items"`
}
type PodSummary ¶
type PodSummary struct {
Total int `json:"total"`
Ready int `json:"ready"`
Pending int `json:"pending"`
Failed int `json:"failed"`
Unhealthy []UnhealthyPod `json:"unhealthy"`
}
type Report ¶
type Report struct {
Project string `json:"project,omitempty"`
Environment string `json:"environment"`
EnvironmentName string `json:"environment_name,omitempty"`
TargetName string `json:"target_name,omitempty"`
ObservedAt time.Time `json:"observed_at"`
Cluster Cluster `json:"cluster"`
Nodes []Node `json:"nodes"`
Pods PodSummary `json:"pods"`
Components []Component `json:"components"`
Releases []HelmRelease `json:"releases"`
Services []KubernetesService `json:"services"`
Outputs map[string]any `json:"outputs"`
Warnings []string `json:"warnings"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(config *appconfig.Config, environments *environment.Repository) *Service
func NewServiceWithCache ¶
func NewServiceWithCache(config *appconfig.Config, environments *environment.Repository, cache Cache) *Service
func (*Service) ApplicationTopology ¶
func (s *Service) ApplicationTopology(ctx context.Context, name string, fresh bool) (*ApplicationTopology, error)
ApplicationTopology returns a short-lived, coalesced observation. A normal page refresh therefore does not fan out into repeated kubectl/Prometheus calls when several operators open the same project environment.
func (*Service) ApplyIngress ¶
func (*Service) Cached ¶
Cached returns the last short-lived observation without contacting AWS or the Kubernetes API. Project listings use it as an optional health signal so opening the project page never fans out into slow cloud requests.
func (*Service) CachedMany ¶
CachedMany reads project-card status snapshots in one cache round trip when the backing store supports it. Corrupt or missing entries are intentionally omitted because the project list treats health as an optional hint.
func (*Service) CollectFresh ¶
func (*Service) DeleteIngress ¶
func (*Service) GetIngress ¶
func (*Service) ListClickVisualStorage ¶
func (s *Service) ListClickVisualStorage(ctx context.Context, name string) (*ManagedStorageReport, error)
ListClickVisualStorage performs a focused live query. It deliberately does not run the full environment status collector, keeping the storage panel responsive and avoiding unrelated AWS/Helm calls.
func (*Service) ListIngresses ¶
func (*Service) ListOpenTelemetryStorage ¶
func (s *Service) ListOpenTelemetryStorage(ctx context.Context, name string) (*ManagedStorageReport, error)
ListOpenTelemetryStorage reads the live WAL PVCs owned by the Collector. The Collector is not a long-term telemetry backend: these volumes only hold file_storage sending queues while an exporter destination is unavailable.
func (*Service) ListServices ¶
ListServices performs a focused, live EKS query for the gateway backend selector. It intentionally avoids the heavier node, pod, Helm and add-on collection used by the environment overview.
func (*Service) SetAWSCredentialProvider ¶
func (s *Service) SetAWSCredentialProvider(provider AWSCredentialProvider)
func (*Service) SetTerraformOutputProvider ¶
func (s *Service) SetTerraformOutputProvider(provider TerraformOutputProvider)
func (*Service) ValidateIngress ¶
type ServicePort ¶
type TerraformOutputProvider ¶
type TopologySource ¶
type TopologySummary ¶
type TopologySummary struct {
Normal int `json:"normal"`
Warning int `json:"warning"`
Abnormal int `json:"abnormal"`
Total int `json:"total"`
Connections int `json:"connections"`
RuntimeConnections int `json:"runtime_connections"`
EndpointConnections int `json:"endpoint_connections"`
DeclaredConnections int `json:"declared_connections"`
}