Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: windows node pool creation #1313

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions infrastructure/quick-deploy/aws/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ module "eks" {
cluster_endpoint_public_access_cidrs = var.eks.cluster_endpoint_public_access_cidrs
cluster_log_retention_in_days = var.eks.cluster_log_retention_in_days

map_roles_groups = var.eks.map_roles
map_users_groups = var.eks.map_users
eks_managed_node_groups = var.eks_managed_node_groups
self_managed_node_groups = var.self_managed_node_groups
fargate_profiles = var.fargate_profiles
Expand Down
77 changes: 67 additions & 10 deletions infrastructure/quick-deploy/aws/parameters.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ eks = {
cluster_version = "1.25"
node_selector = { service = "monitoring" }
cluster_endpoint_public_access = true
map_roles = []
map_users = []
cluster_addons = {
vpc-cni = {
most_recent = true
}
}
}

# List of EKS managed node groups
Expand Down Expand Up @@ -188,6 +191,35 @@ eks_managed_node_groups = {
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}
# Node group for windows
windows = {
name = "windows"
launch_template_description = "Node group for ArmoniK windows based pods"
ami_type = "WINDOWS_CORE_2022_x86_64"
instance_types = ["c5.large"]
capacity_type = "ON_DEMAND"
min_size = 1
desired_size = 1
max_size = 10
labels = {
service = "windows"
"node.kubernetes.io/lifecycle" = "ondemand"
}
taints = {
dedicated = {
key = "service"
value = "windows"
effect = "NO_SCHEDULE"
}
}
iam_role_use_name_prefix = false
iam_role_additional_policies = {
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
AmazonEKSClusterPolicy = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"
AmazonEKSVPCResourceController = "arn:aws:iam::aws:policy/AmazonEKSVPCResourceController"

}
}
}

# List of self managed node groups
Expand All @@ -196,8 +228,8 @@ self_managed_node_groups = {
name = "others"
launch_template_description = "Node group for others"
instance_type = "c5.large"
min_size = 0
desired_size = 0
min_size = 1
desired_size = 1
max_size = 5
force_delete = true
force_delete_warm_pool = true
Expand Down Expand Up @@ -240,6 +272,7 @@ self_managed_node_groups = {
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}

}

# List of fargate profiles
Expand All @@ -262,7 +295,7 @@ elasticache = {
num_cache_clusters = 2
}

#s3_os = {}
# s3_os = {}

mq = {
engine_type = "ActiveMQ"
Expand Down Expand Up @@ -300,7 +333,11 @@ grafana = {
}

node_exporter = {
node_selector = {}
node_selector = {
"service" = "windows"
"kubernetes.io/os" = "windows"
"kubernetes.io/arch" = "amd64"
}
}

prometheus = {
Expand Down Expand Up @@ -334,14 +371,20 @@ metrics_exporter = {

fluent_bit = {
is_daemonset = true
image_tag = "windows-2022-3.0.4"
node_selector = {}
}

upload_images = false

# Logging level
logging_level = "Information"
logging_level = "Debug"

# Parameters of control plane
control_plane = {
image = "dockerhubaneo/armonik_control"
tag = "0.25.0-jgx509store.117.75589619"
#image_pull_policy = "Always"
limits = {
cpu = "1000m"
memory = "2048Mi"
Expand All @@ -351,7 +394,12 @@ control_plane = {
memory = "500Mi"
}
default_partition = "default"
node_selector = { service = "control-plane" }
node_selector = {
#service = "control-plane"
service = "windows"
"kubernetes.io/os" = "windows"
"kubernetes.io/arch" = "amd64"
}
}

# Parameters of admin GUI
Expand All @@ -371,11 +419,14 @@ admin_gui = {
compute_plane = {
# Default partition that uses the C# extension for the worker
default = {
node_selector = { service = "workers" }
node_selector = {
service = "workers"
}
# number of replicas for each deployment of compute plane
replicas = 1
# ArmoniK polling agent
polling_agent = {
#tag = "0.25.0-jgwinimages.41.9cc8c34a"
limits = {
cpu = "2000m"
memory = "2048Mi"
Expand Down Expand Up @@ -473,11 +524,16 @@ compute_plane = {
},
# Partition for the htcmock worker
htcmock = {
node_selector = { service = "workers" }
node_selector = {
"service" = "windows"
"kubernetes.io/os" = "windows"
"kubernetes.io/arch" = "amd64"
}
# number of replicas for each deployment of compute plane
replicas = 1
# ArmoniK polling agent
polling_agent = {
tag = "0.25.0-jgx509store.117.75589619"
limits = {
cpu = "2000m"
memory = "2048Mi"
Expand All @@ -491,6 +547,7 @@ compute_plane = {
worker = [
{
image = "dockerhubaneo/armonik_core_htcmock_test_worker"
tag = "0.25.0-jgx509store.117.75589619"
limits = {
cpu = "1000m"
memory = "1024Mi"
Expand Down
10 changes: 0 additions & 10 deletions infrastructure/quick-deploy/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,6 @@ variable "eks" {
repository = optional(string)
version = optional(string)
}), {})
map_roles = optional(list(object({
rolearn = string
username = string
groups = list(string)
})), [])
map_users = optional(list(object({
userarn = string
username = string
groups = list(string)
})), [])
})
}

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/quick-deploy/aws/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.4.0"
version = "~> 5.61"
}
null = {
source = "hashicorp/null"
Expand Down
Loading