Skip to content

Commit

Permalink
Merge pull request #129 from kloia/adjust-addons
Browse files Browse the repository at this point in the history
add rancher logging bootstrapper logic, and control logic for karpent…
  • Loading branch information
omerurhan authored Dec 25, 2023
2 parents 3b1e1b2 + 1d6a539 commit 2f138ad
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
24 changes: 21 additions & 3 deletions aws-eks-addons/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,24 @@ resource "kubectl_manifest" "argocd_bootstrapper_application" {
}
}
}
rancherLogging : {
enable: var.deploy_rancher_logging
values: {
fluentd: {
resources: {
limits: {
memory: var.rancher_logging_fluentd_memory_limit
cpu: var.rancher_logging_fluentd_cpu_limit
}
requests: {
memory: var.rancher_logging_fluentd_memory_request
cpu: var.rancher_logging_fluentd_cpu_request
}
}

}
}
}
})
}
}
Expand Down Expand Up @@ -593,7 +611,7 @@ resource "helm_release" "karpenter" {
}

resource "kubectl_manifest" "karpenter_stateful_provisioner" {
count = var.deploy_karpenter ? 1 : 0
count = var.deploy_karpenter && var.deploy_karpenter_crds ? 1 : 0

yaml_body = yamlencode({
apiVersion: "karpenter.sh/v1alpha5"
Expand Down Expand Up @@ -669,7 +687,7 @@ resource "kubectl_manifest" "karpenter_stateful_provisioner" {

# there is no taint necessary for stateless applicatinos (system workloads will be scheduled at default eks node group(it will have system workload taint ))
resource "kubectl_manifest" "karpenter_stateless_provisioner" {
count = var.deploy_karpenter ? 1 : 0
count = var.deploy_karpenter && var.deploy_karpenter_crds ? 1 : 0

yaml_body = yamlencode({
apiVersion: "karpenter.sh/v1alpha5"
Expand Down Expand Up @@ -728,7 +746,7 @@ resource "kubectl_manifest" "karpenter_stateless_provisioner" {
}

resource "kubectl_manifest" "karpenter_node_template" {
count = var.deploy_karpenter ? 1 : 0
count = var.deploy_karpenter && var.deploy_karpenter_crds ? 1 : 0
yaml_body = <<-YAML
apiVersion: karpenter.k8s.aws/v1alpha1
kind: AWSNodeTemplate
Expand Down
33 changes: 33 additions & 0 deletions aws-eks-addons/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,37 @@ variable "karpenter_version" {
variable "karpenter_windows_support" {
default = false
description = "Karpenter Windows Container Support"
}

variable "deploy_rancher_logging" {
default = false
description = "value of the rancher logging"
}

variable "rancher_logging_fluentd_memory_limit" {
default = "3000Mi"
description = "value of the rancher logging fluentd memory limit"
}

variable "rancher_logging_fluentd_cpu_limit" {
default = "3000m"
description = "value of the rancher logging fluentd cpu limit"
}


variable "rancher_logging_fluentd_memory_request" {
default = "2000Mi"
description = "value of the rancher logging fluentd memory request"

}

variable "rancher_logging_fluentd_cpu_request" {
default = "2000m"
description = "value of the rancher logging fluentd cpu request"
}


variable "deploy_karpenter_crds" {
default = true
description = "deploy provisioners and node template"
}

0 comments on commit 2f138ad

Please sign in to comment.