Class EksConfig.Builder
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfigBuilder<EksConfig.Builder,EksConfig>
io.floci.testcontainers.config.services.EksConfig.Builder
- Enclosing class:
- EksConfig
public static class EksConfig.Builder
extends AbstractServiceConfigBuilder<EksConfig.Builder,EksConfig>
Builder for
EksConfig.-
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled -
Method Summary
Modifier and TypeMethodDescriptionapiServerPortRange(int basePort, int amount) Sets the port range for the EKS API server.build()Creates an immutableEksConfigfrom this builder.defaultImage(String defaultImage) Sets the default Docker image for EKS (k3s) instances.dockerNetwork(String dockerNetwork) Sets the Docker network that EKS containers should join.ecrRegistryMirror(boolean ecrRegistryMirror) Controls whether each new k3s cluster gets a generated/etc/rancher/k3s/registries.yamlthat mirrors every ECR repository URI the emulator can mint to the registry container's in-network endpoint, so pods can pull images pushed to Floci ECR without any manual containerd configuration.endpointMode(String endpointMode) Sets the endpoint mode used indescribe-clusterresponses.iamAuthWebhook(boolean iamAuthWebhook) Controls whether a token-authentication webhook is wired into k3s so that the bearer token produced byaws eks get-tokenis validated by Floci and mapped to cluster-admin.mock(boolean mock) Sets whether clusters go straight to ACTIVE without starting real Docker containers.Sets the Kubernetes provider used for EKS clusters.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled
-
Method Details
-
mock
Sets whether clusters go straight to ACTIVE without starting real Docker containers.- Parameters:
mock-trueto enable mock mode (default false)- Returns:
- this builder
-
provider
Sets the Kubernetes provider used for EKS clusters.- Parameters:
provider- the provider name (default "k3s")- Returns:
- this builder
-
defaultImage
Sets the default Docker image for EKS (k3s) instances.- Parameters:
defaultImage- the image name (default "rancher/k3s:latest")- Returns:
- this builder
-
apiServerPortRange
Sets the port range for the EKS API server.- Parameters:
basePort- the base port (default 6500)amount- the amount of ports (default 10)- Returns:
- this builder
-
dockerNetwork
Sets the Docker network that EKS containers should join.- Parameters:
dockerNetwork- the network name, ornullto use the default bridge- Returns:
- this builder
-
endpointMode
Sets the endpoint mode used indescribe-clusterresponses.host(default) —https://localhost:<hostPort>network— the container DNS namehttps://floci-eks-<name>:6443
- Parameters:
endpointMode- the endpoint mode (default "host")- Returns:
- this builder
-
iamAuthWebhook
Controls whether a token-authentication webhook is wired into k3s so that the bearer token produced byaws eks get-tokenis validated by Floci and mapped to cluster-admin.- Parameters:
iamAuthWebhook-trueto enable the IAM auth webhook (default true)- Returns:
- this builder
-
ecrRegistryMirror
Controls whether each new k3s cluster gets a generated/etc/rancher/k3s/registries.yamlthat mirrors every ECR repository URI the emulator can mint to the registry container's in-network endpoint, so pods can pull images pushed to Floci ECR without any manual containerd configuration. Only takes effect when ECR is also enabled.- Parameters:
ecrRegistryMirror-trueto enable the ECR registry mirror (default true)- Returns:
- this builder
-
build
Creates an immutableEksConfigfrom this builder.- Specified by:
buildin classAbstractServiceConfigBuilder<EksConfig.Builder,EksConfig> - Returns:
- the EKS configuration
-