diff --git a/README.md b/README.md index c82ecdf..88d6efc 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ module "eks_bootstrap" { eks_cluster_name = "cluster_name" reloader_enabled = true karpenter_enabled = true + private_subnet_ids = [""] single_az_sc_config = [{ name = "infra-service-sc", zone = "ap-south-1" }] kubeclarity_enabled = false kubeclarity_hostname = "" @@ -61,6 +62,14 @@ module "eks_bootstrap" { ``` +## Compatibility + +| Release | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 | +|------------------|------------------|------------------|----------------------| +| Release 1.0.0 | ✔ | ✗ | ✗ | +| Release 1.0.1 | ✔ | ✔ | ✔ | +| Release 1.1.0 | ✔ | ✔ | ✔ | + ## IAM Permissions The required IAM permissions to create resources from this module can be found [here](https://github.com/squareops/terraform-aws-eks-bootstrap/blob/main/IAM.md) @@ -201,7 +210,6 @@ Velero is designed to work with cloud native environments, making it a popular c | [kubernetes_namespace.internal_nginx](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource | | [aws_eks_cluster.eks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source | | [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | -| [aws_subnet_ids.private_subnet_ids](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet_ids) | data source | | [kubernetes_service.internal-nginx-ingress](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/service) | data source | | [kubernetes_service.nginx-ingress](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/service) | data source | @@ -242,6 +250,7 @@ Velero is designed to work with cloud native environments, making it a popular c | [metrics\_server\_helm\_version](#input\_metrics\_server\_helm\_version) | Version of the metrics server helm chart | `string` | `"3.8.2"` | no | | [name](#input\_name) | Specify the name prefix of the EKS cluster resources. | `string` | `""` | no | | [node\_termination\_handler\_version](#input\_node\_termination\_handler\_version) | Specify the version of node termination handler | `string` | `"0.21.0"` | no | +| [private\_subnet\_ids](#input\_private\_subnet\_ids) | Private subnets of the VPC which can be used by EFS | `list(string)` |
[
""
]
| no | | [reloader\_enabled](#input\_reloader\_enabled) | Enable or disable Reloader, a Kubernetes controller to watch changes in ConfigMap and Secret objects and trigger an application reload on their changes. | `bool` | `false` | no | | [service\_monitor\_crd\_enabled](#input\_service\_monitor\_crd\_enabled) | Enable or disable the installation of Custom Resource Definitions (CRDs) for Prometheus Service Monitor. | `bool` | `false` | no | | [single\_az\_ebs\_gp3\_storage\_class\_enabled](#input\_single\_az\_ebs\_gp3\_storage\_class\_enabled) | Whether to enable the Single AZ storage class or not. | `bool` | `false` | no | diff --git a/addons/karpenter_provisioner/karpenter-provisioner/templates/provisioner.yaml b/addons/karpenter_provisioner/karpenter-provisioner/templates/provisioner.yaml index b19fe91..8e54fa5 100644 --- a/addons/karpenter_provisioner/karpenter-provisioner/templates/provisioner.yaml +++ b/addons/karpenter_provisioner/karpenter-provisioner/templates/provisioner.yaml @@ -4,7 +4,7 @@ metadata: name: karpenter-provisioner spec: labels: - App-Services: "true" + Management-Services: "true" requirements: - key: karpenter.sh/capacity-type # optional, set to on-demand by default, spot if both are listed operator: In diff --git a/examples/complete/README.md b/examples/complete/README.md index bd55d53..1963b01 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -5,7 +5,8 @@ ### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey.
-Terraform module to create EKS cluster addons for workload deployment on AWS Cloud. +This example will be very useful for users who are new to a module and want to quickly learn how to use it. By reviewing the examples, users can gain a better understanding of how the module works, what features it supports, and how to customize it to their specific needs. +
## Requirements diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 3b89a48..d59f4ea 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -3,7 +3,7 @@ locals { environment = "prod" name = "addons" additional_tags = { - Owner = "SquareOps" + Owner = "Organization_Name" Expires = "Never" Department = "Engineering" } @@ -21,6 +21,7 @@ module "eks_bootstrap" { eks_cluster_name = "" reloader_enabled = true karpenter_enabled = true + private_subnet_ids = [""] single_az_sc_config = [{ name = "infra-service-sc", zone = "us-east-2a" }] kubeclarity_enabled = false kubeclarity_hostname = "" diff --git a/main.tf b/main.tf index 295ebec..a005a95 100644 --- a/main.tf +++ b/main.tf @@ -8,13 +8,6 @@ module "service_monitor_crd" { source = "./addons/service_monitor_crd" } -data "aws_subnet_ids" "private_subnet_ids" { - vpc_id = var.vpc_id # Replace with your VPC ID - tags = { - Subnet-group = "private" - } -} - resource "aws_iam_instance_profile" "karpenter_profile" { role = var.worker_iam_role_name name_prefix = var.eks_cluster_name @@ -177,7 +170,7 @@ module "efs" { region = data.aws_region.current.name environment = var.environment kms_key_id = var.kms_key_arn - private_subnet_ids = data.aws_subnet_ids.private_subnet_ids.ids + private_subnet_ids = var.private_subnet_ids } data "kubernetes_service" "nginx-ingress" { @@ -246,10 +239,10 @@ data "kubernetes_service" "internal-nginx-ingress" { } ##KUBECLARITY -resource "kubernetes_namespace" "internal_nginx" { +resource "kubernetes_namespace" "kube_clarity" { count = var.kubeclarity_enabled ? 1 : 0 metadata { - name = var.namespace + name = var.kubeclarity_namespace } } @@ -258,12 +251,12 @@ resource "helm_release" "kubeclarity" { name = "kubeclarity" chart = "kubeclarity" version = "2.18.0" - namespace = "kubeclarity" + namespace = var.kubeclarity_namespace repository = "https://openclarity.github.io/kubeclarity" values = [ templatefile("${path.module}/addons/kubeclarity/values.yaml", { hostname = var.kubeclarity_hostname - namespace = var.namespace + namespace = var.kubeclarity_namespace }) ] } diff --git a/outputs.tf b/outputs.tf index b1539cb..14d2f53 100644 --- a/outputs.tf +++ b/outputs.tf @@ -24,6 +24,6 @@ output "internal_nginx_ingress_controller_dns_hostname" { } output "kubeclarity_hostname" { - value = var.hostname + value = var.kubeclarity_hostname description = "Hostname for the kubeclarity." } diff --git a/variables.tf b/variables.tf index 4f6170b..46f0508 100644 --- a/variables.tf +++ b/variables.tf @@ -65,6 +65,12 @@ variable "efs_storage_class_enabled" { type = bool } +variable "private_subnet_ids" { + description = "Private subnets of the VPC which can be used by EFS" + default = [""] + type = list(string) +} + variable "keda_enabled" { description = "Enable or disable Kubernetes Event-driven Autoscaling (KEDA) add-on for autoscaling workloads." type = bool