-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
| 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
internalas opposed tointernet-facingwhile 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
- Option to override many, but not all, container-images to point to local private registries/mirrors, as discussed in:
Custom images / private registry #2097
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 theami_typevalue 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels