Class EksConfig.Builder

Enclosing class:
EksConfig

public static class EksConfig.Builder extends AbstractServiceConfigBuilder<EksConfig.Builder,EksConfig>
Builder for EksConfig.
  • Method Details

    • mock

      public EksConfig.Builder mock(boolean mock)
      Sets whether clusters go straight to ACTIVE without starting real Docker containers.
      Parameters:
      mock - true to enable mock mode (default false)
      Returns:
      this builder
    • provider

      public EksConfig.Builder provider(String provider)
      Sets the Kubernetes provider used for EKS clusters.
      Parameters:
      provider - the provider name (default "k3s")
      Returns:
      this builder
    • defaultImage

      public EksConfig.Builder defaultImage(String defaultImage)
      Sets the default Docker image for EKS (k3s) instances.
      Parameters:
      defaultImage - the image name (default "rancher/k3s:latest")
      Returns:
      this builder
    • apiServerPortRange

      public EksConfig.Builder apiServerPortRange(int basePort, int amount)
      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

      public EksConfig.Builder dockerNetwork(String dockerNetwork)
      Sets the Docker network that EKS containers should join.
      Parameters:
      dockerNetwork - the network name, or null to use the default bridge
      Returns:
      this builder
    • endpointMode

      public EksConfig.Builder endpointMode(String endpointMode)
      Sets the endpoint mode used in describe-cluster responses.
      • host (default) — https://localhost:<hostPort>
      • network — the container DNS name https://floci-eks-<name>:6443
      Parameters:
      endpointMode - the endpoint mode (default "host")
      Returns:
      this builder
    • iamAuthWebhook

      public EksConfig.Builder iamAuthWebhook(boolean iamAuthWebhook)
      Controls 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.
      Parameters:
      iamAuthWebhook - true to enable the IAM auth webhook (default true)
      Returns:
      this builder
    • ecrRegistryMirror

      public EksConfig.Builder ecrRegistryMirror(boolean ecrRegistryMirror)
      Controls 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.
      Parameters:
      ecrRegistryMirror - true to enable the ECR registry mirror (default true)
      Returns:
      this builder
    • build

      public EksConfig build()
      Creates an immutable EksConfig from this builder.
      Specified by:
      build in class AbstractServiceConfigBuilder<EksConfig.Builder,EksConfig>
      Returns:
      the EKS configuration