Skip to content

Commit

Permalink
Update versions (#2)
Browse files Browse the repository at this point in the history
* Update pre-commit

* Allow TF 0.13

Allow new aws provider

Allow new helm provider

* Change helm repo location

Update default chart version & apply breaking changes

* Fix example

* Fix example eks modules

* Update README
  • Loading branch information
dojci authored Sep 22, 2020
1 parent 17231f4 commit cb29c7b
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -58,7 +59,7 @@
}
],
"results": {},
"version": "0.13.1",
"version": "0.14.3",
"word_list": {
"file": null,
"hash": null
Expand Down
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## 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

Expand All @@ -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 |
Expand Down
6 changes: 3 additions & 3 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/basic/providers.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
provider "aws" {
version = "~> 2.0"
version = ">= 2.0, < 4.0"
region = "eu-central-1"
}

Expand All @@ -12,15 +12,15 @@ 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
load_config_file = false
}

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
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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"
}

Expand Down
7 changes: 4 additions & 3 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit cb29c7b

Please sign in to comment.