eks

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 27 Imported by: 0

README

EKS

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

Coverage

Metric Value
Operations audited 65 (64 ok, 1 gap)
Known gaps 5
Deferred items 2
Resource leaks clean
Known gaps
  • CancelUpdate op entirely unimplemented (bd: gopherstack-nab, already tracked pre-existing)
  • No List* op implements maxResults/nextToken pagination (ListClusters, ListNodegroups, ListAddons, ListFargateProfiles, ListPodIdentityAssociations, ListIdentityProviderConfigs, ListEksAnywhereSubscriptions, ListUpdates, ListAccessEntries all return the full set in one page) — needs a follow-up bd issue
  • CreateEksAnywhereSubscription does not validate the required 'term' input field
  • Capability Configuration/Health/ModifiedAt/ClientRequestToken (idempotency) not modeled — only CapabilityName/ClusterName/ARN/Type/RoleArn/DeletePropagationPolicy/Status/CreatedAt/Tags are real
  • Insight/DescribeInsight content is fabricated/synthetic, not derived from real cluster analysis (pre-existing, inherent emulator limitation)
Deferred
  • Full field-by-field wire audit of AccessEntry/FargateProfile/PodIdentityAssociation/IdentityProviderConfig response bodies beyond envelope key + top-level shape (route correctness was verified for all of these; deep field audit not done this pass)
  • AWS error-code granularity beyond the three sentinel mappings (ErrNotFound->ResourceNotFoundException, ErrAlreadyExists->ResourceInUseException, ErrValidation->InvalidParameterValueException) — some real AWS EKS error paths return more specific codes (e.g. InvalidRequestException, ClientException) not modeled here

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.
	ErrValidation = awserr.New("InvalidParameterValueException", 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"`
	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"`
	Tags                  *tags.Tags   `json:"tags,omitempty"`
	Health                *AddonHealth `json:"health,omitempty"`
	ClusterName           string       `json:"clusterName"`
	AddonName             string       `json:"addonName"`
	ARN                   string       `json:"addonArn"`
	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"`
}

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"`
	Tags            *tags.Tags `json:"tags,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"`
}

AnywhereSubscription represents an EKS Anywhere subscription.

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 Capability

type Capability struct {
	CreatedAt               time.Time  `json:"createdAt"`
	Tags                    *tags.Tags `json:"tags,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}]).

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"`
	NetworkingConfig        *NetworkingConfig        `json:"networkingConfig,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
	NetworkingConfig *NetworkingConfig
}

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 {
	ActivationCode   string `json:"activationCode,omitempty"`
	ActivationExpiry string `json:"activationExpiry,omitempty"`
	ActivationID     string `json:"activationId,omitempty"`
	Provider         string `json:"provider,omitempty"`
	RoleARN          string `json:"roleArn,omitempty"`
}

ConnectorConfig holds metadata for externally-registered clusters.

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"`
	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 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"`
	ClusterName string            `json:"clusterName"`
	Name        string            `json:"name"`
	Type        string            `json:"type"`
	Status      string            `json:"status"`
}

IdentityProviderConfig represents an identity provider configuration for a cluster.

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) 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, kv map[string]string,
) (*IdentityProviderConfig, error)

AssociateIdentityProviderConfig associates an identity provider configuration with a cluster.

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 string,
	kv map[string]string,
) (*Addon, error)

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

func (*InMemoryBackend) CreateCapability

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

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

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,
	licenseQuantity int32,
	licenseType string,
	kv map[string]string,
) (*AnywhereSubscription, error)

CreateEksAnywhereSubscription creates a new EKS Anywhere subscription.

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,
) (*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) (*Addon, error)

DeleteAddon removes an add-on from a cluster.

func (*InMemoryBackend) DeleteCapability

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

DeleteCapability removes a capability by cluster and capability name.

func (*InMemoryBackend) DeleteCluster

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

DeleteCluster deletes a cluster by name. For test convenience this fake cascades and removes nodegroups as well (real AWS requires manual nodegroup deletion first).

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.

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) 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 a synthetic insight for a cluster.

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.

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) []string

ListCapabilities returns all capability names in a cluster sorted alphabetically.

func (*InMemoryBackend) ListClusters

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

ListClusters returns all cluster names sorted alphabetically.

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 synthetic insights 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) 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,
) (*Addon, error)

UpdateAddon updates an existing add-on.

func (*InMemoryBackend) UpdateCapability

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

UpdateCapability updates an existing capability's role ARN and/or delete propagation policy.

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, licenseQuantity *int32, licenseType string,
) (*AnywhereSubscription, error)

UpdateEksAnywhereSubscription updates a subscription.

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, roleARN string,
) (*PodIdentityAssociation, error)

UpdatePodIdentityAssociation updates a pod identity association.

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"`
	Description     string            `json:"description,omitempty"`
	Recommendation  string            `json:"recommendation,omitempty"`
}

Insight represents an EKS cluster insight.

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 {
	IPFamily        string `json:"ipFamily,omitempty"`
	ServiceIPv4CIDR string `json:"serviceIpv4Cidr,omitempty"`
	ServiceIPv6CIDR string `json:"serviceIpv6Cidr,omitempty"`
}

KubernetesNetworkConfig captures cluster networking parameters.

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 NetworkingConfig

type NetworkingConfig struct {
	ElasticLoadBalancing *ElasticLoadBalancingConfig `json:"elasticLoadBalancing,omitempty"`
}

NetworkingConfig holds the EKS Auto Mode networking configuration.

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"`
	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"`
}

PodIdentityAssociation represents an EKS pod identity association.

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 StorageConfig

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

StorageConfig holds the EKS Auto Mode storage configuration.

type Update

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

Update represents an EKS update record.

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