Skip to content

RFD - Add Nebari Configuration Options for Air-Gapped or Secure Deployments #52

@joneszc

Description

@joneszc
Status Draft 🚧 / Open for comments 💬
Author(s) @joneszc
Date Created 15-08-2024
Date Last updated 15-08-2024
Decision deadline N/A

Title

Addition of Nebari Configuration Options for Deploying Nebari in Air-Gapped and/or Secure Environments

Summary

There are currently a number of options available to optimize Nebari configurations for deploying in AWS air-gapped networks, private subnets, or secure environments

For example:

  • Pointing to existing subnets and an existing security group for overriding the default Nebari provisioning of aws_vpc, aws_subnet, aws_internet_gateway, aws_security_group:
amazon_web_services:
  existing_subnet_ids:
    - subnet-xzxzxzxzxzxzxzx
    - subnet-zxzxzxzxzxzxzxzxz
  existing_security_group_id: sg-xzxzxzxzxzx
  • Setting the load balancer as internal as opposed to internet-facing while also pointing to existing subnets:
ingress:
  terraform_overrides:
    load-balancer-annotations:
      service.beta.kubernetes.io/aws-load-balancer-internal: "true"
      service.beta.kubernetes.io/aws-load-balancer-subnets: "subnet-xzxzxzxzxzxzxzx,subnet-zxzxzxzxzxzxzxzxz"
  • Potentially overriding conda configs with private conda channels
conda_store:
  extra_settings:
    CondaStore:
      conda_allowed_channels:
        - s3://my_bucket/my-conda-repository/main/
  • Deploying Nebari with self-signed certificates:
certificate:
  type: self-signed
  • Rebuilding with locally issued or customer-provided certificate (after creating k8s secret):
certificate:
  type: existing
  secret_name: nebari-custom-secret

However, configuration options could be expanded to enable:

  • Option to set image overrides for all Nebari containers, individually, or set private registry mirrors for docker, quay, gcr, etc.
  • Option to employ customized, hardened or otherwise customer-approved AMIs for EKS nodes
  • Option to specify launch commands (pre-bootstrap) that configure security/networking/performance requirements of EKS nodes
  • Option to control the EKS cluster endpoint access, beyond the default "Public", to set either "Private" or "Public and Private"

User benefit

  • Nebari users would have the option to control all container-image overrides and set private registries/mirrors.
  • Nebari users would be able to modify EKS nodes and/or utilize customized ec2 AMI to accommodate target environment requirements to ensure networking/security/performance compliance and accommodate requirements for integrating customer systems.
  • Nebari would be deployable into private AWS subnets with option to override the current default "Public" cluster API server endpoint to set an entirely "Private" endpoint or a "Public and Private" endpoint.

Design Proposal

  • Enable option to control EKS cluster endpoint access settings as discussed in #2586 and proposed in PR#2618:
amazon_web_services:
  eks_endpoint_access: 'private'
  • Enable option to run custom launch commands on EKS nodes as discussed in #2603 and proposed in PR#2621
    Note that this would also resolve the functionality to set private container registries/mirrors by adding containerd configs/imports:
amazon_web_services:
  node_prebootstrap_command: |
    #!/bin/bash
    mkdir -p /etc/containerd/certs.d/_default
    cat <<-EOT > /etc/containerd/certs.d/_default/hosts.toml
    [host."https://registry.gitlab.example.com"]
      capabilities = ["pull", "resolve"]
    EOT
  • Enable option to specify custom AMI IDs for EKS nodes as discussed in #2604 and also proposed in PR#2621
amazon_web_services:
  node_groups:
    general:
      instance: m5.2xlarge
      custom_ami: ami-0xzxzxzxzxzxzx
      min_nodes: 1
      max_nodes: 1
      gpu: false
      single_subnet: false

Alternatives or approaches considered (if any)

In addition to using node pre-bootstrap commands to override containerd configs for setting private registry mirrors, increased terraform and helm override options could be enabled to specify container images and tags to reflect custom-built or privately-hosted container-images.

Best practices

User impact

  • Per PR#2621, users would need to understand whether or not their custom EKS node AMI is GPU-enabled, to ensure proper toggling of gpu: <true/false> (setting a custom AMI ID would trigger the terraform logic to automatically switch the ami_type value to "CUSTOM", as required by AWS EKS).
  • Additionally, per PR#2621, users would not be required to manually input the override bootstrap.sh command when setting a custom AMI ID, as the terraform would employ the command for them.

Unresolved questions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions