From 893ecdb6827d1156f24db77a198b9a672d26cb0e Mon Sep 17 00:00:00 2001 From: Andrej Krnac <6131252+adys@users.noreply.github.com> Date: Thu, 16 Jul 2020 12:32:40 +0200 Subject: [PATCH] Create the first cluster-autoscaler module version --- .github/workflows/main.yml | 93 +++++++++++++++++ .gitignore | 1 + .pre-commit-config.yaml | 40 +++++++ .secrets.baseline | 66 ++++++++++++ LICENSE | 201 ++++++++++++++++++++++++++++++++++++ README.md | 86 ++++++++++++++- examples/basic/README.md | 22 ++++ examples/basic/main.tf | 47 +++++++++ examples/basic/providers.tf | 29 ++++++ iam.tf | 84 +++++++++++++++ ll-logo.png | Bin 0 -> 12095 bytes main.tf | 49 +++++++++ variables.tf | 75 ++++++++++++++ versions.tf | 8 ++ 14 files changed, 800 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 .secrets.baseline create mode 100644 LICENSE create mode 100644 examples/basic/README.md create mode 100644 examples/basic/main.tf create mode 100644 examples/basic/providers.tf create mode 100644 iam.tf create mode 100644 ll-logo.png create mode 100644 main.tf create mode 100644 variables.tf create mode 100644 versions.tf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..fbfa584 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,93 @@ +name: Terraform validation + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + TERRAFORM_DOCS_VERSION: "v0.9.1" + TFLINT_VERSION: "v0.16.2" + +jobs: + terraform-validation: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@v1 + name: "SETUP: Python" + + - uses: actions/setup-go@v2 + name: "SETUP: Go" + + - uses: pat-s/always-upload-cache@v2.0.0 + id: cache-terraform-docs + name: "CACHE: terraform-docs Go module" + with: + path: | + ~/go/pkg/mod + ~/go/bin/terraform-docs + key: ${{ runner.os }}-terraform_docs-${{ env.TERRAFORM_DOCS_VERSION }} + restore-keys: | + ${{ runner.os}}-terraform_docs- + + - shell: bash + name: "INSTALL: terraform-docs" + if: steps.cache-terraform-docs.output.cache-hit != 'true' + env: + GO111MODULE: "on" + run: | + go get github.com/segmentio/terraform-docs@${{ env.TERRAFORM_DOCS_VERSION }} + + - shell: bash + name: "SETUP: Go path" + run: echo '::add-path::~/go/bin/' + + - uses: actions/checkout@v1 + name: Checkout source code + + - uses: pat-s/always-upload-cache@v2.0.0 + id: cache-pre-commit-dependencies + name: "CACHE: pip and pre-commit dependencies" + with: + path: | + ~/.cache/pre-commit + ~/.cache/pip + key: ${{ runner.os }}-pip-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + ${{ runner.os }}-pip-pre-commit- + + - uses: pat-s/always-upload-cache@v2.0.0 + id: cache-tflint + name: "CACHE: TFLint" + with: + path: | + ~/tflint/bin/ + key: ${{ runner.os }}-tflint-${{ env.TFLINT_VERSION }} + restore-keys: | + ${{ runner.os }}-tflint- + + - shell: bash + name: "INSTALL: detect-secrets" + run: | + pip install detect-secrets + + - shell: bash + name: "INSTALL: TFLint" + if: steps.cache-tflint.outputs.cache-hit != 'true' + run: | + wget https://github.com/terraform-linters/tflint/releases/download/${{ env.TFLINT_VERSION }}/tflint_linux_amd64.zip + unzip tflint_linux_amd64.zip + mkdir -p ~/tflint/bin/ + install tflint ~/tflint/bin/ + + - shell: bash + name: "SETUP: TFLint path" + run: | + echo '::add-path::~/tflint/bin/' + + - uses: pre-commit/action@v2.0.0 + name: "RUN: pre-commit" + env: + AWS_DEFAULT_REGION: "eu-central-1" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fa8c86 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.terraform diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..4e5d618 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,40 @@ +repos: + - repo: git://github.com/antonbabenko/pre-commit-terraform + rev: v1.31.0 + hooks: + - id: terraform_fmt + - id: terraform_docs + args: + - '--args=--no-providers --sort-by-required' + + - repo: git://github.com/pecigonzalo/pre-commit-terraform-vars + rev: 8e947e99c45314397a8caacebefab44d74227b6b + hooks: + - id: terraform-vars + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.1.0 + hooks: + - id: check-merge-conflict + - id: trailing-whitespace + - id: check-yaml + - id: check-added-large-files + - id: detect-aws-credentials + args: + - '--allow-missing-credentials' + - id: detect-private-key + - id: end-of-file-fixer + + - repo: https://github.com/gruntwork-io/pre-commit + rev: v0.1.9 + hooks: + - id: tflint + - id: terraform-validate + + - repo: https://github.com/Yelp/detect-secrets + rev: v0.13.1 + hooks: + - id: detect-secrets + args: + - '--baseline' + - '.secrets.baseline' diff --git a/.secrets.baseline b/.secrets.baseline new file mode 100644 index 0000000..d4293c4 --- /dev/null +++ b/.secrets.baseline @@ -0,0 +1,66 @@ +{ + "exclude": { + "files": null, + "lines": null + }, + "generated_at": "2020-07-07T15:04:21Z", + "plugins_used": [ + { + "name": "AWSKeyDetector" + }, + { + "name": "ArtifactoryDetector" + }, + { + "base64_limit": 4.5, + "name": "Base64HighEntropyString" + }, + { + "name": "BasicAuthDetector" + }, + { + "name": "CloudantDetector" + }, + { + "hex_limit": 3, + "name": "HexHighEntropyString" + }, + { + "name": "IbmCloudIamDetector" + }, + { + "name": "IbmCosHmacDetector" + }, + { + "name": "JwtTokenDetector" + }, + { + "keyword_exclude": null, + "name": "KeywordDetector" + }, + { + "name": "MailchimpDetector" + }, + { + "name": "PrivateKeyDetector" + }, + { + "name": "SlackDetector" + }, + { + "name": "SoftlayerDetector" + }, + { + "name": "StripeDetector" + }, + { + "name": "TwilioKeyDetector" + } + ], + "results": {}, + "version": "0.13.1", + "word_list": { + "file": null, + "hash": null + } +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f6f1438 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2020] [Labyrinth Labs] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index aa38653..fd62a88 100644 --- a/README.md +++ b/README.md @@ -1 +1,85 @@ -# terraform-aws-eks-cluster-autoscaler \ No newline at end of file +# AWS EKS cluster autoscaler Terraform module + +[![labyrinth labs logo](ll-logo.png)](https://lablabs.io/) + +We help companies build, run, deploy and scale software and infrastructure by embracing the right technologies and principles. Check out our website at https://lablabs.io/ + +--- + +![Terraform validation](https://github.com/lablabs/terraform-aws-eks-node-problem-detector/workflows/Terraform%20validation/badge.svg?branch=master) +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-success?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) + +## Description + +A terraform module to deploy the Cluster Autoscaler on Amazon EKS cluster. + + +## Requirements + +| Name | Version | +|------|---------| +| terraform | ~> 0.12.0 | +| aws | ~> 2.0 | +| helm | ~> 1.2 | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| cluster\_identity\_oidc\_issuer | The OIDC Identity issuer for the cluster | `string` | n/a | yes | +| 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\_release\_name | Helm release name | `string` | `"cluster-autoscaler"` | no | +| helm\_repo\_url | Helm repository | `string` | `"https://kubernetes-charts.storage.googleapis.com"` | 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 | +| settings | Additional settings which will be passed to the Helm chart values, see https://hub.helm.sh/charts/stable/cluster-autoscaler | `map(any)` | `{}` | no | + +## Outputs + +No output. + + + +## Contributing and reporting issues + +Feel free to create an issue in this repository if you have questions, suggestions or feature requests. + +### Validation, linters and pull-requests + +We want to provide high quality code and modules. For this reason we are using +several [pre-commit hooks](.pre-commit-config.yaml) and +[GitHub Actions workflow](.github/workflows/main.yml). A pull-request to the +master branch will trigger these validations and lints automatically. Please +check your code before you will create pull-requests. See +[pre-commit documentation](https://pre-commit.com/) and +[GitHub Actions documentation](https://docs.github.com/en/actions) for further +details. + + +## License + +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) + +See [LICENSE](LICENSE) for full details. + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. diff --git a/examples/basic/README.md b/examples/basic/README.md new file mode 100644 index 0000000..a09c8b7 --- /dev/null +++ b/examples/basic/README.md @@ -0,0 +1,22 @@ +# Basic example + +The code in this example shows how to use the module with basic configuration and minimal set of other resources. + + +## Requirements + +| Name | Version | +|------|---------| +| aws | ~> 2.0 | +| helm | ~> 1.0 | +| kubernetes | ~> 1.10 | + +## Inputs + +No input. + +## Outputs + +No output. + + diff --git a/examples/basic/main.tf b/examples/basic/main.tf new file mode 100644 index 0000000..a5a8ce0 --- /dev/null +++ b/examples/basic/main.tf @@ -0,0 +1,47 @@ +module "vpc" { + source = "terraform-aws-modules/vpc/aws" + + name = "cluster-autoscaler-vpc" + cidr = "10.0.0.0/16" + azs = ["eu-central-1a", "eu-central-1b"] + public_subnets = ["10.0.101.0/24", "10.0.102.0/24"] + enable_nat_gateway = true +} + +module "eks_cluster" { + source = "lablabs/eks-cluster/aws" + region = "eu-central-1" + subnet_ids = module.vpc.public_subnets + vpc_id = module.vpc.vpc_id + name = "cluster-autoscaler" + + workers_security_group_ids = [module.eks_workers.security_group_id] + workers_role_arns = [module.eks_workers.workers_role_arn] +} + +module "eks_workers" { + source = "lablabs/eks-workers/aws" + version = "0.11.0" + + cluster_certificate_authority_data = module.eks_cluster.eks_cluster_certificate_authority_data + cluster_endpoint = module.eks_cluster.eks_cluster_endpoint + cluster_name = module.eks_cluster.eks_cluster_id + cluster_security_group_id = module.eks_cluster.security_group_id + instance_type = "t3.medium" + max_size = 1 + min_size = 1 + subnet_ids = module.vpc.public_subnets + vpc_id = module.vpc.vpc_id + + associate_public_ip_address = true +} + +# Use the module: + +module "node_problem_detector" { + source = "../../" + + cluster_name = module.eks_cluster.eks_cluster_id + cluster_identity_oidc_issuer = module.eks_cluster.eks_cluster_identity_oidc_issuer + cluster_identity_oidc_issuer_arn = module.eks_cluster.eks_cluster_identity_oidc_issuer_arn +} diff --git a/examples/basic/providers.tf b/examples/basic/providers.tf new file mode 100644 index 0000000..75786db --- /dev/null +++ b/examples/basic/providers.tf @@ -0,0 +1,29 @@ +provider "aws" { + version = "~> 2.0" + region = "eu-central-1" +} + +data "aws_eks_cluster" "this" { + name = module.eks_cluster.eks_cluster_id +} + +data "aws_eks_cluster_auth" "this" { + name = module.eks_cluster.eks_cluster_id +} + +provider "kubernetes" { + version = "~> 1.10" + 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" + kubernetes { + host = data.aws_eks_cluster.this.endpoint + token = data.aws_eks_cluster_auth.this.token + cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data) + } +} diff --git a/iam.tf b/iam.tf new file mode 100644 index 0000000..fbdb763 --- /dev/null +++ b/iam.tf @@ -0,0 +1,84 @@ +resource "kubernetes_namespace" "cluster_autoscaler" { + depends_on = [var.mod_dependency] + count = (var.enabled && var.k8s_namespace != "kube-system") ? 1 : 0 + + metadata { + name = var.k8s_namespace + } +} + +### iam ### +# Policy +data "aws_iam_policy_document" "cluster_autoscaler" { + count = var.enabled ? 1 : 0 + + statement { + sid = "Autoscaling" + + actions = [ + "autoscaling:DescribeAutoScalingGroups", + "autoscaling:DescribeAutoScalingInstances", + "autoscaling:DescribeLaunchConfigurations", + "autoscaling:DescribeTags", + "autoscaling:SetDesiredCapacity", + "autoscaling:TerminateInstanceInAutoScalingGroup", + "ec2:DescribeLaunchTemplateVersions" + ] + + resources = [ + "*", + ] + + effect = "Allow" + } + +} + +resource "aws_iam_policy" "cluster_autoscaler" { + depends_on = [var.mod_dependency] + count = var.enabled ? 1 : 0 + name = "${var.cluster_name}-cluster-autoscaler" + path = "/" + description = "Policy for cluster-autoscaler service" + + policy = data.aws_iam_policy_document.cluster_autoscaler[0].json +} + +# Role +data "aws_iam_policy_document" "cluster_autoscaler_assume" { + count = var.enabled ? 1 : 0 + + statement { + actions = ["sts:AssumeRoleWithWebIdentity"] + + principals { + type = "Federated" + identifiers = [var.cluster_identity_oidc_issuer_arn] + } + + condition { + test = "StringEquals" + variable = "${replace(var.cluster_identity_oidc_issuer, "https://", "")}:sub" + + values = [ + "system:serviceaccount:${var.k8s_namespace}:${var.k8s_service_account_name}", + ] + } + + effect = "Allow" + } +} + +resource "aws_iam_role" "cluster_autoscaler" { + depends_on = [var.mod_dependency] + count = var.enabled ? 1 : 0 + name = "${var.cluster_name}-cluster-autoscaler" + assume_role_policy = data.aws_iam_policy_document.cluster_autoscaler_assume[0].json +} + +resource "aws_iam_role_policy_attachment" "cluster_autoscaler" { + depends_on = [var.mod_dependency] + count = var.enabled ? 1 : 0 + role = aws_iam_role.cluster_autoscaler[0].name + policy_arn = aws_iam_policy.cluster_autoscaler[0].arn +} diff --git a/ll-logo.png b/ll-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8aa2c6a4997fbdcf7009e089b2d07ad4a89218a6 GIT binary patch literal 12095 zcmbVxWl$YF(C)##xVsmJ;!xbRc#FHcyL)l>!ol6$DeiFK;O_3Ox9^Yp^WOR9o6KgC zooqIf+0E?pBvMIH3I&k>5dZ+7$ViK;000nr|He`9kpKGPNi$Ob04>c+?U##+p*xv_ zlf9XxjVYOnr-Lb(sfVQ*0N}9#&d_eAEOQFm#19PzK%=n|kr^;e_x3;HN~@QgxU~3s zE&Dl?H5cZ{QYSb*vz$46>~7jWaet)D%YIe&CajY9NKuyj(|LS-Yu|Z@HSX>AdGg#X z*F%cx>)VseOVv4c_%kPWk%L$7^E#B&y72z>dZs6L@1twxF_;t=OP}|4$PXoP_u2V- z%4O)#bEjp&X$`RY&2xPdQ~&E`ZpUqh-up((CyAecQZl2aDf#HLbmG&WS6ayDH+etA zX&KnV>tlY3K-`3fn2?Y+H*X<5<2O!`9_r`ej;rZq`}^sn+`~uY=MtS}`&f_L64Jt# z!%=^_4^zWueC3aKsB-5|2Y#VMpQ=r7L3eIB%7XJ%Wwy7Gsqqg^klvne)wPlz{pGy? zY#fRCTJqXXY}BwKrD?g782uX|9doAC#*QofhctHuGFy47 z=^fHjdeOC@2gZ9pRcI&Sl2LEUHPjI;ZA^OGopZvX1oBRFWt@V$bh93KG z84X{h+c(?6X|UK}p3I)6tezSfI5URK*^t9&X04%S(w(Er*?E%b)vz{FRL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main.tf @@ -0,0 +1,49 @@ +data "aws_region" "current" {} + +resource "helm_release" "cluster_autoscaler" { + depends_on = [var.mod_dependency] + count = var.enabled ? 1 : 0 + chart = var.helm_chart_name + namespace = var.k8s_namespace + name = var.helm_release_name + version = var.helm_chart_version + repository = var.helm_repo_url + + set { + name = "awsRegion" + value = data.aws_region.current.name + } + + set { + name = "autoDiscovery.clusterName" + value = var.cluster_name + } + + set { + name = "rbac.create" + value = "true" + } + + set { + name = "rbac.serviceAccount.create" + value = "true" + } + + set { + name = "rbac.serviceAccount.name" + value = var.k8s_service_account_name + } + + set { + name = "rbac.serviceAccountAnnotations.eks\\.amazonaws\\.com/role-arn" + value = aws_iam_role.cluster_autoscaler[0].arn + } + + dynamic "set" { + for_each = var.settings + content { + name = set.key + value = set.value + } + } +} diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..17261e8 --- /dev/null +++ b/variables.tf @@ -0,0 +1,75 @@ +# Required module inputs + +variable "cluster_name" { + type = string + description = "The name of the cluster" +} + +variable "cluster_identity_oidc_issuer" { + type = string + description = "The OIDC Identity issuer for the cluster" +} + +variable "cluster_identity_oidc_issuer_arn" { + type = string + description = "The OIDC Identity issuer ARN for the cluster that can be used to associate IAM roles with a service account" +} + +# cluster-autoscaler + +variable "enabled" { + type = bool + default = true + description = "Variable indicating whether deployment is enabled" +} + +# Helm + +variable "helm_chart_name" { + type = string + default = "cluster-autoscaler" + description = "Helm chart name to be installed" +} + +variable "helm_chart_version" { + type = string + default = "7.3.4" + description = "Version of the Helm chart" +} + +variable "helm_release_name" { + type = string + default = "cluster-autoscaler" + description = "Helm release name" +} + +variable "helm_repo_url" { + type = string + default = "https://kubernetes-charts.storage.googleapis.com" + description = "Helm repository" +} + +# K8s + +variable "k8s_namespace" { + type = string + default = "cluster-autoscaler" + description = "The K8s namespace in which the node-problem-detector service account has been created" +} + +variable "k8s_service_account_name" { + default = "cluster-autoscaler" + description = "The k8s cluster-autoscaler service account name" +} + +variable "mod_dependency" { + type = bool + default = null + description = "Dependence variable binds all AWS resources allocated by this module, dependent modules reference this variable" +} + +variable "settings" { + type = map(any) + default = {} + description = "Additional settings which will be passed to the Helm chart values, see https://hub.helm.sh/charts/stable/cluster-autoscaler" +} diff --git a/versions.tf b/versions.tf new file mode 100644 index 0000000..977bb5a --- /dev/null +++ b/versions.tf @@ -0,0 +1,8 @@ +terraform { + required_version = "~> 0.12.0" + + required_providers { + aws = "~> 2.0" + helm = "~> 1.2" + } +}