Documentation
¶
Index ¶
- Constants
- Variables
- func ClusterEngineEnabled(engine string) bool
- func IsOIDCIssuer(issuer string) bool
- func K3sImage(version string) (string, bool)
- func ParseK3sImageTags(v string) (map[string]string, error)
- func ParseLBPorts(v string) ([]int, error)
- func ParseVolumeMountAllow(v string) ([]string, error)
- func ParseVolumeMounts(v string) ([]string, error)
- type AccessConfig
- type AccessEntry
- type AccessEntryUpdate
- type AccessPolicyAssociation
- type Addon
- type AddonHealth
- type AnywhereSubscription
- type ArgoCdAwsIdcConfig
- type ArgoCdConfig
- type ArgoCdNetworkAccessConfig
- type ArgoCdRoleMapping
- type AutoScalingGroup
- type BlockStorageConfig
- type Cancellation
- type Capability
- type CapabilityConfiguration
- type CapabilityHealth
- type CapabilityIssue
- type CertificateAuthority
- type CertificateAuthorityScheduledEvents
- type Cluster
- type ClusterConfigUpdate
- type ClusterEngineConfig
- type ClusterLogEntry
- type ClusterOptionalConfig
- type ClusterRuntime
- type ComputeConfig
- type ConnectorConfig
- type CredentialIdentity
- type CredentialResolver
- type ElasticLoadBalancingConfig
- type EncryptionConfig
- type EngineConfig
- type FargateProfile
- type FargateProfileHealth
- type FargateProfileIssue
- type FargateProfileSelector
- type Handler
- func (h *Handler) BackendFor(region string) *InMemoryBackend
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) EnableRegions()
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) OIDCIssuerKeys(issuer string) ([]*rsa.PublicKey, bool)
- func (h *Handler) RegionBackends() []*InMemoryBackend
- func (h *Handler) RegionHandler(region string) *Handler
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) ServePublishedPorts(c *echo.Context) error
- func (h *Handler) SetCredentialResolver(r CredentialResolver)
- func (h *Handler) SetPodIdentityRoleAssumer(a PodIdentityRoleAssumer)
- func (h *Handler) Shutdown(_ context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type IdcApplicationManager
- type IdentityProviderConfig
- type InMemoryBackend
- func (b *InMemoryBackend) ActivateCertificateAuthority(clusterName, id string) (*CertificateAuthority, *Update, error)
- func (b *InMemoryBackend) AddAccessEntryInternal(e *AccessEntry)
- func (b *InMemoryBackend) AddAddonInternal(a *Addon)
- func (b *InMemoryBackend) AddCapabilityInternal(capa *Capability)
- func (b *InMemoryBackend) AddClusterInternal(c *Cluster)
- func (b *InMemoryBackend) AddFargateProfileInternal(p *FargateProfile)
- func (b *InMemoryBackend) AddNodegroupInternal(ng *Nodegroup)
- func (b *InMemoryBackend) AddPodIdentityAssociationInternal(a *PodIdentityAssociation)
- func (b *InMemoryBackend) AddSubscriptionInternal(sub *AnywhereSubscription)
- func (b *InMemoryBackend) AssociateAccessPolicy(clusterName, principalARN, policyARN string, accessScope map[string]any) (*AccessPolicyAssociation, error)
- func (b *InMemoryBackend) AssociateEncryptionConfig(clusterName string, configs []EncryptionConfig) ([]EncryptionConfig, *Update, error)
- func (b *InMemoryBackend) AssociateIdentityProviderConfig(clusterName, configType, name string, ...) (*IdentityProviderConfig, *Update, error)
- func (b *InMemoryBackend) AssumeRoleForPodIdentity(clusterName, token string) (*PodIdentityResult, error)
- func (b *InMemoryBackend) CancelUpdate(clusterName, updateID string) (*Update, error)
- func (b *InMemoryBackend) Close()
- func (b *InMemoryBackend) ClusterTotal() int
- func (b *InMemoryBackend) CreateAccessEntry(clusterName, principalARN, entryType, username string, ...) (*AccessEntry, error)
- func (b *InMemoryBackend) CreateAddon(...) (*Addon, error)
- func (b *InMemoryBackend) CreateCapability(clusterName, capabilityName, capType, roleARN, deletePropagationPolicy string, ...) (*Capability, error)
- func (b *InMemoryBackend) CreateCertificateAuthority(clusterName string) (*CertificateAuthority, *Update, error)
- func (b *InMemoryBackend) CreateCluster(name, version, roleARN string, vpcConfig *VpcConfig, ...) (*Cluster, error)
- func (b *InMemoryBackend) CreateEksAnywhereSubscription(name string, term SubscriptionTerm, autoRenew bool, licenseQuantity int32, ...) (*AnywhereSubscription, error)
- func (b *InMemoryBackend) CreateFargateProfile(clusterName, profileName, podExecutionRoleARN string, ...) (*FargateProfile, error)
- func (b *InMemoryBackend) CreateNodegroup(...) (*Nodegroup, error)
- func (b *InMemoryBackend) CreatePodIdentityAssociation(clusterName, namespace, serviceAccount, roleARN string, kv map[string]string, ...) (*PodIdentityAssociation, error)
- func (b *InMemoryBackend) DeleteAccessEntry(clusterName, principalARN string) error
- func (b *InMemoryBackend) DeleteAddon(clusterName, addonName string, preserve bool) (*Addon, error)
- func (b *InMemoryBackend) DeleteCapability(clusterName, capabilityName string) (*Capability, error)
- func (b *InMemoryBackend) DeleteCertificateAuthority(clusterName, id string) (*CertificateAuthority, *Update, error)
- func (b *InMemoryBackend) DeleteCluster(name string) (*Cluster, error)
- func (b *InMemoryBackend) DeleteEksAnywhereSubscription(id string) (*AnywhereSubscription, error)
- func (b *InMemoryBackend) DeleteFargateProfile(clusterName, profileName string) (*FargateProfile, error)
- func (b *InMemoryBackend) DeleteNodegroup(clusterName, nodegroupName string) (*Nodegroup, error)
- func (b *InMemoryBackend) DeletePodIdentityAssociation(clusterName, associationID string) (*PodIdentityAssociation, error)
- func (b *InMemoryBackend) DeregisterCluster(name string) (*Cluster, error)
- func (b *InMemoryBackend) DescribeAccessEntry(clusterName, principalARN string) (*AccessEntry, error)
- func (b *InMemoryBackend) DescribeAddon(clusterName, addonName string) (*Addon, error)
- func (b *InMemoryBackend) DescribeAddonConfiguration(addonName, addonVersion string) map[string]any
- func (b *InMemoryBackend) DescribeAddonVersions() []map[string]any
- func (b *InMemoryBackend) DescribeCapability(clusterName, capabilityName string) (*Capability, error)
- func (b *InMemoryBackend) DescribeCertificateAuthority(clusterName, id string) (*CertificateAuthority, error)
- func (b *InMemoryBackend) DescribeCluster(name string) (*Cluster, error)
- func (b *InMemoryBackend) DescribeClusterVersions(defaultOnly bool) []map[string]any
- func (b *InMemoryBackend) DescribeEksAnywhereSubscription(id string) (*AnywhereSubscription, error)
- func (b *InMemoryBackend) DescribeFargateProfile(clusterName, profileName string) (*FargateProfile, error)
- func (b *InMemoryBackend) DescribeIdentityProviderConfig(clusterName, name string) (*IdentityProviderConfig, error)
- func (b *InMemoryBackend) DescribeInsight(clusterName, insightID string) (*Insight, error)
- func (b *InMemoryBackend) DescribeInsightsRefresh(clusterName string) (*InsightsRefresh, error)
- func (b *InMemoryBackend) DescribeNodegroup(clusterName, nodegroupName string) (*Nodegroup, error)
- func (b *InMemoryBackend) DescribePodIdentityAssociation(clusterName, associationID string) (*PodIdentityAssociation, error)
- func (b *InMemoryBackend) DescribeUpdate(clusterName, updateID string) (*Update, error)
- func (b *InMemoryBackend) DisassociateAccessPolicy(clusterName, principalARN, policyARN string) error
- func (b *InMemoryBackend) DisassociateIdentityProviderConfig(clusterName, name string) (*Update, error)
- func (b *InMemoryBackend) EnableClusters(cfg ClusterEngineConfig) error
- func (b *InMemoryBackend) EnableExistingCluster(kubeconfigPath, kubeContext string) error
- func (b *InMemoryBackend) InventoryResources() []TaggedEntry
- func (b *InMemoryBackend) ListAccessEntries(clusterName string) ([]string, error)
- func (b *InMemoryBackend) ListAccessPolicies() []map[string]string
- func (b *InMemoryBackend) ListAddons(clusterName string) ([]string, error)
- func (b *InMemoryBackend) ListAllAccessEntries() []*AccessEntry
- func (b *InMemoryBackend) ListAllAddons() []*Addon
- func (b *InMemoryBackend) ListAllCapabilities() []*Capability
- func (b *InMemoryBackend) ListAllClusters() []*Cluster
- func (b *InMemoryBackend) ListAllFargateProfiles() []*FargateProfile
- func (b *InMemoryBackend) ListAllPodIdentityAssociations() []*PodIdentityAssociation
- func (b *InMemoryBackend) ListAllSubscriptions() []*AnywhereSubscription
- func (b *InMemoryBackend) ListAssociatedAccessPolicies(clusterName, principalARN string) ([]*AccessPolicyAssociation, error)
- func (b *InMemoryBackend) ListCapabilities(clusterName string) []*Capability
- func (b *InMemoryBackend) ListCertificateAuthorities(clusterName string) ([]*CertificateAuthority, error)
- func (b *InMemoryBackend) ListClusters(includeExternal bool) []string
- func (b *InMemoryBackend) ListEksAnywhereSubscriptions() []*AnywhereSubscription
- func (b *InMemoryBackend) ListFargateProfiles(clusterName string) ([]string, error)
- func (b *InMemoryBackend) ListIdentityProviderConfigs(clusterName string) ([]map[string]string, error)
- func (b *InMemoryBackend) ListInsights(clusterName string) ([]*Insight, error)
- func (b *InMemoryBackend) ListNodegroups(clusterName string) ([]string, error)
- func (b *InMemoryBackend) ListPodIdentityAssociations(clusterName string) ([]*PodIdentityAssociation, error)
- func (b *InMemoryBackend) ListTagsForResource(resourceARN string) (map[string]string, error)
- func (b *InMemoryBackend) ListUpdates(clusterName string) ([]string, error)
- func (b *InMemoryBackend) MintServiceAccountToken(clusterName string, req ServiceAccountTokenRequest) (*ServiceAccountToken, error)
- func (b *InMemoryBackend) OIDCDiscovery(id string) (*OIDCDiscoveryDocument, error)
- func (b *InMemoryBackend) OIDCIssuerKeys(issuer string) ([]*rsa.PublicKey, bool)
- func (b *InMemoryBackend) OIDCJWKS(id string) (*JWKS, error)
- func (b *InMemoryBackend) PublishedLBPorts(name string) ([]PublishedPort, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RegisterCluster(name, provider, roleARN string, kv map[string]string) (*Cluster, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetCredentialResolver(r CredentialResolver)
- func (b *InMemoryBackend) SetIdcApplicationManager(m IdcApplicationManager)
- func (b *InMemoryBackend) SetLifecycleDelay(d time.Duration)
- func (b *InMemoryBackend) SetPodIdentityRoleAssumer(a PodIdentityRoleAssumer)
- func (b *InMemoryBackend) SetQuotaLimiter(f quotalimit.Func)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartInsightsRefresh(clusterName string) (*InsightsRefresh, error)
- func (b *InMemoryBackend) StoreUpdate(u *Update)
- func (b *InMemoryBackend) TagResource(resourceARN string, kv map[string]string) error
- func (b *InMemoryBackend) TaggedResources() []TaggedEntry
- func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateAccessEntry(clusterName, principalARN string, upd AccessEntryUpdate) (*AccessEntry, error)
- func (b *InMemoryBackend) UpdateAddon(...) (*Addon, error)
- func (b *InMemoryBackend) UpdateCapability(clusterName, capabilityName, roleARN, deletePropagationPolicy string, ...) (*Capability, error)
- func (b *InMemoryBackend) UpdateClusterConfig(clusterName string, upd ClusterConfigUpdate) (*Update, error)
- func (b *InMemoryBackend) UpdateClusterVersion(clusterName, version string) (*Update, error)
- func (b *InMemoryBackend) UpdateClusterVpcEndpoint(clusterName string, upd VpcEndpointUpdate) (*Update, error)
- func (b *InMemoryBackend) UpdateEksAnywhereSubscription(id string, autoRenew bool) (*AnywhereSubscription, error)
- func (b *InMemoryBackend) UpdateNodegroupConfig(clusterName, nodegroupName string, upd NodegroupConfigUpdate) (*Nodegroup, error)
- func (b *InMemoryBackend) UpdateNodegroupVersion(clusterName, nodegroupName, version, releaseVersion string, ...) (*Update, error)
- func (b *InMemoryBackend) UpdatePodIdentityAssociation(clusterName, associationID string, upd PodIdentityAssociationUpdate) (*PodIdentityAssociation, error)
- func (b *InMemoryBackend) WithResourceLimits(l ResourceLimits) *InMemoryBackend
- type Insight
- type InsightsRefresh
- type JWK
- type JWKS
- type KubernetesNetworkConfig
- type LaunchTemplate
- type NodeRepairConfig
- type NodeRepairOverride
- type Nodegroup
- type NodegroupConfigUpdate
- type NodegroupInput
- type NodegroupResources
- type NodegroupTaint
- type NodegroupUpdateConfig
- type OIDCDiscoveryDocument
- type PodIdentityAssociation
- type PodIdentityAssociationInput
- type PodIdentityAssociationSpec
- type PodIdentityAssociationUpdate
- type PodIdentityCredentials
- type PodIdentityResult
- type PodIdentityRoleAssumer
- type PodIdentityRoleRequest
- type PodIdentityTag
- type Provider
- type PublishedPort
- type RemoteAccess
- type ResourceLimits
- type ServiceAccountToken
- type ServiceAccountTokenRequest
- type SsoIdentity
- type StorageConfig
- type SubscriptionTerm
- type TaggedEntry
- type Update
- type UpdateError
- type UpdateParam
- type VpcConfig
- type VpcEndpointUpdate
- type WarmPoolConfig
Constants ¶
const ( EngineStub = "stub" EngineDocker = "docker" )
Engine modes for EKS.
const ( // K3sImageRepo is the image repository the cluster engine runs. K3sImageRepo = k3sengine.ImageRepo // DefaultClusterToken is the static cluster-admin bearer token, like LocalStack's K3D_CLUSTER_TOKEN default. DefaultClusterToken = k3sengine.DefaultToken )
const ( // TagVolumeMount is the cluster tag that bind-mounts host paths into the k3s node container. TagVolumeMount = "gopherstack:volume-mount" // TagLBPorts is the cluster tag that publishes load-balancer ports from the k3s node container. TagLBPorts = "gopherstack:lb-ports" )
const ( // IAMTokenPrefix starts every bearer token produced by `aws eks get-token`. IAMTokenPrefix = "k8s-aws-v1." //nolint:gosec // public wire prefix, not a credential )
const (
// PodIdentityAudience is the audience of pod identity tokens and the value of the response audience field.
PodIdentityAudience = "pods.eks.amazonaws.com"
)
Variables ¶
var ( // ErrInvalidClusterEngineConfig is returned when the cluster engine host or token is unusable. ErrInvalidClusterEngineConfig = k3sengine.ErrInvalidConfig // ErrDefaultTokenExposed is returned when the public default token would be exposed off-host. ErrDefaultTokenExposed = errors.New("EKS_CLUSTER_TOKEN must be set when EKS_CLUSTER_HOST is not loopback") )
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) )
var ( // ErrInvalidToken is InvalidTokenException (400) from the eks-auth API. ErrInvalidToken = awserr.New("InvalidTokenException", awserr.ErrInvalidParameter) // ErrExpiredToken is ExpiredTokenException (400) from the eks-auth API. ErrExpiredToken = awserr.New("ExpiredTokenException", awserr.ErrInvalidParameter) // ErrAccessDenied is AccessDeniedException; the eks-auth API documents HTTP 400. ErrAccessDenied = awserr.New("AccessDeniedException", awserr.ErrInvalidParameter) ErrServiceUnavailable = awserr.New("ServiceUnavailableException", awserr.ErrConflict) )
var ErrInvalidKubeconfig = errors.New("invalid EKS existing-cluster kubeconfig")
ErrInvalidKubeconfig is returned when the existing-cluster kubeconfig cannot be used.
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned by Init when appCtx is nil.
Functions ¶
func ClusterEngineEnabled ¶
ClusterEngineEnabled reports whether engine selects docker-backed clusters.
func IsOIDCIssuer ¶
IsOIDCIssuer reports whether issuer has the EKS cluster issuer shape.
func K3sImage ¶
K3sImage maps a Kubernetes minor version to its pinned k3s image; exact is false when it fell back to the default.
func ParseK3sImageTags ¶
ParseK3sImageTags parses "1.31=v1.31.5-k3s1,1.32=..." into a minor-to-tag pin map.
func ParseLBPorts ¶
ParseLBPorts parses "8080,8443" into container ports to publish.
func ParseVolumeMountAllow ¶
ParseVolumeMountAllow parses a comma list of absolute host path prefixes.
func ParseVolumeMounts ¶
ParseVolumeMounts parses "host:container[:ro|rw],..." into bind specs.
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 ¶
AccessEntryUpdate holds the mutable fields for UpdateAccessEntry.
type AccessPolicyAssociation ¶
type AccessPolicyAssociation struct {
AssociatedAt time.Time `json:"associatedAt"`
ModifiedAt time.Time `json:"modifiedAt"`
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"`
ModifiedAt time.Time `json:"modifiedAt,omitzero"`
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 ¶
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
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 {
ScheduledEvents *CertificateAuthorityScheduledEvents `json:"-"`
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 CertificateAuthorityScheduledEvents ¶
type CertificateAuthorityScheduledEvents struct {
FirstAutoActivation time.Time
FinalAutoActivation time.Time
}
CertificateAuthorityScheduledEvents mirrors types.CertificateAuthorityScheduledEvents.
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"`
// ConfigBlocks holds the opaque create/update config members keyed by wire name.
ConfigBlocks map[string]jsontext.Value `json:"configBlocks,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"`
CreatorARN string `json:"creatorArn,omitempty"`
CertificateAuthority string `json:"certificateAuthority,omitempty"`
UpgradePolicySupportType string `json:"upgradePolicySupportType,omitempty"`
ClusterLogging []ClusterLogEntry `json:"clusterLogging,omitempty"`
EncryptionConfig []EncryptionConfig `json:"encryptionConfig,omitempty"`
DeletionProtection bool `json:"deletionProtection,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
// ConfigBlocks are the opaque config members, keyed by wire name.
ConfigBlocks map[string]jsontext.Value
DeletionProtection *bool
ElasticLoadBalancing *bool
UpgradeSupportType string
LogEntries []ClusterLogEntry
SubnetIDs []string
}
ClusterConfigUpdate holds mutable cluster config fields for UpdateClusterConfig.
type ClusterEngineConfig ¶
type ClusterEngineConfig struct {
Runtime ClusterRuntime
Credentials CredentialResolver
Ports *portalloc.Allocator
Logger *slog.Logger
Probe func(ctx context.Context, addr, token string) ([]byte, error)
Host string
Token string
Image string
ImageTags map[string]string
LBPorts []int
VolumeMountAllow []string
StartTimeout time.Duration
}
ClusterEngineConfig configures docker-backed EKS clusters.
type ClusterLogEntry ¶
ClusterLogEntry represents one log-type group in the structured logging config.
type ClusterOptionalConfig ¶
type ClusterOptionalConfig struct {
AccessConfig *AccessConfig
ComputeConfig *ComputeConfig
StorageConfig *StorageConfig
ConfigBlocks map[string]jsontext.Value
UpgradePolicySupportType string
CreatorARN string
LogEntries []ClusterLogEntry
EncryptionConfig []EncryptionConfig
DeletionProtection bool
}
ClusterOptionalConfig groups optional cluster configuration for CreateCluster.
type ClusterRuntime ¶
ClusterRuntime is the slice of container.Runtime the cluster engine needs.
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 CredentialIdentity ¶
type CredentialIdentity struct {
// PrincipalARN is the GetCallerIdentity ARN (user, assumed-role session, or root).
PrincipalARN string
// Secret is the access key's secret; empty means the key is unverifiable (the emulator's root fallback).
Secret string
}
CredentialIdentity is the principal an AWS access key resolves to.
type CredentialResolver ¶
type CredentialResolver interface {
ResolveCredential(accessKeyID, sessionToken string) (CredentialIdentity, error)
}
CredentialResolver resolves an access key (and optional session token) to its principal and secret.
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 EngineConfig ¶
type EngineConfig interface {
GetEKSEngine() string
}
EngineConfig exposes the EKS engine mode (stub or docker).
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
// contains filtered or unexported fields
}
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) BackendFor ¶
func (h *Handler) BackendFor(region string) *InMemoryBackend
BackendFor returns the backend serving region: the home backend, or the sibling built on first use.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this EKS instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) EnableRegions ¶
func (h *Handler) EnableRegions()
EnableRegions makes h serve every other region through lazily built per-region siblings.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the EKS operation name from the REST path.
func (*Handler) ExtractResource ¶
ExtractResource extracts the primary resource identifier from the URL path.
func (*Handler) GetSupportedOperations ¶
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 ¶
MatchPriority returns the routing priority.
func (*Handler) OIDCIssuerKeys ¶
OIDCIssuerKeys resolves issuer across every region's backend.
func (*Handler) RegionBackends ¶
func (h *Handler) RegionBackends() []*InMemoryBackend
RegionBackends returns the home backend followed by every sibling built so far.
func (*Handler) RegionHandler ¶
RegionHandler returns the handler serving region: h itself for the home region, else its sibling.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches AWS EKS REST requests.
func (*Handler) ServePublishedPorts ¶
ServePublishedPorts serves GET /_gopherstack/eks/clusters/:name/ports?region=: the host port behind each load-balancer port of a docker-engine cluster.
func (*Handler) SetCredentialResolver ¶
func (h *Handler) SetCredentialResolver(r CredentialResolver)
SetCredentialResolver wires r into every region's backend, including siblings built later.
func (*Handler) SetPodIdentityRoleAssumer ¶
func (h *Handler) SetPodIdentityRoleAssumer(a PodIdentityRoleAssumer)
SetPodIdentityRoleAssumer wires a into every region's backend.
type IdcApplicationManager ¶
type IdcApplicationManager interface {
CreateManagedApplication(idcRegion, instanceArn, name string) (string, error)
DeleteManagedApplication(idcRegion, applicationArn string) error
}
IdcApplicationManager creates and removes the IAM Identity Center application EKS manages for an Argo CD capability; the application lives in the Identity Center instance's region (ArgoCdAwsIdcConfig.IdcRegion).
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, *Update, error)
AssociateEncryptionConfig associates encryption configuration with a cluster. Each call replaces the stored configuration rather than appending. It also creates and stores a real Update record (InProgress -> Successful on the same transition delay as every sibling async op) so a caller polling DescribeUpdate on the returned ID finds it, the same fix applied to Associate/DisassociateIdentityProviderConfig (gopherstack-mb53).
func (*InMemoryBackend) AssociateIdentityProviderConfig ¶
func (b *InMemoryBackend) AssociateIdentityProviderConfig( clusterName, configType, name string, params, requiredClaims, kv map[string]string, ) (*IdentityProviderConfig, *Update, error)
AssociateIdentityProviderConfig associates an identity provider configuration with a cluster. It also creates and stores an Update record (transitioning InProgress -> Successful like every other async EKS op) so a caller polling DescribeUpdate for the returned ID finds it; previously no Update was ever stored, so a real client polling on the fabricated ID it got back always saw ResourceNotFoundException.
func (*InMemoryBackend) AssumeRoleForPodIdentity ¶
func (b *InMemoryBackend) AssumeRoleForPodIdentity(clusterName, token string) (*PodIdentityResult, error)
AssumeRoleForPodIdentity validates a pod's service-account token against the cluster, resolves the matching pod identity association and returns STS credentials for its role (and target role, when set).
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) ClusterTotal ¶
func (b *InMemoryBackend) ClusterTotal() int
ClusterTotal returns the number of EKS-provisioned (not registered) clusters.
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(defaultOnly bool) []map[string]any
DescribeClusterVersions returns supported cluster versions. When defaultOnly is true, only the table's default version(s) are returned (DescribeClusterVersionsInput.DefaultOnly, "Filter to show only default 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) (*Update, error)
DisassociateIdentityProviderConfig removes an identity provider config from a cluster.
func (*InMemoryBackend) EnableClusters ¶
func (b *InMemoryBackend) EnableClusters(cfg ClusterEngineConfig) error
EnableClusters switches the backend to docker mode: each CreateCluster starts a single-node k3s container.
func (*InMemoryBackend) EnableExistingCluster ¶
func (b *InMemoryBackend) EnableExistingCluster(kubeconfigPath, kubeContext string) error
EnableExistingCluster fronts the kubeconfig's cluster: DescribeCluster returns its endpoint and CA, no container starts, and DeleteCluster leaves the external cluster untouched.
func (*InMemoryBackend) InventoryResources ¶
func (b *InMemoryBackend) InventoryResources() []TaggedEntry
InventoryResources lists every EKS resource, tagged or not.
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) MintServiceAccountToken ¶
func (b *InMemoryBackend) MintServiceAccountToken( clusterName string, req ServiceAccountTokenRequest, ) (*ServiceAccountToken, error)
MintServiceAccountToken signs a projected service-account token for the cluster.
func (*InMemoryBackend) OIDCDiscovery ¶
func (b *InMemoryBackend) OIDCDiscovery(id string) (*OIDCDiscoveryDocument, error)
OIDCDiscovery returns the openid-configuration document for the issuer id.
func (*InMemoryBackend) OIDCIssuerKeys ¶
func (b *InMemoryBackend) OIDCIssuerKeys(issuer string) ([]*rsa.PublicKey, bool)
OIDCIssuerKeys returns the public signing keys for a cluster issuer served by this backend.
func (*InMemoryBackend) OIDCJWKS ¶
func (b *InMemoryBackend) OIDCJWKS(id string) (*JWKS, error)
OIDCJWKS returns the issuer's public key set.
func (*InMemoryBackend) PublishedLBPorts ¶
func (b *InMemoryBackend) PublishedLBPorts(name string) ([]PublishedPort, error)
PublishedLBPorts returns the host ports published for the cluster's load-balancer ports.
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) SetCredentialResolver ¶
func (b *InMemoryBackend) SetCredentialResolver(r CredentialResolver)
SetCredentialResolver sets how EKS verifies `aws eks get-token` bearers; call before serving traffic.
func (*InMemoryBackend) SetIdcApplicationManager ¶
func (b *InMemoryBackend) SetIdcApplicationManager(m IdcApplicationManager)
SetIdcApplicationManager wires Argo CD capabilities to IAM Identity Center; nil leaves the ARN unset.
func (*InMemoryBackend) SetLifecycleDelay ¶
func (b *InMemoryBackend) SetLifecycleDelay(d time.Duration)
SetLifecycleDelay sets how long clusters, nodegroups, addons, Fargate profiles, identity providers, certificate authorities and updates dwell in a transitional state; 0 keeps the built-in 100ms.
func (*InMemoryBackend) SetPodIdentityRoleAssumer ¶
func (b *InMemoryBackend) SetPodIdentityRoleAssumer(a PodIdentityRoleAssumer)
SetPodIdentityRoleAssumer sets how pod identity credentials are issued; call before serving traffic.
func (*InMemoryBackend) SetQuotaLimiter ¶
func (b *InMemoryBackend) SetQuotaLimiter(f quotalimit.Func)
SetQuotaLimiter makes CreateCluster honour the Service Quotas cluster limit; nil restores the built-in cap.
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 lists every EKS resource that carries at least one tag.
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, releaseVersion string, launchTemplate ...*LaunchTemplate, ) (*Update, error)
UpdateNodegroupVersion updates the node group Kubernetes version and/or its AMI release version (UpdateNodegroupVersionInput.ReleaseVersion, "the AMI version of the Amazon EKS optimized AMI to use for the update").
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 JWK ¶
type JWK struct {
Kty string `json:"kty"`
Kid string `json:"kid"`
Use string `json:"use"`
Alg string `json:"alg"`
N string `json:"n"`
E string `json:"e"`
}
JWK is one RSA signing key in a JWKS.
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 NodeRepairConfig ¶
type NodeRepairConfig struct {
Enabled *bool `json:"enabled,omitempty"`
MaxParallelNodesRepairedCount *int32 `json:"maxParallelNodesRepairedCount,omitempty"`
MaxParallelNodesRepairedPercentage *int32 `json:"maxParallelNodesRepairedPercentage,omitempty"`
MaxUnhealthyNodeThresholdCount *int32 `json:"maxUnhealthyNodeThresholdCount,omitempty"`
MaxUnhealthyNodeThresholdPercentage *int32 `json:"maxUnhealthyNodeThresholdPercentage,omitempty"`
NodeRepairConfigOverrides []NodeRepairOverride `json:"nodeRepairConfigOverrides,omitempty"`
}
NodeRepairConfig mirrors types.NodeRepairConfig.
type NodeRepairOverride ¶
type NodeRepairOverride struct {
MinRepairWaitTimeMins *int32 `json:"minRepairWaitTimeMins,omitempty"`
NodeMonitoringCondition string `json:"nodeMonitoringCondition,omitempty"`
NodeUnhealthyReason string `json:"nodeUnhealthyReason,omitempty"`
RepairAction string `json:"repairAction,omitempty"`
}
NodeRepairOverride mirrors types.NodeRepairConfigOverrides.
type Nodegroup ¶
type Nodegroup struct {
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
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"`
NodeRepair *NodeRepairConfig `json:"nodeRepairConfig,omitempty"`
WarmPool *WarmPoolConfig `json:"warmPoolConfig,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
NodeRepair *NodeRepairConfig
WarmPool *WarmPoolConfig
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
NodeRepair *NodeRepairConfig
WarmPool *WarmPoolConfig
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 {
UpdateStrategy string `json:"updateStrategy,omitempty"`
}
NodegroupUpdateConfig holds the nodegroup update strategy settings.
type OIDCDiscoveryDocument ¶
type OIDCDiscoveryDocument struct {
Issuer string `json:"issuer"`
JWKSURI string `json:"jwks_uri"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
ResponseTypesSupported []string `json:"response_types_supported"`
SubjectTypesSupported []string `json:"subject_types_supported"`
ClaimsSupported []string `json:"claims_supported"`
IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`
}
OIDCDiscoveryDocument is the issuer's openid-configuration document.
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"`
TargetRoleARN string `json:"targetRoleArn,omitempty"`
DisableSessionTags bool `json:"disableSessionTags"`
}
PodIdentityAssociation represents an EKS pod identity association.
type PodIdentityAssociationInput ¶ added in v1.2.0
type PodIdentityAssociationInput struct {
Policy string
TargetRoleARN string
DisableSessionTags bool
}
PodIdentityAssociationInput groups the optional fields for CreatePodIdentityAssociation beyond the always-required namespace, serviceAccount, and roleARN.
type PodIdentityAssociationSpec ¶
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
TargetRoleARN 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 PodIdentityCredentials ¶
type PodIdentityCredentials struct {
Expiration time.Time
AccessKeyID string
SecretAccessKey string
SessionToken string
AssumedRoleARN string
AssumedRoleID string
}
PodIdentityCredentials are the temporary credentials STS issued.
type PodIdentityResult ¶
type PodIdentityResult struct {
Creds PodIdentityCredentials
AssociationARN string
AssociationID string
Namespace string
ServiceAccount string
}
PodIdentityResult is the AssumeRoleForPodIdentity output.
type PodIdentityRoleAssumer ¶
type PodIdentityRoleAssumer interface {
AssumePodIdentityRole(req PodIdentityRoleRequest) (PodIdentityCredentials, error)
}
PodIdentityRoleAssumer issues the credentials returned by AssumeRoleForPodIdentity.
type PodIdentityRoleRequest ¶
type PodIdentityRoleRequest struct {
RoleARN string
SessionName string
CallerARN string
ExternalID string
Policy string
Tags []PodIdentityTag
}
PodIdentityRoleRequest asks the STS backend for the credentials of a pod identity role. An empty CallerARN is the first hop (trust is checked for pods.eks.amazonaws.com); otherwise it is a role-chaining hop from CallerARN.
type PodIdentityTag ¶
type PodIdentityTag struct{ Key, Value string }
PodIdentityTag is one session tag attached to pod identity credentials.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS EKS.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the EKS service backend and handler.
type PublishedPort ¶
type PublishedPort struct {
Host string `json:"host"`
ContainerPort int `json:"containerPort"`
HostPort int `json:"hostPort"`
}
PublishedPort is a container port published on a host port.
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 ServiceAccountToken ¶
ServiceAccountToken is a minted projected service-account token.
type ServiceAccountTokenRequest ¶
type ServiceAccountTokenRequest struct {
Namespace string
Name string
PodName string
Audiences []string
TTL time.Duration
}
ServiceAccountTokenRequest asks for a projected service-account token.
type SsoIdentity ¶
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
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"`
AddonName string `json:"addonName,omitempty"`
CapabilityName string `json:"capabilityName,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 ¶
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.
type WarmPoolConfig ¶
type WarmPoolConfig struct {
Enabled *bool `json:"enabled,omitempty"`
MaxGroupPreparedCapacity *int32 `json:"maxGroupPreparedCapacity,omitempty"`
MinSize *int32 `json:"minSize,omitempty"`
ReuseOnScaleIn *bool `json:"reuseOnScaleIn,omitempty"`
PoolState string `json:"poolState,omitempty"`
}
WarmPoolConfig mirrors types.WarmPoolConfig.
Source Files
¶
- access_entries.go
- addons.go
- capabilities.go
- capability_configuration.go
- certificate_authorities.go
- cluster_ca.go
- cluster_config_blocks.go
- cluster_engine.go
- cluster_options.go
- clusters.go
- deferred_delete.go
- errors.go
- external_cluster.go
- fargate_profiles.go
- handler.go
- handler_access_entries.go
- handler_addons.go
- handler_capabilities.go
- handler_certificate_authorities.go
- handler_clusters.go
- handler_fargate_profiles.go
- handler_identity_providers.go
- handler_insights.go
- handler_irsa.go
- handler_node_groups.go
- handler_pod_identity.go
- handler_subscriptions.go
- handler_tags.go
- handler_updates.go
- helpers.go
- idc_application.go
- idempotency.go
- identity_providers.go
- insights.go
- irsa.go
- irsa_key.go
- k8s_addons.go
- k8s_api.go
- k8s_identity.go
- k8s_nodes.go
- k8s_proxy.go
- k8s_rbac.go
- k8s_reconcile.go
- k8s_token.go
- limits.go
- models.go
- node_groups.go
- persistence.go
- pod_identity.go
- pod_identity_auth.go
- provider.go
- published_ports.go
- quota.go
- regions.go
- resume.go
- store.go
- store_setup.go
- subscriptions.go
- tags.go
- updates.go
- validation.go