Class EksConfig


public class EksConfig extends AbstractServiceConfig<EksConfig.Builder>
Configuration for EKS (Elastic Kubernetes Service)-specific container settings.

Instances are created via EksConfig.Builder:


 EksConfig config = EksConfig.builder()
     .enabled(true)
     .mock(false)
     .provider("k3s")
     .apiServerPortRange(6500, 100)
     .build();
 
  • Method Details

    • builder

      public static EksConfig.Builder builder()
      Returns a new EksConfig.Builder for this configuration.
      Returns:
      a new builder
    • toBuilder

      public EksConfig.Builder toBuilder()
      Returns a new EksConfig.Builder for this configuration, initialized with the current values of this instance.
      Specified by:
      toBuilder in class AbstractServiceConfig<EksConfig.Builder>
      Returns:
      a new builder pre-populated with this configuration's values
    • isMock

      public boolean isMock()
      Returns whether clusters go straight to ACTIVE without starting real Docker containers.
      Returns:
      true if mock mode is enabled
    • getProvider

      public String getProvider()
      Returns the Kubernetes provider used for EKS clusters.
      Returns:
      the provider name
    • getDefaultImage

      public String getDefaultImage()
      Returns the default Docker image used for EKS (k3s) instances.
      Returns:
      the image name
    • getApiServerBasePort

      public int getApiServerBasePort()
      Returns the base port for the EKS API server port range.
      Returns:
      the base port
    • getApiServerPortsCount

      public int getApiServerPortsCount()
      Returns the number of ports allocated for the EKS API server, starting from getApiServerBasePort().
      Returns:
      the number of API server ports
    • getApiServerMaxPort

      public int getApiServerMaxPort()
      Returns the maximum port for the EKS API server port range.
      Returns:
      the maximum port
    • getDockerNetwork

      public String getDockerNetwork()
      Returns the Docker network used for EKS containers, or null if not set.
      Returns:
      the Docker network name, or null
    • getEndpointMode

      public String getEndpointMode()
      Returns the endpoint mode used in describe-cluster responses.
      • host (default) — https://localhost:<hostPort>, reachable from the host so kubectl/aws eks work out of the box.
      • network — the container DNS name https://floci-eks-<name>:6443, reachable from other containers on the Docker network (pre-#1118 behaviour). Falls back to the host endpoint when Floci runs natively.
      Returns:
      the endpoint mode
    • isIamAuthWebhook

      public boolean isIamAuthWebhook()
      Returns whether a token-authentication webhook is wired into k3s so that the bearer token produced by aws eks get-token is validated by Floci and mapped to cluster-admin.
      Returns:
      true if the IAM auth webhook is enabled
    • isEcrRegistryMirror

      public boolean isEcrRegistryMirror()
      Returns whether each new k3s cluster gets a generated /etc/rancher/k3s/registries.yaml that 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.
      Returns:
      true if the ECR registry mirror is enabled
    • applyEnvVarsToContainer

      public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by setting the appropriate environment variables.
      Overrides:
      applyEnvVarsToContainer in class AbstractServiceConfig<EksConfig.Builder>
      Parameters:
      container - the container to configure
    • applyExposedPortsToContainer

      public void applyExposedPortsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by exposing the appropriate ports.
      Overrides:
      applyExposedPortsToContainer in class AbstractServiceConfig<EksConfig.Builder>
      Parameters:
      container - the container to configure