Documentation
¶
Index ¶
- Constants
- Variables
- func ClusterName(doc Document) string
- func ConfigureNewEnvironmentScheduling(doc Document)
- func ConfigureRegion(doc Document, region string) error
- func ConfigureTarget(doc Document, targetType string) error
- func GetPath(doc Document, path string) (any, bool)
- func IsExistingEKS(doc Document) bool
- func ManageClusterAddons(doc Document) bool
- func NormalizeDomainBackendProtocols(doc Document)
- func NormalizeDomainRoutes(doc Document)
- func NormalizeManagedNodeGroupTaints(doc Document)
- func SameSchedulingPlan(current, next Document) bool
- func SetPath(doc Document, path string, value any)
- func TargetType(doc Document) string
- func ValidName(name string) bool
- func Validate(doc Document) error
- func ValidateTarget(doc Document) error
- func WorkloadSchedulingEnabled(doc Document) bool
- type Document
- type NodeGroupPlacement
- type NodeGroupSchedulingChanges
- type NodeGroupSchedulingPlan
- type NodeGroupTaint
- type Repository
- func (r *Repository) Clone(name, source string) (Document, error)
- func (r *Repository) CloneForProject(name, source, project, environment string) (Document, error)
- func (r *Repository) Delete(name string) error
- func (r *Repository) List(componentPaths map[string]string) ([]Summary, error)
- func (r *Repository) Load(name string) (Document, error)
- func (r *Repository) Path(name string) string
- func (r *Repository) Save(name string, doc Document) error
- type Store
- type Summary
Constants ¶
const ( TargetManaged = "managed" TargetExistingEKS = "existing_eks" )
Variables ¶
var ( ErrInvalidName = errors.New("invalid environment name") ErrAlreadyExists = errors.New("environment already exists") )
Functions ¶
func ClusterName ¶
func ConfigureNewEnvironmentScheduling ¶
func ConfigureNewEnvironmentScheduling(doc Document)
ConfigureNewEnvironmentScheduling is called only while a new environment record is being created. It upgrades a cloned legacy layout into the new application/platform split without changing an existing environment.
func ConfigureRegion ¶
ConfigureRegion updates the Region and all Region-qualified availability zone references together. Keeping this atomic prevents a newly created environment from carrying ap-south-1 subnet keys into another Region.
func ConfigureTarget ¶
ConfigureTarget is used while creating an environment. Existing-cluster targets receive project-scoped namespaces so two projects can safely use the same EKS cluster without sharing Helm release ownership.
func IsExistingEKS ¶
func ManageClusterAddons ¶
func NormalizeDomainBackendProtocols ¶
func NormalizeDomainBackendProtocols(doc Document)
NormalizeDomainBackendProtocols keeps the client-to-gateway protocol separate from the gateway-to-Service protocol. HTTPS/WSS/GRPCS describes edge TLS; the upstream can independently be HTTP, HTTPS, gRPC or gRPCS. Older UI versions inferred HTTPS solely from Service port 443, which is unsafe because Kubernetes commonly maps port 443 to a plaintext named port.
func NormalizeDomainRoutes ¶
func NormalizeDomainRoutes(doc Document)
NormalizeDomainRoutes upgrades the legacy one-domain/one-backend structure to the domain-level routes collection used by the UI and Terraform. The legacy fields are deliberately retained as a first-route mirror so an older platform binary can still read a rolled-back configuration.
func NormalizeManagedNodeGroupTaints ¶
func NormalizeManagedNodeGroupTaints(doc Document)
NormalizeManagedNodeGroupTaints enforces the platform scheduling contract: only business workload nodes use a NoSchedule taint. Gateway and platform workloads are still pinned with workload-class labels and selectors, while keeping those nodes available to EKS system workloads when necessary.
func SameSchedulingPlan ¶
func TargetType ¶
TargetType returns the environment's infrastructure ownership model. Older documents default to managed so the migration cannot accidentally detach resources that are already owned by this platform.
func ValidateTarget ¶
Types ¶
type Document ¶
func ApplyDefaults ¶
ApplyDefaults upgrades older environment documents without overwriting any user-selected value. This keeps component expansion backward compatible.
func DefaultDocument ¶
DefaultDocument is the safe, editable starting point for a newly created project environment. It intentionally enables only the EKS platform prerequisites; paid data services and self-hosted components remain opt-in.
type NodeGroupPlacement ¶
type NodeGroupSchedulingChanges ¶
type NodeGroupSchedulingChanges struct {
EnabledChanged bool
Added []string
Removed []string
Modified []string
}
NodeGroupSchedulingChanges describes changes to the immutable placement contract of managed node groups. Capacity is intentionally excluded: an operator may always adjust min/max capacity, while an existing node group's instance/network/scheduling contract remains protected.
func CompareSchedulingPlans ¶
func CompareSchedulingPlans(current, next Document) NodeGroupSchedulingChanges
CompareSchedulingPlans allows callers to implement append-only updates for an existing EKS cluster: new node groups are safe to create, but removing or mutating a provisioned group could evict workloads or destroy capacity.
type NodeGroupSchedulingPlan ¶
type NodeGroupSchedulingPlan struct {
Enabled bool
Groups map[string]NodeGroupPlacement
}
NodeGroupSchedulingPlan contains the immutable part of a managed EKS node group plan. Capacity values are deliberately excluded so operators can keep scaling an existing group without changing its placement contract.
func SchedulingPlan ¶
func SchedulingPlan(doc Document) NodeGroupSchedulingPlan
type NodeGroupTaint ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(dir string) (*Repository, error)
func NewRepositoryWithStore ¶
func NewRepositoryWithStore(dir string, store Store) (*Repository, error)
func (*Repository) CloneForProject ¶
func (r *Repository) CloneForProject(name, source, project, environment string) (Document, error)
func (*Repository) Delete ¶
func (r *Repository) Delete(name string) error
func (*Repository) List ¶
func (r *Repository) List(componentPaths map[string]string) ([]Summary, error)
func (*Repository) Path ¶
func (r *Repository) Path(name string) string