eks

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 36 Imported by: 0

README

EKS

Parity grade: A · SDK aws-sdk-go-v2/service/eks@v1.98.0 · last audited 2026-09-11 (7c297a53)

Coverage

Metric Value
PARITY entries audited 70 (70 ok)
Known gaps 7
Deferred items 1
Resource leaks clean
Known gaps
  • ListUpdates.AddonName/CapabilityName filters are unimplemented: UpdateAddon/UpdateCapability never create an Update record in this backend (they return a fabricated Update-shaped map directly, not a stored Update), so there is no addon/capability-scoped Update to filter over yet
  • Insight/DescribeInsight content beyond the two derivable UPGRADE_READINESS checks (Kubernetes version end-of-support, version behind latest -- gopherstack-wf8f item 2) remains unmodeled: deprecated-Kubernetes-API-usage insights, AddonCompatibilityDetails, InsightCategorySpecificSummary.DeprecationDetails, Resources[]/InsightResourceDetail, and the entire MISCONFIGURATION category (EKS Hybrid Nodes) all require either a live Kubernetes API server or a hybrid-nodes model this backend does not have -- inherent emulator limitation, not something fixable by more wire-shape work
  • ArgoCdAwsIdcConfig.IdcManagedApplicationArn and ArgoCdConfig.ServerUrl (real AWS's server-computed IAM Identity Center application ARN and Argo CD web/API URL) have no documented derivation pattern anywhere in the pinned SDK's doc comments or the EKS user guide's capabilities/argocd pages (WebFetch'd 2026-09-11) -- left empty on every CreateCapability/DescribeCapability/UpdateCapability response rather than fabricated
  • ClientRequestToken idempotency (gopherstack-wf8f item 3) does not enforce the documented 24-hour token validity window (api_op_CreateCluster.go: 'This token is valid for 24 hours after creation.') -- tokens remain valid for the lifetime of the backend. Conservative (can only cause an over-eager replay of a token real AWS would have already expired, never fabricate a wrong new resource); no TTL sweep infrastructure was added for this
  • gopherstack-lruaw (2026-09-11): CertificateAuthority.ScheduledEvents (FinalAutoActivation/FirstAutoActivation) is unmodeled -- no published derivation formula from the CA's validity period exists in the pinned SDK's doc comments or the EKS user guide
  • gopherstack-lruaw (2026-09-11): ActivateCertificateAuthority's RollbackAvailable window ('For a limited period after activation, CA rollback is available') is set true on the retired outgoing CA but never expires -- no TTL sweep exists for it, the same disclosed simplification as the ClientRequestToken 24h window above
  • gopherstack-lruaw (2026-09-11): DeleteCertificateAuthority's second documented protection case ('a successor that Amazon EKS appended can't be deleted while it's the only successor') can never trigger here -- every CA in this backend has CreatedBy=CUSTOMER, since nothing auto-provisions an EKS-created initial cluster CA into the new certificateAuthorities table (the pre-existing, unrelated Cluster.CertificateAuthority placeholder field is untouched by this pass)
Deferred
  • gopherstack-wf8f (2026-09-11) closeout of the prior pass's error-code-granularity item: ResourceLimitExceededException is now enforced (item 4) for every op that declares it and has a real, published AWS quota this backend can plausibly hit (CreateAccessEntry, CreateCapability, CreateCluster, CreateEksAnywhereSubscription, CreateFargateProfile, CreateNodegroup, CreatePodIdentityAssociation, RegisterCluster -- see limits.go). ClientException/ServerException/ServiceUnavailableException/ThrottlingException are declared by this SDK's deserializers.go on some ops but remain structurally unreachable from this backend: re-ran cmd/errtargetaudit -dir eks this pass (0 class-A findings, matching the 2026-08-31 eks-is-clean sweep) and found no new reachable case for any of them -- ClientException/ServerException model IAM-permission-denial and server-side-fault conditions this backend has no authorization-denial or fault-injection mechanism for; ServiceUnavailableException/ThrottlingException model transient infrastructure conditions an in-memory backend structurally cannot produce. Consistent with every other gopherstack service's treatment of these codes, not unique to eks

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when an EKS resource is not found.
	ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when an EKS resource already exists.
	ErrAlreadyExists = awserr.New("ResourceInUseException", awserr.ErrConflict)
	// ErrValidation is returned when request input fails validation. The code
	// is "InvalidParameterException" -- "InvalidParameterValueException" does
	// not exist anywhere in aws-sdk-go-v2/service/eks@v1.90.4 (confirmed by
	// grepping the whole module), and every op that models parameter
	// validation in its own deserializeOpError switch uses
	// InvalidParameterException.
	ErrValidation = awserr.New("InvalidParameterException", awserr.ErrInvalidParameter)
	// ErrInvalidRequest is for state-conflict validation failures (e.g.
	// cancelling an update whose type/status does not support cancellation)
	// that real AWS EKS reports as InvalidRequestException rather than
	// InvalidParameterValueException -- verified against
	// aws-sdk-go-v2/service/eks's deserializers.go error-code switch, which
	// lists InvalidRequestException as a distinct client-fault shape from
	// InvalidParameterException on ops like CancelUpdate.
	ErrInvalidRequest = awserr.New("InvalidRequestException", awserr.ErrConflict)
	// ErrResourceLimitExceeded is returned when a create call would push a
	// resource count past its published EKS service quota (see limits.go).
	// HTTP Status Code 400 -- confirmed against the API reference's Errors
	// table for CreateCluster/CreateNodegroup/etc.
	// (docs.aws.amazon.com/eks/latest/APIReference/API_CreateCluster.html,
	// WebFetch'd 2026-09-11): "ResourceLimitExceededException ... HTTP Status
	// Code: 400".
	ErrResourceLimitExceeded = awserr.New("ResourceLimitExceededException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned by Init when appCtx is nil.

Functions

This section is empty.

Types

type AccessConfig

type AccessConfig struct {
	AuthenticationMode                      string `json:"authenticationMode,omitempty"`
	BootstrapClusterCreatorAdminPermissions bool   `json:"bootstrapClusterCreatorAdminPermissions"`
}

AccessConfig holds the cluster authentication mode configuration.

type AccessEntry

type AccessEntry struct {
	CreatedAt        time.Time  `json:"createdAt"`
	ModifiedAt       time.Time  `json:"modifiedAt"`
	Tags             *tags.Tags `json:"tags,omitempty"`
	PrincipalARN     string     `json:"principalArn"`
	ClusterName      string     `json:"clusterName"`
	ARN              string     `json:"accessEntryArn"`
	Type             string     `json:"type"`
	Username         string     `json:"username,omitempty"`
	KubernetesGroups []string   `json:"kubernetesGroups,omitempty"`
}

AccessEntry represents an EKS access entry that grants a principal access to a cluster.

type AccessEntryUpdate

type AccessEntryUpdate struct {
	Username         string
	KubernetesGroups []string
}

AccessEntryUpdate holds the mutable fields for UpdateAccessEntry.

type AccessPolicyAssociation

type AccessPolicyAssociation struct {
	AssociatedAt time.Time      `json:"associatedAt"`
	AccessScope  map[string]any `json:"accessScope,omitempty"`
	PolicyARN    string         `json:"policyArn"`
	ClusterName  string         `json:"clusterName"`
	PrincipalARN string         `json:"principalArn"`
}

AccessPolicyAssociation represents an access policy associated with an access entry.

type Addon

type Addon struct {
	CreatedAt               time.Time    `json:"createdAt"`
	Health                  *AddonHealth `json:"health,omitempty"`
	Tags                    *tags.Tags   `json:"tags,omitempty"`
	ARN                     string       `json:"addonArn"`
	ClusterName             string       `json:"clusterName"`
	AddonName               string       `json:"addonName"`
	AddonVersion            string       `json:"addonVersion,omitempty"`
	MarketplaceVersion      string       `json:"marketplaceVersion,omitempty"`
	Status                  string       `json:"status"`
	ServiceAccountRoleARN   string       `json:"serviceAccountRoleArn,omitempty"`
	Configuration           string       `json:"configurationValues,omitempty"`
	ResolveConflicts        string       `json:"resolveConflicts,omitempty"`
	Namespace               string       `json:"namespace,omitempty"`
	PodIdentityAssociations []string     `json:"podIdentityAssociations,omitempty"`
}

Addon represents an EKS managed add-on.

type AddonHealth

type AddonHealth struct {
	Issues []map[string]string `json:"issues,omitempty"`
}

AddonHealth represents the health status of an EKS managed add-on.

type AnywhereSubscription

type AnywhereSubscription struct {
	CreatedAt       time.Time         `json:"createdAt"`
	EffectiveDate   time.Time         `json:"effectiveDate"`
	ExpirationDate  time.Time         `json:"expirationDate"`
	Tags            *tags.Tags        `json:"tags,omitempty"`
	Term            *SubscriptionTerm `json:"term,omitempty"`
	ID              string            `json:"id"`
	ARN             string            `json:"arn"`
	Name            string            `json:"name"`
	Status          string            `json:"status"`
	LicenseType     string            `json:"licenseType,omitempty"`
	LicenseQuantity int32             `json:"licenseQuantity,omitempty"`
	AutoRenew       bool              `json:"autoRenew"`
}

AnywhereSubscription represents an EKS Anywhere subscription.

type ArgoCdAwsIdcConfig

type ArgoCdAwsIdcConfig struct {
	IdcInstanceArn           string `json:"idcInstanceArn,omitempty"`
	IdcManagedApplicationArn string `json:"idcManagedApplicationArn,omitempty"`
	IdcRegion                string `json:"idcRegion,omitempty"`
}

ArgoCdAwsIdcConfig is this backend's stored form of the union of aws-sdk-go-v2/service/eks/types.ArgoCdAwsIdcConfigRequest (types.go:348, IdcInstanceArn/IdcRegion) and ArgoCdAwsIdcConfigResponse (types.go:365, adds IdcManagedApplicationArn). IdcManagedApplicationArn is real AWS's server-computed ARN of the IAM Identity Center managed application EKS creates for the capability -- neither the SDK doc comment nor https://docs.aws.amazon.com/eks/latest/userguide/capabilities.html (WebFetch'd 2026-09-11) document a derivable ARN pattern, so it is left empty here rather than fabricated (see PARITY.md gaps).

type ArgoCdConfig

type ArgoCdConfig struct {
	AwsIdc           *ArgoCdAwsIdcConfig        `json:"awsIdc,omitempty"`
	NetworkAccess    *ArgoCdNetworkAccessConfig `json:"networkAccess,omitempty"`
	Namespace        string                     `json:"namespace,omitempty"`
	ServerURL        string                     `json:"serverUrl,omitempty"`
	RbacRoleMappings []ArgoCdRoleMapping        `json:"rbacRoleMappings,omitempty"`
}

ArgoCdConfig is this backend's stored form of the union of aws-sdk-go-v2/service/eks/types.ArgoCdConfigRequest (types.go:386) and ArgoCdConfigResponse (types.go:418). ServerURL is real AWS's server-computed Argo CD web/API URL -- no derivation pattern is documented in the SDK doc comment or the EKS user guide's capabilities pages (WebFetch'd 2026-09-11), so it is left empty here rather than fabricated (see PARITY.md gaps).

type ArgoCdNetworkAccessConfig

type ArgoCdNetworkAccessConfig struct {
	VpceIDs []string `json:"vpceIds,omitempty"`
}

ArgoCdNetworkAccessConfig mirrors aws-sdk-go-v2/service/eks/types.ArgoCdNetworkAccessConfigRequest/Response (types.go:446,461) -- both carry only VpceIDs.

type ArgoCdRoleMapping

type ArgoCdRoleMapping struct {
	Role       string        `json:"role"`
	Identities []SsoIdentity `json:"identities"`
}

ArgoCdRoleMapping mirrors aws-sdk-go-v2/service/eks/types.ArgoCdRoleMapping (types.go:474) -- Role and Identities are both required members.

type AutoScalingGroup

type AutoScalingGroup struct {
	Name string `json:"name"`
}

AutoScalingGroup holds the name of an ASG backing the node group.

type BlockStorageConfig

type BlockStorageConfig struct {
	Enabled bool `json:"enabled"`
}

BlockStorageConfig holds EKS Auto Mode block storage settings.

type Cancellation added in v1.2.0

type Cancellation struct {
	Status string `json:"status"`
	Reason string `json:"reason,omitempty"`
}

Cancellation represents the latest cancellation state of an Update, present only when a cancellation was attempted (e.g. via CancelUpdate).

type Capability

type Capability struct {
	CreatedAt               time.Time                `json:"createdAt"`
	ModifiedAt              time.Time                `json:"modifiedAt"`
	Tags                    *tags.Tags               `json:"tags,omitempty"`
	Configuration           *CapabilityConfiguration `json:"configuration,omitempty"`
	Health                  *CapabilityHealth        `json:"health,omitempty"`
	ClusterName             string                   `json:"clusterName"`
	CapabilityName          string                   `json:"capabilityName"`
	ARN                     string                   `json:"arn"`
	Type                    string                   `json:"type,omitempty"`
	RoleARN                 string                   `json:"roleArn,omitempty"`
	DeletePropagationPolicy string                   `json:"deletePropagationPolicy,omitempty"`
	Version                 string                   `json:"version,omitempty"`
	Status                  string                   `json:"status"`
}

Capability represents an EKS capability. Capabilities are cluster-scoped: CapabilityName is unique per cluster, not globally (verified against aws-sdk-go-v2/service/eks -- CreateCapabilityInput requires ClusterName, CapabilityName, Type, RoleArn, and DeletePropagationPolicy; the route is /clusters/{clusterName}/capabilities[/{capabilityName}]).

func (*Capability) UnmarshalJSON

func (c *Capability) UnmarshalJSON(data []byte) error

UnmarshalJSON degrades a persisted Configuration this pass's typed *CapabilityConfiguration cannot represent to nil instead of failing this Capability's decode -- see this file's top-of-file doc comment for why. Every other field decodes exactly as the plain Capability struct tags already specify (via the capabilityAlias trick, which shadows only "configuration" so encoding/json still promotes every other field normally).

type CapabilityConfiguration

type CapabilityConfiguration struct {
	ArgoCd *ArgoCdConfig `json:"argoCd,omitempty"`
}

CapabilityConfiguration is this backend's typed replacement for the former untyped map[string]any Configuration passthrough (gopherstack-wf8f item 1). Only ArgoCd is modeled: aws-sdk-go-v2/service/eks@v1.98.0's CapabilityConfigurationRequest/Response (types.go:645,655) carry only an ArgoCd member -- this pinned SDK version has no typed Configuration schema for ACK or KRO capabilities at all despite CapabilityType having ACK/ARGOCD/KRO values (confirmed: types.go has zero "Ack"/"Kro"-prefixed struct types beyond the CapabilityType enum values themselves). A CreateCapability/UpdateCapability for an ACK or KRO capability therefore carries no Configuration on the wire in this SDK version, matching real AWS's own shape.

type CapabilityHealth added in v1.2.0

type CapabilityHealth struct {
	Issues []CapabilityIssue `json:"issues"`
}

CapabilityHealth mirrors aws-sdk-go-v2/service/eks/types.CapabilityHealth.

type CapabilityIssue added in v1.2.0

type CapabilityIssue struct {
	Code        string   `json:"code,omitempty"`
	Message     string   `json:"message,omitempty"`
	ResourceIDs []string `json:"resourceIds,omitempty"`
}

CapabilityIssue represents a single health issue affecting a Capability.

type CertificateAuthority

type CertificateAuthority struct {
	CreatedAt          time.Time  `json:"createdAt"`
	NotBefore          time.Time  `json:"notBefore"`
	NotAfter           time.Time  `json:"notAfter"`
	ActivatedAt        *time.Time `json:"activatedAt,omitempty"`
	ID                 string     `json:"id"`
	ClusterName        string     `json:"clusterName"`
	Data               string     `json:"data"`
	CreatedBy          string     `json:"createdBy"`
	ActivatedBy        string     `json:"activatedBy,omitempty"`
	DistributionStatus string     `json:"distributionStatus"`
	SigningStatus      string     `json:"signingStatus"`
	RollbackAvailable  bool       `json:"rollbackAvailable"`
}

CertificateAuthority represents an EKS Hybrid Nodes cluster certificate authority (eks@v1.98.0's Create/Activate/Delete/Describe/ ListCertificateAuthorities family, types.CertificateAuthority/ types.CertificateAuthoritySummary). ClusterName carries a real json tag (unlike Update.NodegroupName's json:"-" precedent above) because it keys certificateAuthoritiesByCluster: losing it on restore would misfile every persisted CA under the empty-string group. Neither real type puts a cluster identity on the wire -- certificateAuthorityToJSON/ certificateAuthoritySummaryToJSON (handler_certificate_authorities.go) never emit this field, so the tag only affects persistence, not the API response. ScheduledEvents (types.CertificateAuthorityScheduledEvents) is deliberately unmodeled: real EKS computes it from the CA's validity period with no published formula, so nothing is fabricated in its place (see PARITY.md gaps).

type Cluster

type Cluster struct {
	CreatedAt               time.Time                `json:"createdAt"`
	Tags                    *tags.Tags               `json:"tags,omitempty"`
	VpcConfig               *VpcConfig               `json:"resourcesVpcConfig,omitempty"`
	KubernetesNetworkConfig *KubernetesNetworkConfig `json:"kubernetesNetworkConfig,omitempty"`
	AccessConfig            *AccessConfig            `json:"accessConfig,omitempty"`
	ComputeConfig           *ComputeConfig           `json:"computeConfig,omitempty"`
	StorageConfig           *StorageConfig           `json:"storageConfig,omitempty"`
	ConnectorConfig         *ConnectorConfig         `json:"connectorConfig,omitempty"`
	ARN                     string                   `json:"arn"`
	Name                    string                   `json:"name"`
	Endpoint                string                   `json:"endpoint,omitempty"`
	OIDCIssuer              string                   `json:"oidcIssuer,omitempty"`
	Version                 string                   `json:"version"`
	Status                  string                   `json:"status"`
	RoleARN                 string                   `json:"roleArn,omitempty"`
	AccountID               string                   `json:"accountId"`
	Region                  string                   `json:"region"`
	PlatformVersion         string                   `json:"platformVersion,omitempty"`
	CertificateAuthority    string                   `json:"certificateAuthority,omitempty"`
	ClusterLogging          []ClusterLogEntry        `json:"clusterLogging,omitempty"`
	EncryptionConfig        []EncryptionConfig       `json:"encryptionConfig,omitempty"`
}

Cluster represents an EKS cluster.

The Tags field is backend-owned. Callers must treat the returned pointer as read-only; mutate tags only via TagResource / CreateCluster.

type ClusterConfigUpdate

type ClusterConfigUpdate struct {
	AccessConfig  *AccessConfig
	ComputeConfig *ComputeConfig
	StorageConfig *StorageConfig
	LogEntries    []ClusterLogEntry
	SubnetIDs     []string
}

ClusterConfigUpdate holds mutable cluster config fields for UpdateClusterConfig.

type ClusterLogEntry

type ClusterLogEntry struct {
	Types   []string `json:"types"`
	Enabled bool     `json:"enabled"`
}

ClusterLogEntry represents one log-type group in the structured logging config.

type ClusterOptionalConfig

type ClusterOptionalConfig struct {
	AccessConfig  *AccessConfig
	ComputeConfig *ComputeConfig
	StorageConfig *StorageConfig
}

ClusterOptionalConfig groups optional cluster configuration for CreateCluster.

type ComputeConfig

type ComputeConfig struct {
	NodeRoleARN string   `json:"nodeRoleArn,omitempty"`
	NodePools   []string `json:"nodePools,omitempty"`
	Enabled     bool     `json:"enabled"`
}

ComputeConfig holds the EKS Auto Mode compute configuration.

type ConnectorConfig

type ConnectorConfig struct {
	ActivationExpiry activationExpiry `json:"activationExpiry"`
	ActivationCode   string           `json:"activationCode,omitempty"`
	ActivationID     string           `json:"activationId,omitempty"`
	Provider         string           `json:"provider,omitempty"`
	RoleARN          string           `json:"roleArn,omitempty"`
}

ConnectorConfig holds metadata for externally-registered clusters. ActivationExpiry's wire emission is epoch seconds, built via .Time().Unix() in the handler layer (connectorConfigToJSON) -- see activationExpiry's doc comment for why the persisted (snapshot) shape is a separate concern.

type ElasticLoadBalancingConfig

type ElasticLoadBalancingConfig struct {
	Enabled bool `json:"enabled"`
}

ElasticLoadBalancingConfig holds EKS Auto Mode load balancer settings.

type EncryptionConfig

type EncryptionConfig struct {
	Provider  map[string]string `json:"provider,omitempty"`
	Resources []string          `json:"resources,omitempty"`
}

EncryptionConfig represents a cluster encryption configuration.

type FargateProfile

type FargateProfile struct {
	CreatedAt           time.Time                `json:"createdAt"`
	Tags                *tags.Tags               `json:"tags,omitempty"`
	Health              *FargateProfileHealth    `json:"health,omitempty"`
	Subnets             []string                 `json:"subnets,omitempty"`
	ClusterName         string                   `json:"clusterName"`
	FargateProfileName  string                   `json:"fargateProfileName"`
	ARN                 string                   `json:"fargateProfileArn"`
	PodExecutionRoleARN string                   `json:"podExecutionRoleArn,omitempty"`
	Status              string                   `json:"status"`
	Selectors           []FargateProfileSelector `json:"selectors,omitempty"`
}

FargateProfile represents an EKS Fargate profile.

type FargateProfileHealth added in v1.2.0

type FargateProfileHealth struct {
	Issues []FargateProfileIssue `json:"issues"`
}

FargateProfileHealth mirrors aws-sdk-go-v2/service/eks/types.FargateProfileHealth.

type FargateProfileIssue added in v1.2.0

type FargateProfileIssue struct {
	Code        string   `json:"code,omitempty"`
	Message     string   `json:"message,omitempty"`
	ResourceIDs []string `json:"resourceIds,omitempty"`
}

FargateProfileIssue represents a single health issue reported for a Fargate profile.

type FargateProfileSelector

type FargateProfileSelector struct {
	Labels    map[string]string `json:"labels,omitempty"`
	Namespace string            `json:"namespace"`
}

FargateProfileSelector is a namespace/labels selector for a Fargate profile.

type Handler

type Handler struct {
	Backend *InMemoryBackend
}

Handler is the Echo HTTP handler for AWS EKS operations (REST-JSON protocol).

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new EKS handler.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this EKS instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the EKS operation name from the REST path.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the primary resource identifier from the URL path.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported EKS operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function for EKS requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches AWS EKS REST requests.

func (*Handler) Shutdown

func (h *Handler) Shutdown(_ context.Context)

Shutdown stops the backend's scheduled state-transition timers so no timer goroutine outlives the service. Invoked on server shutdown via service.Shutdowner.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

type IdentityProviderConfig

type IdentityProviderConfig struct {
	CreatedAt      time.Time         `json:"createdAt"`
	Tags           *tags.Tags        `json:"tags,omitempty"`
	OIDC           map[string]string `json:"oidc,omitempty"`
	RequiredClaims map[string]string `json:"requiredClaims,omitempty"`
	ClusterName    string            `json:"clusterName"`
	Name           string            `json:"name"`
	ARN            string            `json:"arn"`
	Type           string            `json:"type"`
	Status         string            `json:"status"`
}

IdentityProviderConfig represents an identity provider configuration for a cluster.

OIDC holds the flat string-valued OIDC fields (issuerUrl, clientId, usernameClaim, usernamePrefix, groupsClaim, groupsPrefix); RequiredClaims is kept separate since the real aws-sdk-go-v2/service/eks.OidcIdentityProviderConfig.RequiredClaims is a nested map, not a flat string like the other OIDC fields.

type InMemoryBackend

type InMemoryBackend struct {
	// contains filtered or unexported fields
}

InMemoryBackend is the in-memory store for EKS resources.

Phase 3.3 (pkgs/store conversion): every map[string]*T (and nested map[string]map[string]*T) resource field is a *store.Table[T] registered once on registry -- see store_setup.go. Two fields are deliberately left as plain maps because their values are not *T (accessPolicies holds []*AccessPolicyAssociation slices; encryptionConfigs holds []EncryptionConfig value slices), which does not fit store.Table's keyed-single-value shape -- see the comment above registerAllTables.

func NewInMemoryBackend

func NewInMemoryBackend(ctx context.Context, accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory EKS backend.

func (*InMemoryBackend) ActivateCertificateAuthority

func (b *InMemoryBackend) ActivateCertificateAuthority(
	clusterName, id string,
) (*CertificateAuthority, *Update, error)

ActivateCertificateAuthority promotes a successor certificate authority to be the cluster's signer, retiring the previously active one.

func (*InMemoryBackend) AddAccessEntryInternal

func (b *InMemoryBackend) AddAccessEntryInternal(e *AccessEntry)

AddAccessEntryInternal inserts a pre-built access entry into the backend. Intended only for test seeding.

func (*InMemoryBackend) AddAddonInternal

func (b *InMemoryBackend) AddAddonInternal(a *Addon)

AddAddonInternal inserts a pre-built add-on into the backend. Intended only for test seeding.

func (*InMemoryBackend) AddCapabilityInternal

func (b *InMemoryBackend) AddCapabilityInternal(capa *Capability)

AddCapabilityInternal inserts a pre-built capability into the backend. Intended only for test seeding.

func (*InMemoryBackend) AddClusterInternal

func (b *InMemoryBackend) AddClusterInternal(c *Cluster)

AddClusterInternal inserts a pre-built cluster directly into the backend. Intended only for test seeding; not safe for production use.

func (*InMemoryBackend) AddFargateProfileInternal

func (b *InMemoryBackend) AddFargateProfileInternal(p *FargateProfile)

AddFargateProfileInternal inserts a pre-built Fargate profile into the backend. Intended only for test seeding.

func (*InMemoryBackend) AddNodegroupInternal

func (b *InMemoryBackend) AddNodegroupInternal(ng *Nodegroup)

AddNodegroupInternal inserts a pre-built node group into the backend. Intended only for test seeding.

func (*InMemoryBackend) AddPodIdentityAssociationInternal

func (b *InMemoryBackend) AddPodIdentityAssociationInternal(a *PodIdentityAssociation)

AddPodIdentityAssociationInternal inserts a pre-built pod identity association. Intended only for test seeding.

func (*InMemoryBackend) AddSubscriptionInternal

func (b *InMemoryBackend) AddSubscriptionInternal(sub *AnywhereSubscription)

AddSubscriptionInternal inserts a pre-built EKS Anywhere subscription into the backend. Intended only for test seeding.

func (*InMemoryBackend) AssociateAccessPolicy

func (b *InMemoryBackend) AssociateAccessPolicy(
	clusterName, principalARN, policyARN string,
	accessScope map[string]any,
) (*AccessPolicyAssociation, error)

AssociateAccessPolicy associates an access policy with an access entry. If the principal already has an association for the same policyARN, it is replaced.

func (*InMemoryBackend) AssociateEncryptionConfig

func (b *InMemoryBackend) AssociateEncryptionConfig(
	clusterName string,
	configs []EncryptionConfig,
) ([]EncryptionConfig, error)

AssociateEncryptionConfig associates encryption configuration with a cluster. Each call replaces the stored configuration rather than appending.

func (*InMemoryBackend) AssociateIdentityProviderConfig

func (b *InMemoryBackend) AssociateIdentityProviderConfig(
	clusterName, configType, name string,
	params, requiredClaims, kv map[string]string,
) (*IdentityProviderConfig, error)

AssociateIdentityProviderConfig associates an identity provider configuration with a cluster.

func (*InMemoryBackend) CancelUpdate added in v1.2.0

func (b *InMemoryBackend) CancelUpdate(clusterName, updateID string) (*Update, error)

CancelUpdate cancels an in-progress update on a best-effort basis. Real EKS currently only supports cancellation for VersionRollback updates that are still InProgress (Kubernetes version rollback on EKS Auto Mode clusters) -- verified against aws-sdk-go-v2/service/eks's CancelUpdate doc comment. Any other update type or status returns ErrInvalidRequest, matching the real API's "cancellation is only performed if the update can be cancelled" behavior.

func (*InMemoryBackend) Close

func (b *InMemoryBackend) Close()

Close stops all scheduled state-transition timers so none outlives the backend. It is safe to call multiple times.

func (*InMemoryBackend) CreateAccessEntry

func (b *InMemoryBackend) CreateAccessEntry(
	clusterName, principalARN, entryType, username string,
	kubernetesGroups []string,
	kv map[string]string,
) (*AccessEntry, error)

CreateAccessEntry creates an access entry that grants a principal access to a cluster.

func (*InMemoryBackend) CreateAddon

func (b *InMemoryBackend) CreateAddon(
	clusterName, addonName, addonVersion, serviceAccountRoleARN, configuration, resolveConflicts, namespace string,
	kv map[string]string,
	podIdentityAssociations []PodIdentityAssociationSpec,
) (*Addon, error)

CreateAddon creates a new managed add-on in a cluster.

Unlike UpdateAddon, CreateAddonInput.PodIdentityAssociations has no tri-state semantics: it is a plain create-time list (verified against the SDK doc comment, which says nothing about empty-versus-absent).

func (*InMemoryBackend) CreateCapability

func (b *InMemoryBackend) CreateCapability(
	clusterName, capabilityName, capType, roleARN, deletePropagationPolicy string,
	config *CapabilityConfiguration,
	kv map[string]string,
) (*Capability, error)

CreateCapability creates a new EKS capability scoped to a cluster. CapabilityName is unique per cluster, not globally. config may be nil.

func (*InMemoryBackend) CreateCertificateAuthority

func (b *InMemoryBackend) CreateCertificateAuthority(
	clusterName string,
) (*CertificateAuthority, *Update, error)

CreateCertificateAuthority appends a successor certificate authority to a cluster's trust bundle, beginning a CA rotation.

func (*InMemoryBackend) CreateCluster

func (b *InMemoryBackend) CreateCluster(
	name, version, roleARN string,
	vpcConfig *VpcConfig,
	networkConfig *KubernetesNetworkConfig,
	kv map[string]string,
	opts ...ClusterOptionalConfig,
) (*Cluster, error)

CreateCluster creates a new EKS cluster.

func (*InMemoryBackend) CreateEksAnywhereSubscription

func (b *InMemoryBackend) CreateEksAnywhereSubscription(
	name string,
	term SubscriptionTerm,
	autoRenew bool,
	licenseQuantity int32,
	licenseType string,
	kv map[string]string,
) (*AnywhereSubscription, error)

CreateEksAnywhereSubscription creates a new EKS Anywhere subscription. term is required by the real API (CreateEksAnywhereSubscriptionInput.Term) -- callers must validate it before calling this method.

func (*InMemoryBackend) CreateFargateProfile

func (b *InMemoryBackend) CreateFargateProfile(
	clusterName, profileName, podExecutionRoleARN string,
	selectors []FargateProfileSelector,
	subnets []string,
	kv map[string]string,
) (*FargateProfile, error)

CreateFargateProfile creates a new Fargate profile in a cluster.

func (*InMemoryBackend) CreateNodegroup

func (b *InMemoryBackend) CreateNodegroup(
	clusterName, nodegroupName, nodeRole, amiType, capacityType, version, releaseVersion string,
	instanceTypes []string,
	desiredSize, minSize, maxSize int32,
	input NodegroupInput,
	kv map[string]string,
) (*Nodegroup, error)

CreateNodegroup creates a new node group in a cluster.

func (*InMemoryBackend) CreatePodIdentityAssociation

func (b *InMemoryBackend) CreatePodIdentityAssociation(
	clusterName, namespace, serviceAccount, roleARN string,
	kv map[string]string,
	opt PodIdentityAssociationInput,
) (*PodIdentityAssociation, error)

CreatePodIdentityAssociation creates a new pod identity association in a cluster.

func (*InMemoryBackend) DeleteAccessEntry

func (b *InMemoryBackend) DeleteAccessEntry(clusterName, principalARN string) error

DeleteAccessEntry removes an access entry from a cluster.

func (*InMemoryBackend) DeleteAddon

func (b *InMemoryBackend) DeleteAddon(clusterName, addonName string, preserve bool) (*Addon, error)

DeleteAddon removes an add-on from a cluster. Unless preserve is set, its owned pod identity associations (OwnerARN == addon.ARN) are deleted along with it -- confirmed via DeleteAddonInput.Preserve's doc comment ("If an IAM account is associated with the add-on, it isn't removed"), which only makes sense if the default (preserve=false) path does remove it.

func (*InMemoryBackend) DeleteCapability

func (b *InMemoryBackend) DeleteCapability(clusterName, capabilityName string) (*Capability, error)

DeleteCapability removes a capability by cluster and capability name.

func (*InMemoryBackend) DeleteCertificateAuthority

func (b *InMemoryBackend) DeleteCertificateAuthority(
	clusterName, id string,
) (*CertificateAuthority, *Update, error)

DeleteCertificateAuthority removes a certificate authority from a cluster's trust bundle. It cannot be the CA currently signing certificates.

func (*InMemoryBackend) DeleteCluster

func (b *InMemoryBackend) DeleteCluster(name string) (*Cluster, error)

DeleteCluster deletes a cluster by name. Matches real AWS: nodegroups and Fargate profiles must be deleted first, or this returns ResourceInUseException.

func (*InMemoryBackend) DeleteEksAnywhereSubscription

func (b *InMemoryBackend) DeleteEksAnywhereSubscription(id string) (*AnywhereSubscription, error)

DeleteEksAnywhereSubscription removes a subscription by ID.

func (*InMemoryBackend) DeleteFargateProfile

func (b *InMemoryBackend) DeleteFargateProfile(clusterName, profileName string) (*FargateProfile, error)

DeleteFargateProfile removes a Fargate profile from a cluster.

func (*InMemoryBackend) DeleteNodegroup

func (b *InMemoryBackend) DeleteNodegroup(clusterName, nodegroupName string) (*Nodegroup, error)

DeleteNodegroup deletes a node group from a cluster.

func (*InMemoryBackend) DeletePodIdentityAssociation

func (b *InMemoryBackend) DeletePodIdentityAssociation(
	clusterName, associationID string,
) (*PodIdentityAssociation, error)

DeletePodIdentityAssociation removes a pod identity association from a cluster.

func (*InMemoryBackend) DeregisterCluster

func (b *InMemoryBackend) DeregisterCluster(name string) (*Cluster, error)

DeregisterCluster removes a registered external cluster.

func (*InMemoryBackend) DescribeAccessEntry

func (b *InMemoryBackend) DescribeAccessEntry(clusterName, principalARN string) (*AccessEntry, error)

DescribeAccessEntry returns an access entry by principal ARN.

func (*InMemoryBackend) DescribeAddon

func (b *InMemoryBackend) DescribeAddon(clusterName, addonName string) (*Addon, error)

DescribeAddon returns an add-on by cluster and add-on name.

func (*InMemoryBackend) DescribeAddonConfiguration

func (b *InMemoryBackend) DescribeAddonConfiguration(addonName, addonVersion string) map[string]any

DescribeAddonConfiguration returns static addon configuration schema.

configurationSchema is the JSON schema encoded AS A STRING -- confirmed against aws-sdk-go-v2/service/eks@v1.90.4's deserializers.go (awsRestjson1_deserializeOpDocumentDescribeAddonConfigurationOutput, case "configurationSchema": value.(string)) -- not a nested JSON object. A real client decoding this response would fail with "expected String to be of type string, got map[string]interface {} instead".

func (*InMemoryBackend) DescribeAddonVersions

func (b *InMemoryBackend) DescribeAddonVersions() []map[string]any

DescribeAddonVersions returns static addon version metadata.

func (*InMemoryBackend) DescribeCapability

func (b *InMemoryBackend) DescribeCapability(clusterName, capabilityName string) (*Capability, error)

DescribeCapability returns a capability by cluster and capability name.

func (*InMemoryBackend) DescribeCertificateAuthority

func (b *InMemoryBackend) DescribeCertificateAuthority(clusterName, id string) (*CertificateAuthority, error)

DescribeCertificateAuthority returns detailed information about a single certificate authority.

func (*InMemoryBackend) DescribeCluster

func (b *InMemoryBackend) DescribeCluster(name string) (*Cluster, error)

DescribeCluster returns a cluster by name.

func (*InMemoryBackend) DescribeClusterVersions

func (b *InMemoryBackend) DescribeClusterVersions() []map[string]any

DescribeClusterVersions returns supported cluster versions.

func (*InMemoryBackend) DescribeEksAnywhereSubscription

func (b *InMemoryBackend) DescribeEksAnywhereSubscription(id string) (*AnywhereSubscription, error)

DescribeEksAnywhereSubscription returns a subscription by ID.

func (*InMemoryBackend) DescribeFargateProfile

func (b *InMemoryBackend) DescribeFargateProfile(clusterName, profileName string) (*FargateProfile, error)

DescribeFargateProfile returns a Fargate profile by name.

func (*InMemoryBackend) DescribeIdentityProviderConfig

func (b *InMemoryBackend) DescribeIdentityProviderConfig(clusterName, name string) (*IdentityProviderConfig, error)

DescribeIdentityProviderConfig returns an identity provider config by name.

func (*InMemoryBackend) DescribeInsight

func (b *InMemoryBackend) DescribeInsight(clusterName, insightID string) (*Insight, error)

DescribeInsight returns one derived insight for a cluster by ID.

func (*InMemoryBackend) DescribeInsightsRefresh

func (b *InMemoryBackend) DescribeInsightsRefresh(clusterName string) (*InsightsRefresh, error)

DescribeInsightsRefresh returns the status of the (cluster-level singleton) insights refresh operation for a cluster.

func (*InMemoryBackend) DescribeNodegroup

func (b *InMemoryBackend) DescribeNodegroup(clusterName, nodegroupName string) (*Nodegroup, error)

DescribeNodegroup returns a node group by cluster and nodegroup name.

func (*InMemoryBackend) DescribePodIdentityAssociation

func (b *InMemoryBackend) DescribePodIdentityAssociation(
	clusterName, associationID string,
) (*PodIdentityAssociation, error)

DescribePodIdentityAssociation returns a pod identity association by ID.

func (*InMemoryBackend) DescribeUpdate

func (b *InMemoryBackend) DescribeUpdate(clusterName, updateID string) (*Update, error)

DescribeUpdate returns an update record by cluster and update ID.

func (*InMemoryBackend) DisassociateAccessPolicy

func (b *InMemoryBackend) DisassociateAccessPolicy(clusterName, principalARN, policyARN string) error

DisassociateAccessPolicy removes an access policy from an access entry.

func (*InMemoryBackend) DisassociateIdentityProviderConfig

func (b *InMemoryBackend) DisassociateIdentityProviderConfig(clusterName, name string) error

DisassociateIdentityProviderConfig removes an identity provider config from a cluster.

func (*InMemoryBackend) ListAccessEntries

func (b *InMemoryBackend) ListAccessEntries(clusterName string) ([]string, error)

ListAccessEntries returns all principal ARNs for access entries in a cluster.

func (*InMemoryBackend) ListAccessPolicies

func (b *InMemoryBackend) ListAccessPolicies() []map[string]string

ListAccessPolicies returns a static list of AWS-managed EKS access policies. Wire keys are "arn"/"name" -- verified against aws-sdk-go-v2/service/eks/deserializers.go's awsRestjson1_deserializeDocumentAccessPolicy, which is distinct from the "policyArn" key used by AssociatedAccessPolicy elsewhere in this API.

func (*InMemoryBackend) ListAddons

func (b *InMemoryBackend) ListAddons(clusterName string) ([]string, error)

ListAddons returns all add-on names in a cluster sorted alphabetically.

func (*InMemoryBackend) ListAllAccessEntries

func (b *InMemoryBackend) ListAllAccessEntries() []*AccessEntry

ListAllAccessEntries returns all access entries across all clusters.

func (*InMemoryBackend) ListAllAddons

func (b *InMemoryBackend) ListAllAddons() []*Addon

ListAllAddons returns all addons across all clusters.

func (*InMemoryBackend) ListAllCapabilities

func (b *InMemoryBackend) ListAllCapabilities() []*Capability

ListAllCapabilities returns all capabilities.

func (*InMemoryBackend) ListAllClusters

func (b *InMemoryBackend) ListAllClusters() []*Cluster

ListAllClusters returns all clusters across the backend.

func (*InMemoryBackend) ListAllFargateProfiles

func (b *InMemoryBackend) ListAllFargateProfiles() []*FargateProfile

ListAllFargateProfiles returns all Fargate profiles across all clusters.

func (*InMemoryBackend) ListAllPodIdentityAssociations

func (b *InMemoryBackend) ListAllPodIdentityAssociations() []*PodIdentityAssociation

ListAllPodIdentityAssociations returns all pod identity associations across all clusters.

func (*InMemoryBackend) ListAllSubscriptions

func (b *InMemoryBackend) ListAllSubscriptions() []*AnywhereSubscription

ListAllSubscriptions returns all EKS Anywhere subscriptions.

func (*InMemoryBackend) ListAssociatedAccessPolicies

func (b *InMemoryBackend) ListAssociatedAccessPolicies(
	clusterName, principalARN string,
) ([]*AccessPolicyAssociation, error)

ListAssociatedAccessPolicies returns all access policies associated with an entry.

func (*InMemoryBackend) ListCapabilities

func (b *InMemoryBackend) ListCapabilities(clusterName string) []*Capability

ListCapabilities returns all capabilities in a cluster (deep-copied, sorted by name). The real API's ListCapabilities returns CapabilitySummary objects (name/arn/status/type/version/timestamps), not bare names -- callers needing the summary shape should project the returned Capability values themselves (see capabilitySummaryToJSON in handler_capabilities.go).

func (*InMemoryBackend) ListCertificateAuthorities

func (b *InMemoryBackend) ListCertificateAuthorities(clusterName string) ([]*CertificateAuthority, error)

ListCertificateAuthorities returns every certificate authority in a cluster, sorted by ID for deterministic responses.

func (*InMemoryBackend) ListClusters

func (b *InMemoryBackend) ListClusters(includeExternal bool) []string

ListClusters returns cluster names sorted alphabetically. Connected (external, registered via RegisterCluster) clusters are included only when includeExternal is true -- matches ListClustersInput.Include: blank returns only Amazon EKS clusters, "all" also returns connected clusters (api_op_ListClusters.go).

func (*InMemoryBackend) ListEksAnywhereSubscriptions

func (b *InMemoryBackend) ListEksAnywhereSubscriptions() []*AnywhereSubscription

ListEksAnywhereSubscriptions returns all subscription IDs sorted.

func (*InMemoryBackend) ListFargateProfiles

func (b *InMemoryBackend) ListFargateProfiles(clusterName string) ([]string, error)

ListFargateProfiles returns all Fargate profile names in a cluster sorted alphabetically.

func (*InMemoryBackend) ListIdentityProviderConfigs

func (b *InMemoryBackend) ListIdentityProviderConfigs(clusterName string) ([]map[string]string, error)

ListIdentityProviderConfigs returns all identity provider config summaries for a cluster.

func (*InMemoryBackend) ListInsights

func (b *InMemoryBackend) ListInsights(clusterName string) ([]*Insight, error)

ListInsights returns every insight honestly derivable for a cluster.

func (*InMemoryBackend) ListNodegroups

func (b *InMemoryBackend) ListNodegroups(clusterName string) ([]string, error)

ListNodegroups returns all node group names in a cluster sorted alphabetically.

func (*InMemoryBackend) ListPodIdentityAssociations

func (b *InMemoryBackend) ListPodIdentityAssociations(clusterName string) ([]*PodIdentityAssociation, error)

ListPodIdentityAssociations returns all pod identity association summaries for a cluster.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceARN string) (map[string]string, error)

ListTagsForResource returns tags for a resource by ARN.

func (*InMemoryBackend) ListUpdates

func (b *InMemoryBackend) ListUpdates(clusterName string) ([]string, error)

ListUpdates returns all update IDs for a cluster sorted alphabetically.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) RegisterCluster

func (b *InMemoryBackend) RegisterCluster(
	name, provider, roleARN string,
	kv map[string]string,
) (*Cluster, error)

RegisterCluster registers an external cluster.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state, returning the backend to a fresh empty state.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON.

func (*InMemoryBackend) StartInsightsRefresh

func (b *InMemoryBackend) StartInsightsRefresh(clusterName string) (*InsightsRefresh, error)

StartInsightsRefresh starts the (cluster-level singleton) insights refresh operation for a cluster.

func (*InMemoryBackend) StoreUpdate

func (b *InMemoryBackend) StoreUpdate(u *Update)

StoreUpdate stores an update record created outside the backend (e.g. by a handler).

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceARN string, kv map[string]string) error

TagResource adds tags to a resource by ARN.

func (*InMemoryBackend) TaggedResources added in v1.2.0

func (b *InMemoryBackend) TaggedResources() []TaggedEntry

TaggedResources returns every EKS resource ARN that currently has at least one tag, across every taggable EKS resource kind (clusters, nodegroups, access entries, addons, fargate profiles, pod identity associations, capabilities, Anywhere subscriptions, and identity provider configs).

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

UntagResource removes specific tag keys from a resource by ARN.

func (*InMemoryBackend) UpdateAccessEntry

func (b *InMemoryBackend) UpdateAccessEntry(
	clusterName, principalARN string,
	upd AccessEntryUpdate,
) (*AccessEntry, error)

UpdateAccessEntry updates an access entry's username and kubernetes groups.

func (*InMemoryBackend) UpdateAddon

func (b *InMemoryBackend) UpdateAddon(
	clusterName, addonName, addonVersion, serviceAccountRoleARN, configuration, resolveConflicts string,
	podIdentityAssociations *[]PodIdentityAssociationSpec,
) (*Addon, error)

UpdateAddon updates an existing add-on.

podIdentityAssociations implements UpdateAddonInput's tri-state field: nil means "left blank, no change"; a non-nil pointer to an empty slice deletes every association owned by the add-on; a non-nil pointer to a populated slice replaces them.

func (*InMemoryBackend) UpdateCapability

func (b *InMemoryBackend) UpdateCapability(
	clusterName, capabilityName, roleARN, deletePropagationPolicy string,
	configUpdate *updateCapabilityConfigurationBody,
) (*Capability, error)

UpdateCapability updates an existing capability's role ARN, delete propagation policy, and/or Configuration (merged per applyUpdateCapabilityConfiguration -- configUpdate may be nil).

func (*InMemoryBackend) UpdateClusterConfig

func (b *InMemoryBackend) UpdateClusterConfig(clusterName string, upd ClusterConfigUpdate) (*Update, error)

UpdateClusterConfig updates the cluster configuration including logging, subnets, and access settings.

func (*InMemoryBackend) UpdateClusterVersion

func (b *InMemoryBackend) UpdateClusterVersion(clusterName, version string) (*Update, error)

UpdateClusterVersion updates the cluster Kubernetes version.

func (*InMemoryBackend) UpdateClusterVpcEndpoint

func (b *InMemoryBackend) UpdateClusterVpcEndpoint(clusterName string, upd VpcEndpointUpdate) (*Update, error)

UpdateClusterVpcEndpoint updates the VPC endpoint access settings on a cluster. Fields with nil pointer values are left unchanged.

func (*InMemoryBackend) UpdateEksAnywhereSubscription

func (b *InMemoryBackend) UpdateEksAnywhereSubscription(
	id string, autoRenew bool,
) (*AnywhereSubscription, error)

UpdateEksAnywhereSubscription updates a subscription's auto-renew setting. autoRenew is the only member of the real UpdateEksAnywhereSubscriptionInput (eks@v1.90.4 api_op_UpdateEksAnywhereSubscription.go) -- LicenseQuantity/ LicenseType exist only on CreateEksAnywhereSubscriptionInput and are not settable through this op at all.

func (*InMemoryBackend) UpdateNodegroupConfig

func (b *InMemoryBackend) UpdateNodegroupConfig(
	clusterName, nodegroupName string,
	upd NodegroupConfigUpdate,
) (*Nodegroup, error)

UpdateNodegroupConfig updates the configuration of a node group including scaling, labels, taints, and update strategy.

func (*InMemoryBackend) UpdateNodegroupVersion

func (b *InMemoryBackend) UpdateNodegroupVersion(
	clusterName, nodegroupName, version string,
) (*Update, error)

UpdateNodegroupVersion updates the node group Kubernetes version.

func (*InMemoryBackend) UpdatePodIdentityAssociation

func (b *InMemoryBackend) UpdatePodIdentityAssociation(
	clusterName, associationID string,
	upd PodIdentityAssociationUpdate,
) (*PodIdentityAssociation, error)

UpdatePodIdentityAssociation updates a pod identity association.

func (*InMemoryBackend) WithResourceLimits

func (b *InMemoryBackend) WithResourceLimits(l ResourceLimits) *InMemoryBackend

WithResourceLimits overrides the resource caps enforced by ResourceLimitExceededException (see limits.go) and returns the backend for chaining. A zero field in l keeps its real-EKS default. The override survives Reset(), matching services/glue's WithResourceLimits precedent.

type Insight

type Insight struct {
	LastRefreshTime time.Time         `json:"lastRefreshTime"`
	LastTransition  time.Time         `json:"lastTransitionTime"`
	AdditionalInfo  map[string]string `json:"additionalInfo,omitempty"`
	ID              string            `json:"id"`
	ClusterName     string            `json:"clusterName"`
	Category        string            `json:"category"`
	Status          string            `json:"status"`
	// StatusReason mirrors types.InsightStatus.Reason ("Explanation on the
	// reasoning for the status of the resource") -- distinct from
	// Recommendation (types.Insight.Recommendation, "how to remediate").
	// Previously conflated: insightToJSON used Recommendation for both.
	StatusReason string `json:"statusReason,omitempty"`
	// KubernetesVersion mirrors types.Insight/InsightSummary.KubernetesVersion
	// ("The Kubernetes minor version associated with an insight if
	// applicable") -- honestly derivable now that insights are computed
	// from the cluster's real Version field, unlike the prior fabricated
	// model.
	KubernetesVersion string `json:"kubernetesVersion,omitempty"`
	// Name mirrors types.Insight/InsightSummary.Name -- a human-readable
	// label for the check this insight represents (e.g. "Kubernetes
	// version end of standard support"), analogous to how real EKS names
	// its own generated insight checks.
	Name           string `json:"name,omitempty"`
	Description    string `json:"description,omitempty"`
	Recommendation string `json:"recommendation,omitempty"`
}

Insight represents an EKS cluster insight. Insight represents an EKS cluster insight, derived honestly from state this backend actually has (see insights.go's deriveUpgradeReadinessInsights) -- gopherstack-wf8f item 2. ClusterName is backend-internal routing only: neither types.Insight nor types.InsightSummary carries it on the wire (the cluster is already identified by the URL path) -- see insightToJSON/ insightToSummaryJSON, which both omit it.

type InsightsRefresh

type InsightsRefresh struct {
	StartedAt   time.Time `json:"startedAt"`
	EndedAt     time.Time `json:"endedAt,omitzero"`
	ClusterName string    `json:"clusterName"`
	Status      string    `json:"status"`
	Message     string    `json:"message,omitempty"`
}

InsightsRefresh represents the cluster-level (singleton -- there is no per-refresh id in the real API) EKS insights refresh operation state.

type KubernetesNetworkConfig

type KubernetesNetworkConfig struct {
	ElasticLoadBalancing *ElasticLoadBalancingConfig `json:"elasticLoadBalancing,omitempty"`
	IPFamily             string                      `json:"ipFamily,omitempty"`
	ServiceIPv4CIDR      string                      `json:"serviceIpv4Cidr,omitempty"`
	ServiceIPv6CIDR      string                      `json:"serviceIpv6Cidr,omitempty"`
}

KubernetesNetworkConfig captures cluster networking parameters. The real SDK's KubernetesNetworkConfigRequest/KubernetesNetworkConfigResponse (eks@v1.90.4 types/types.go:1597,1645) both declare ElasticLoadBalancing as a sibling of IpFamily/ServiceIpv4Cidr/ServiceIpv6Cidr under ONE "kubernetesNetworkConfig" wire key -- there is no separate top-level "networkingConfig" object in real AWS. gopherstack-tp8x: a prior version of this type split ElasticLoadBalancing into a second, separately-named top-level Cluster.NetworkingConfig field/JSON key that a real client never reads or sends.

type LaunchTemplate

type LaunchTemplate struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

LaunchTemplate captures the launch-template reference for a node group.

type Nodegroup

type Nodegroup struct {
	CreatedAt      time.Time              `json:"createdAt"`
	Tags           *tags.Tags             `json:"tags,omitempty"`
	Labels         map[string]string      `json:"labels,omitempty"`
	RemoteAccess   *RemoteAccess          `json:"remoteAccess,omitempty"`
	LaunchTemplate *LaunchTemplate        `json:"launchTemplate,omitempty"`
	Resources      *NodegroupResources    `json:"resources,omitempty"`
	UpdateConfig   *NodegroupUpdateConfig `json:"updateConfig,omitempty"`
	CapacityType   string                 `json:"capacityType,omitempty"`
	Region         string                 `json:"region"`
	ARN            string                 `json:"nodegroupArn"`
	NodeRole       string                 `json:"nodeRole,omitempty"`
	Status         string                 `json:"status"`
	AMIType        string                 `json:"amiType,omitempty"`
	NodegroupName  string                 `json:"nodegroupName"`
	ClusterName    string                 `json:"clusterName"`
	Version        string                 `json:"version,omitempty"`
	ReleaseVersion string                 `json:"releaseVersion,omitempty"`
	AccountID      string                 `json:"accountId"`
	Taints         []NodegroupTaint       `json:"taints,omitempty"`
	InstanceTypes  []string               `json:"instanceTypes,omitempty"`
	Subnets        []string               `json:"subnets,omitempty"`
	DesiredSize    int32                  `json:"desiredSize"`
	MinSize        int32                  `json:"minSize"`
	MaxSize        int32                  `json:"maxSize"`
	DiskSize       int32                  `json:"diskSize,omitempty"`
}

Nodegroup represents an EKS managed node group.

The Tags field is backend-owned. Callers must treat the returned pointer as read-only; mutate tags only via TagResource / CreateNodegroup.

type NodegroupConfigUpdate

type NodegroupConfigUpdate struct {
	AddOrUpdateLabels map[string]string
	UpdateConfig      *NodegroupUpdateConfig
	DesiredSize       *int32
	MinSize           *int32
	MaxSize           *int32
	RemoveLabels      []string
	AddOrUpdateTaints []NodegroupTaint
	RemoveTaints      []NodegroupTaint
}

NodegroupConfigUpdate holds the mutable fields for UpdateNodegroupConfig.

type NodegroupInput

type NodegroupInput struct {
	Labels         map[string]string
	RemoteAccess   *RemoteAccess
	LaunchTemplate *LaunchTemplate
	UpdateConfig   *NodegroupUpdateConfig
	Subnets        []string
	Taints         []NodegroupTaint
	DiskSize       int32
}

NodegroupInput holds optional fields for CreateNodegroup beyond positional params.

type NodegroupResources

type NodegroupResources struct {
	AutoScalingGroups []AutoScalingGroup `json:"autoScalingGroups,omitempty"`
}

NodegroupResources captures AWS resources backing the node group.

type NodegroupTaint

type NodegroupTaint struct {
	Key    string `json:"key"`
	Value  string `json:"value,omitempty"`
	Effect string `json:"effect"`
}

NodegroupTaint represents a Kubernetes taint applied to managed nodes.

type NodegroupUpdateConfig

type NodegroupUpdateConfig struct {
	MaxUnavailable           *int32 `json:"maxUnavailable,omitempty"`
	MaxUnavailablePercentage *int32 `json:"maxUnavailablePercentage,omitempty"`
}

NodegroupUpdateConfig holds the nodegroup update strategy settings.

type PodIdentityAssociation

type PodIdentityAssociation struct {
	CreatedAt          time.Time  `json:"createdAt"`
	ModifiedAt         time.Time  `json:"modifiedAt"`
	Tags               *tags.Tags `json:"tags,omitempty"`
	ClusterName        string     `json:"clusterName"`
	AssociationID      string     `json:"associationId"`
	ARN                string     `json:"associationArn"`
	Namespace          string     `json:"namespace"`
	ServiceAccount     string     `json:"serviceAccount"`
	RoleARN            string     `json:"roleArn,omitempty"`
	OwnerARN           string     `json:"ownerArn,omitempty"`
	ExternalID         string     `json:"externalId,omitempty"`
	Policy             string     `json:"policy,omitempty"`
	DisableSessionTags bool       `json:"disableSessionTags"`
}

PodIdentityAssociation represents an EKS pod identity association.

type PodIdentityAssociationInput added in v1.2.0

type PodIdentityAssociationInput struct {
	Policy             string
	DisableSessionTags bool
}

PodIdentityAssociationInput groups the optional fields for CreatePodIdentityAssociation beyond the always-required namespace, serviceAccount, and roleARN.

type PodIdentityAssociationSpec

type PodIdentityAssociationSpec struct {
	RoleARN        string
	ServiceAccount string
}

PodIdentityAssociationSpec is one entry of CreateAddonInput's or UpdateAddonInput's PodIdentityAssociations, matching types.AddonPodIdentityAssociations (RoleArn + ServiceAccount only -- no namespace).

type PodIdentityAssociationUpdate added in v1.2.0

type PodIdentityAssociationUpdate struct {
	Policy             *string
	DisableSessionTags *bool
	RoleARN            string
}

PodIdentityAssociationUpdate holds the mutable fields for UpdatePodIdentityAssociation. Nil/empty fields leave the existing value unchanged, matching the real API's optional-field update semantics.

type Provider

type Provider struct{}

Provider implements service.Provider for AWS EKS.

func (*Provider) Init

Init initializes the EKS service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type RemoteAccess

type RemoteAccess struct {
	EC2SSHKey            string   `json:"ec2SshKey,omitempty"`
	SourceSecurityGroups []string `json:"sourceSecurityGroups,omitempty"`
}

RemoteAccess captures SSH remote-access configuration for a node group.

type ResourceLimits

type ResourceLimits struct {
	ClustersPerAccount           int
	RegisteredClustersPerAccount int
	SecurityGroupsPerCluster     int
	PublicAccessCIDRsPerCluster  int
	NodegroupsPerCluster         int
	FargateProfilesPerCluster    int
	SelectorsPerFargateProfile   int
	LabelsPerFargateSelector     int
	AccessEntriesPerCluster      int
	AnywhereSubscriptionsPerAcct int
	PodIdentityAssocsPerCluster  int
}

ResourceLimits overrides the resource caps a *InMemoryBackend enforces with ResourceLimitExceededException. A zero field keeps its real-EKS default -- used by tests that need to trip a large cap without actually creating that many resources.

type SsoIdentity

type SsoIdentity struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

SsoIdentity mirrors aws-sdk-go-v2/service/eks/types.SsoIdentity (types.go:3200) -- both Id and Type are required members.

type StorageConfig

type StorageConfig struct {
	BlockStorage *BlockStorageConfig `json:"blockStorage,omitempty"`
}

StorageConfig holds the EKS Auto Mode storage configuration.

type SubscriptionTerm added in v1.2.0

type SubscriptionTerm struct {
	Unit     string `json:"unit,omitempty"`
	Duration int32  `json:"duration,omitempty"`
}

SubscriptionTerm holds the term duration/unit for an EKS Anywhere subscription (required on create -- verified against aws-sdk-go-v2/service/eks's CreateEksAnywhereSubscriptionInput.Term).

type TaggedEntry added in v1.2.0

type TaggedEntry struct {
	Tags map[string]string
	ARN  string
}

TaggedEntry pairs a resource ARN with its tag map, for cross-service tag enumeration by the Resource Groups Tagging API (see cli.go's wireTaggingEKS).

type Update

type Update struct {
	CreatedAt     time.Time     `json:"createdAt"`
	Cancellation  *Cancellation `json:"cancellation,omitempty"`
	ID            string        `json:"id"`
	ClusterName   string        `json:"clusterName"`
	NodegroupName string        `json:"nodegroupName,omitempty"`
	Status        string        `json:"status"`
	Type          string        `json:"type"`
	Params        []UpdateParam `json:"params,omitempty"`
	Errors        []UpdateError `json:"errors,omitempty"`
}

Update represents an EKS update record. NodegroupName is backend-internal (not part of the real Update wire shape) -- it exists only so ListUpdates can honor ListUpdatesInput.NodegroupName. It carries a real json tag (gopherstack-34g03): verified against the pinned SDK (aws-sdk-go-v2/service/eks@v1.98.0 types/types.go:3257-3282) that real types.Update has no such member, and updateToJSON (handler_updates.go) -- the actual wire converter for DescribeUpdate/ListUpdates -- builds the response map by hand and never includes it, so a real tag changes nothing about the wire. b.updates is registered directly on b.registry (store_setup.go) and Snapshot/Restore marshal Update as-is, so json:"-" here only dropped the field from persistence, leaving it empty on every restored Update and emptying the nodegroupName filter (handler_updates.go:286) for any pre-restart update.

type UpdateError

type UpdateError struct {
	ErrorCode    string   `json:"errorCode"`
	ErrorMessage string   `json:"errorMessage"`
	ResourceIDs  []string `json:"resourceIds,omitempty"`
}

UpdateError represents an error encountered during an EKS update.

type UpdateParam

type UpdateParam struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

UpdateParam represents a single parameter changed by an EKS update operation.

type VpcConfig

type VpcConfig struct {
	ClusterSecurityGroupID string   `json:"clusterSecurityGroupId,omitempty"`
	VpcID                  string   `json:"vpcId,omitempty"`
	SubnetIDs              []string `json:"subnetIds,omitempty"`
	SecurityGroupIDs       []string `json:"securityGroupIds,omitempty"`
	PublicAccessCIDRs      []string `json:"publicAccessCidrs,omitempty"`
	EndpointPrivateAccess  bool     `json:"endpointPrivateAccess"`
	EndpointPublicAccess   bool     `json:"endpointPublicAccess"`
}

VpcConfig captures the cluster VPC configuration returned by AWS.

type VpcEndpointUpdate

type VpcEndpointUpdate struct {
	EndpointPublicAccess  *bool
	EndpointPrivateAccess *bool
	PublicAccessCIDRs     []string
}

VpcEndpointUpdate carries optional VPC endpoint access changes for UpdateClusterVpcEndpoint.

Jump to

Keyboard shortcuts

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