diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e5d618..947b2d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: git://github.com/antonbabenko/pre-commit-terraform - rev: v1.31.0 + rev: v1.39.0 hooks: - id: terraform_fmt - id: terraform_docs @@ -13,7 +13,7 @@ repos: - id: terraform-vars - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 + rev: v3.2.0 hooks: - id: check-merge-conflict - id: trailing-whitespace @@ -26,13 +26,13 @@ repos: - id: end-of-file-fixer - repo: https://github.com/gruntwork-io/pre-commit - rev: v0.1.9 + rev: v0.1.10 hooks: - id: tflint - id: terraform-validate - repo: https://github.com/Yelp/detect-secrets - rev: v0.13.1 + rev: v0.14.3 hooks: - id: detect-secrets args: diff --git a/.secrets.baseline b/.secrets.baseline index d4293c4..62fe8c6 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -1,9 +1,10 @@ { + "custom_plugin_paths": [], "exclude": { "files": null, "lines": null }, - "generated_at": "2020-07-07T15:04:21Z", + "generated_at": "2020-09-21T15:31:24Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -58,7 +59,7 @@ } ], "results": {}, - "version": "0.13.1", + "version": "0.14.3", "word_list": { "file": null, "hash": null diff --git a/README.md b/README.md index fd62a88..dc383b6 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,31 @@ We help companies build, run, deploy and scale software and infrastructure by em A terraform module to deploy the Cluster Autoscaler on Amazon EKS cluster. +## Related Projects + +Check out these related projects. + +- [terraform-aws-eks-external-dns](https://github.com/lablabs/terraform-aws-eks-external-dns) +- [terraform-aws-eks-calico](https://github.com/lablabs/terraform-aws-eks-calico) +- [terraform-aws-eks-alb-ingress](https://github.com/lablabs/terraform-aws-eks-alb-ingress) +- [terraform-aws-eks-metrics-server](https://github.com/lablabs/terraform-aws-eks-metrics-server) +- [terraform-aws-eks-prometheus-node-exporter](https://github.com/lablabs/terraform-aws-eks-prometheus-node-exporter) +- [terraform-aws-eks-kube-state-metrics](https://github.com/lablabs/terraform-aws-eks-kube-state-metrics) +- [terraform-aws-eks-node-problem-detector](https://github.com/lablabs/terraform-aws-eks-node-problem-detector) + + +## Examples + +See [Basic example](examples/basic/README.md) for further information. ## Requirements | Name | Version | |------|---------| -| terraform | ~> 0.12.0 | -| aws | ~> 2.0 | -| helm | ~> 1.2 | +| terraform | >= 0.12.26, < 0.14.0 | +| aws | >= 2.0, < 4.0 | +| helm | >= 1.0, < 1.4.0 | +| kubernetes | >=1.10.0 | ## Inputs @@ -30,10 +47,10 @@ A terraform module to deploy the Cluster Autoscaler on Amazon EKS cluster. | cluster\_identity\_oidc\_issuer\_arn | The OIDC Identity issuer ARN for the cluster that can be used to associate IAM roles with a service account | `string` | n/a | yes | | cluster\_name | The name of the cluster | `string` | n/a | yes | | enabled | Variable indicating whether deployment is enabled | `bool` | `true` | no | -| helm\_chart\_name | Helm chart name to be installed | `string` | `"cluster-autoscaler"` | no | -| helm\_chart\_version | Version of the Helm chart | `string` | `"7.3.4"` | no | +| helm\_chart\_name | Helm chart name to be installed | `string` | `"cluster-autoscaler-chart"` | no | +| helm\_chart\_version | Version of the Helm chart | `string` | `"1.0.3"` | no | | helm\_release\_name | Helm release name | `string` | `"cluster-autoscaler"` | no | -| helm\_repo\_url | Helm repository | `string` | `"https://kubernetes-charts.storage.googleapis.com"` | no | +| helm\_repo\_url | Helm repository | `string` | `"https://kubernetes.github.io/autoscaler"` | no | | k8s\_namespace | The K8s namespace in which the node-problem-detector service account has been created | `string` | `"cluster-autoscaler"` | no | | k8s\_service\_account\_name | The k8s cluster-autoscaler service account name | `string` | `"cluster-autoscaler"` | no | | mod\_dependency | Dependence variable binds all AWS resources allocated by this module, dependent modules reference this variable | `bool` | `null` | no | diff --git a/examples/basic/README.md b/examples/basic/README.md index a09c8b7..efe60a9 100644 --- a/examples/basic/README.md +++ b/examples/basic/README.md @@ -7,9 +7,9 @@ The code in this example shows how to use the module with basic configuration an | Name | Version | |------|---------| -| aws | ~> 2.0 | -| helm | ~> 1.0 | -| kubernetes | ~> 1.10 | +| aws | >= 2.0, < 4.0 | +| helm | >= 1.0, < 1.4.0 | +| kubernetes | >=1.10.0 | ## Inputs diff --git a/examples/basic/main.tf b/examples/basic/main.tf index 61ef983..04e1945 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -9,7 +9,9 @@ module "vpc" { } module "eks_cluster" { - source = "lablabs/eks-cluster/aws" + source = "cloudposse/eks-cluster/aws" + version = "0.28.0" + region = "eu-central-1" subnet_ids = module.vpc.public_subnets vpc_id = module.vpc.vpc_id @@ -20,8 +22,8 @@ module "eks_cluster" { } module "eks_workers" { - source = "lablabs/eks-workers/aws" - version = "0.11.0" + source = "cloudposse/eks-workers/aws" + version = "0.15.2" cluster_certificate_authority_data = module.eks_cluster.eks_cluster_certificate_authority_data cluster_endpoint = module.eks_cluster.eks_cluster_endpoint diff --git a/examples/basic/providers.tf b/examples/basic/providers.tf index 75786db..50ccf6e 100644 --- a/examples/basic/providers.tf +++ b/examples/basic/providers.tf @@ -1,5 +1,5 @@ provider "aws" { - version = "~> 2.0" + version = ">= 2.0, < 4.0" region = "eu-central-1" } @@ -12,7 +12,7 @@ data "aws_eks_cluster_auth" "this" { } provider "kubernetes" { - version = "~> 1.10" + version = ">=1.10.0" host = data.aws_eks_cluster.this.endpoint cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data) token = data.aws_eks_cluster_auth.this.token @@ -20,7 +20,7 @@ provider "kubernetes" { } provider "helm" { - version = "~> 1.0" + version = ">= 1.0, < 1.4.0" kubernetes { host = data.aws_eks_cluster.this.endpoint token = data.aws_eks_cluster_auth.this.token diff --git a/main.tf b/main.tf index dd4becb..864ac1b 100644 --- a/main.tf +++ b/main.tf @@ -35,7 +35,7 @@ resource "helm_release" "cluster_autoscaler" { } set { - name = "rbac.serviceAccountAnnotations.eks\\.amazonaws\\.com/role-arn" + name = "rbac.serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn" value = aws_iam_role.cluster_autoscaler[0].arn } diff --git a/variables.tf b/variables.tf index 17261e8..80f5dd2 100644 --- a/variables.tf +++ b/variables.tf @@ -27,13 +27,13 @@ variable "enabled" { variable "helm_chart_name" { type = string - default = "cluster-autoscaler" + default = "cluster-autoscaler-chart" description = "Helm chart name to be installed" } variable "helm_chart_version" { type = string - default = "7.3.4" + default = "1.0.3" description = "Version of the Helm chart" } @@ -45,7 +45,7 @@ variable "helm_release_name" { variable "helm_repo_url" { type = string - default = "https://kubernetes-charts.storage.googleapis.com" + default = "https://kubernetes.github.io/autoscaler" description = "Helm repository" } diff --git a/versions.tf b/versions.tf index 977bb5a..dfdd1fa 100644 --- a/versions.tf +++ b/versions.tf @@ -1,8 +1,9 @@ terraform { - required_version = "~> 0.12.0" + required_version = ">= 0.12.26, < 0.14.0" required_providers { - aws = "~> 2.0" - helm = "~> 1.2" + aws = ">= 2.0, < 4.0" + helm = ">= 1.0, < 1.4.0" + kubernetes = ">=1.10.0" } }