Documentation
¶
Overview ¶
Package eks provides Amazon EKS control-plane emulation.
Implemented operations (REST JSON):
- POST /clusters
- GET /clusters
- GET /clusters/{name}
- POST /clusters/{name}/updates
- POST /clusters/{name}/kubeconfig
- DELETE /clusters/{name}
- POST /clusters/{name}/node-groups
- GET /clusters/{name}/node-groups
By default (`OVERCAST_EKS_MODE=mock`) the implementation is metadata-only. In live mode (`OVERCAST_EKS_MODE=live`), CreateCluster starts a k3s control-plane container and transitions the cluster to ACTIVE once the API server readiness endpoint responds.
Index ¶
- type AccessEntry
- type Addon
- type AssociatedAccessPolicy
- type Cluster
- type FargateProfile
- type IdentityProviderConfig
- type Nodegroup
- type PodIdentityAssociation
- type Service
- func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)
- func (s *Service) Name() string
- func (s *Service) Operations() []op.Operation
- func (s *Service) RegisterRoutes(r chi.Router)
- func (s *Service) SetDocker(dc *docker.Client)
- func (s *Service) Stop(ctx context.Context)
- func (s *Service) SupportedProtocols() []codec.Codec
- func (s *Service) TargetPrefix() string
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessEntry ¶
type AccessEntry struct {
ClusterName string `json:"clusterName"`
PrincipalArn string `json:"principalArn"`
Type string `json:"type,omitempty"`
Username string `json:"username,omitempty"`
KubernetesGroups []string `json:"kubernetesGroups,omitempty"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
Tags map[string]string `json:"tags,omitempty"`
}
AccessEntry represents an EKS access entry association.
type Addon ¶
type Addon struct {
ClusterName string `json:"clusterName"`
AddonName string `json:"addonName"`
AddonArn string `json:"addonArn"`
AddonVersion string `json:"addonVersion,omitempty"`
ConfigurationValues string `json:"configurationValues,omitempty"`
ServiceAccountRoleArn string `json:"serviceAccountRoleArn,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status"`
Tags map[string]string `json:"tags,omitempty"`
}
Addon represents an EKS managed add-on in mock mode.
type AssociatedAccessPolicy ¶
type AssociatedAccessPolicy struct {
ClusterName string `json:"clusterName"`
PrincipalArn string `json:"principalArn"`
PolicyArn string `json:"policyArn"`
AccessScope map[string]any `json:"accessScope,omitempty"`
AssociatedAt time.Time `json:"associatedAt"`
ModifiedAt time.Time `json:"modifiedAt"`
}
AssociatedAccessPolicy is metadata for policies associated with an access entry.
type Cluster ¶
type Cluster struct {
Name string `json:"name"`
Arn string `json:"arn"`
CreatedAt time.Time `json:"createdAt"`
Version string `json:"version"`
Endpoint string `json:"endpoint"`
RoleArn string `json:"roleArn"`
Status string `json:"status"`
CertificateAuthority map[string]any `json:"certificateAuthority"`
ResourcesVPCConfig map[string]any `json:"resourcesVpcConfig"`
KubernetesNetworkConfig map[string]any `json:"kubernetesNetworkConfig,omitempty"`
EncryptionConfig []map[string]any `json:"encryptionConfig,omitempty"`
Logging map[string]any `json:"logging,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
Cluster represents the EKS cluster metadata returned by controller APIs.
type FargateProfile ¶
type FargateProfile struct {
ClusterName string `json:"clusterName"`
FargateProfileName string `json:"fargateProfileName"`
FargateProfileArn string `json:"fargateProfileArn"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status"`
PodExecutionRoleArn string `json:"podExecutionRoleArn"`
Subnets []string `json:"subnets,omitempty"`
Selectors []map[string]any `json:"selectors,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
FargateProfile is metadata for EKS Fargate profiles in mock mode.
type IdentityProviderConfig ¶
type IdentityProviderConfig struct {
ClusterName string `json:"clusterName"`
Type string `json:"type"`
Name string `json:"name"`
OIDC map[string]any `json:"oidc,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Tags map[string]string `json:"tags,omitempty"`
}
IdentityProviderConfig represents an EKS associated identity provider config.
type Nodegroup ¶
type Nodegroup struct {
ClusterName string `json:"clusterName"`
NodegroupName string `json:"nodegroupName"`
NodegroupArn string `json:"nodegroupArn"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status"`
Version string `json:"version,omitempty"`
ReleaseVersion string `json:"releaseVersion,omitempty"`
NodeRole string `json:"nodeRole"`
Subnets []string `json:"subnets,omitempty"`
InstanceTypes []string `json:"instanceTypes,omitempty"`
AmiType string `json:"amiType,omitempty"`
CapacityType string `json:"capacityType,omitempty"`
DiskSize int `json:"diskSize,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Taints []map[string]any `json:"taints,omitempty"`
ScalingConfig map[string]any `json:"scalingConfig,omitempty"`
UpdateConfig map[string]any `json:"updateConfig,omitempty"`
LaunchTemplate map[string]any `json:"launchTemplate,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
Nodegroup is metadata for managed nodegroups in mock mode.
type PodIdentityAssociation ¶
type PodIdentityAssociation struct {
ClusterName string `json:"clusterName"`
AssociationID string `json:"associationId"`
AssociationArn string `json:"associationArn"`
Namespace string `json:"namespace"`
ServiceAccount string `json:"serviceAccount"`
RoleArn string `json:"roleArn"`
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
Tags map[string]string `json:"tags,omitempty"`
}
PodIdentityAssociation is metadata for EKS pod identity associations.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements router.Service for EKS.
func (*Service) Operations ¶
func (*Service) RegisterRoutes ¶
func (*Service) SetDocker ¶
SetDocker wires the Docker client used for future live-mode control-plane runtime work.
func (*Service) Stop ¶
Stop satisfies router.Stopper. Live-mode cleanup is best-effort for both the in-memory runtime registry and any persisted live clusters that need runtime reconciliation after a process restart.