Skip to content

Commit

Permalink
core components
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Istrati committed May 9, 2024
1 parent 655ba3d commit 197d46d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
32 changes: 19 additions & 13 deletions iac/core/eks_cluster/default.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
# SPDX-License-Identifier: MIT-0

q = {
name = "spf-eks-cluster"
version = "1.29"
public = true
private = true
admin = true
auth_mode = "API_AND_CONFIG_MAP"
addons = "vpc-cni,kube-proxy,eks-pod-identity-agent,coredns"
entry_type = "STANDARD"
groups = ""
access_type = "cluster"
namespaces = ""
log_types = "api,audit,authenticator,controllerManager,scheduler"
retention = 7
name = "spf-eks-cluster"
version = "1.29"
public = true
private = true
admin = true
ip_family = "ipv4"
ipv4_cidr = "172.20.0.0/16"
ipv6_cidr = null
auth_mode = "API_AND_CONFIG_MAP"
addons = "vpc-cni,kube-proxy,eks-pod-identity-agent,coredns"
addons_version = "v1.18.1-eksbuild.1,v1.29.1-eksbuild.2,v1.2.0-eksbuild.1,v1.11.1-eksbuild.8"
addons_create = "OVERWRITE"
addons_update = "PRESERVE"
entry_type = "STANDARD"
groups = ""
access_type = "cluster"
namespaces = ""
log_types = "api,audit,authenticator,controllerManager,scheduler"
retention = 7
}
14 changes: 9 additions & 5 deletions iac/core/eks_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ resource "aws_eks_cluster" "this" {
}

kubernetes_network_config {
ip_family = "ipv4"
service_ipv4_cidr = "172.20.0.0/16"
ip_family = var.q.ip_family
service_ipv4_cidr = var.q.ipv4_cidr
service_ipv6_cidr = var.q.ipv6_cidr
}

vpc_config {
Expand All @@ -27,9 +28,12 @@ resource "aws_eks_cluster" "this" {
}

resource "aws_eks_addon" "this" {
count = length(split(",", var.q.addons))
cluster_name = aws_eks_cluster.this.name
addon_name = element(split(",", var.q.addons), count.index)
count = length(split(",", var.q.addons))
cluster_name = aws_eks_cluster.this.name
addon_name = element(split(",", var.q.addons), count.index)
addon_version = element(split(",", var.q.addons_version), count.index)
resolve_conflicts_on_create = var.q.addons_create
resolve_conflicts_on_update = var.q.addons_update
}

resource "aws_eks_access_entry" "this" {
Expand Down

0 comments on commit 197d46d

Please sign in to comment.