-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
1,748 additions
and
688 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Test - AIML | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 7 * * 3' | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
test-module: | ||
uses: ./.github/workflows/module-test.yaml | ||
with: | ||
module: aiml | ||
secrets: inherit |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module "eks" { | ||
source = "terraform-aws-modules/eks/aws" | ||
version = "~> 19.16" | ||
|
||
cluster_name = var.cluster_name | ||
cluster_version = var.cluster_version | ||
cluster_endpoint_public_access = true | ||
|
||
cluster_addons = { | ||
vpc-cni = { | ||
before_compute = true | ||
most_recent = true | ||
configuration_values = jsonencode({ | ||
env = { | ||
ENABLE_POD_ENI = "true" | ||
ENABLE_PREFIX_DELEGATION = "true" | ||
POD_SECURITY_GROUP_ENFORCING_MODE = "standard" | ||
} | ||
}) | ||
} | ||
} | ||
|
||
vpc_id = module.vpc.vpc_id | ||
subnet_ids = module.vpc.private_subnets | ||
|
||
create_cluster_security_group = false | ||
create_node_security_group = false | ||
|
||
eks_managed_node_groups = { | ||
default = { | ||
instance_types = ["m5.large"] | ||
force_update_version = true | ||
release_version = var.ami_release_version | ||
|
||
min_size = 3 | ||
max_size = 6 | ||
desired_size = 3 | ||
|
||
labels = { | ||
workshop-default = "yes" | ||
} | ||
} | ||
} | ||
|
||
tags = merge(local.tags, { | ||
"karpenter.sh/discovery" = var.cluster_name | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
locals { | ||
tags = { | ||
created-by = "eks-workshop-v2" | ||
env = var.cluster_name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
provider "aws" { | ||
default_tags { | ||
tags = local.tags | ||
} | ||
} | ||
|
||
terraform { | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 4.67.0" | ||
} | ||
} | ||
|
||
required_version = ">= 1.4.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
variable "cluster_name" { | ||
type = string | ||
default = "eks-workshop" | ||
} | ||
|
||
variable "cluster_version" { | ||
description = "EKS cluster version." | ||
type = string | ||
default = "1.25" | ||
} | ||
|
||
variable "ami_release_version" { | ||
description = "Default EKS AMI release version for node groups" | ||
type = string | ||
default = " 1.25.6-20230304" | ||
} | ||
|
||
variable "vpc_cidr" { | ||
description = "Defines the CIDR block used on Amazon VPC created for Amazon EKS." | ||
type = string | ||
default = "10.42.0.0/16" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
locals { | ||
private_subnets = [for k, v in local.azs : cidrsubnet(var.vpc_cidr, 3, k + 3)] | ||
public_subnets = [for k, v in local.azs : cidrsubnet(var.vpc_cidr, 3, k)] | ||
azs = slice(data.aws_availability_zones.available.names, 0, 3) | ||
} | ||
|
||
data "aws_availability_zones" "available" { | ||
state = "available" | ||
} | ||
|
||
module "vpc" { | ||
source = "terraform-aws-modules/vpc/aws" | ||
version = "~> 5.1" | ||
|
||
name = var.cluster_name | ||
cidr = var.vpc_cidr | ||
|
||
azs = local.azs | ||
public_subnets = local.public_subnets | ||
private_subnets = local.private_subnets | ||
public_subnet_suffix = "SubnetPublic" | ||
private_subnet_suffix = "SubnetPrivate" | ||
|
||
enable_nat_gateway = true | ||
create_igw = true | ||
enable_dns_hostnames = true | ||
single_nat_gateway = true | ||
|
||
# Manage so we can name | ||
manage_default_network_acl = true | ||
default_network_acl_tags = { Name = "${var.cluster_name}-default" } | ||
manage_default_route_table = true | ||
default_route_table_tags = { Name = "${var.cluster_name}-default" } | ||
manage_default_security_group = true | ||
default_security_group_tags = { Name = "${var.cluster_name}-default" } | ||
|
||
public_subnet_tags = merge(local.tags, { | ||
"kubernetes.io/role/elb" = "1" | ||
}) | ||
private_subnet_tags = merge(local.tags, { | ||
"karpenter.sh/discovery" = var.cluster_name | ||
}) | ||
|
||
tags = local.tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.