From 12b67f3e1f6817de1e20d9adb3a94e8d3c74c2bb Mon Sep 17 00:00:00 2001 From: Brandon O'Connor Date: Wed, 11 Jul 2018 02:36:21 -0700 Subject: [PATCH 1/3] staging the 1.3.0 release. Will revisit the changelog --- CHANGELOG.md | 21 +++++++++++---------- README.md | 8 ++++---- local.tf | 3 +-- variables.tf | 8 ++++---- version | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe3786..b905aeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,23 +5,24 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [[v1.4.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.3.0...v1.4.0)] - 2018-07-12] +## [[v1.4.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.3.0...HEAD)] - 2018-07-??] + +### Added + +- Some excellent feature. (you're on fire, @me 🔥) + +### Changed + +- A very thoughtful change. (Boomshakalaka, @self 🏀) + +## [[v1.3.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.2.0...v1.3.0)] - 2018-07-11] ### Added - New variables `map_accounts`, `map_roles` and `map_users` in order to manage additional entries in the `aws-auth` configmap. (by @max-rocket-internet) - -## [[v1.3.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.2.0...v1.3.0)] - 2018-07-??] - -### Added - - kubelet_node_labels worker group option allows setting --node-labels= in kubelet. (Hat-tip, @bshelton229 👒) - `worker_iam_role_arn` added to outputs. Sweet, @hatemosphere 🔥 -### Changed - -- your excellent change. (Boomshakalaka, @self 🏀) - ## [[v1.2.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.1.0...v1.2.0)] - 2018-07-01] ### Added diff --git a/README.md b/README.md index 01bd300..45e6f36 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,9 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | cluster_security_group_id | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the workers and provide API access to your current IP/32. | string | `` | no | | cluster_version | Kubernetes version to use for the EKS cluster. | string | `1.10` | no | | config_output_path | Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory. | string | `./` | no | -| kubeconfig_aws_authenticator_additional_args | Any additional arguments to pass to the authenticator such as the role to assume ["-r", "MyEksRole"] | list | `` | no | -| kubeconfig_aws_authenticator_command | Command to use to to fetch AWS EKS credentials | string | `heptio-authenticator-aws` | no | -| kubeconfig_aws_authenticator_env_variables | Environment variables that should be used when executing the authenticator i.e. { AWS_PROFILE = "eks"} | map | `` | no | +| kubeconfig_aws_authenticator_additional_args | Any additional arguments to pass to the authenticator such as the role to assume. e.g. ["-r", "MyEksRole"]. | list | `` | no | +| kubeconfig_aws_authenticator_command | Command to use to to fetch AWS EKS credentials. | string | `aws-iam-authenticator` | no | +| kubeconfig_aws_authenticator_env_variables | Environment variables that should be used when executing the authenticator. e.g. { AWS_PROFILE = "eks"}. | map | `` | no | | kubeconfig_name | Override the default name used for items kubeconfig. | string | `` | no | | manage_aws_auth | Whether to write and apply the aws-auth configmap file. | string | `true` | no | | map_accounts | Additional AWS account numbers to add to the aws-auth configmap. See examples/eks_test_fixture/variables.tf for example format. | list | `` | no | @@ -127,7 +127,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | cluster_version | The Kubernetes server version for the EKS cluster. | | config_map_aws_auth | A kubernetes configuration to authenticate to this EKS cluster. | | kubeconfig | kubectl config file contents for this EKS cluster. | -| worker_iam_role_name | IAM role name attached to EKS workers | | worker_iam_role_arn | IAM role ID attached to EKS workers | +| worker_iam_role_name | IAM role name attached to EKS workers | | worker_security_group_id | Security group ID attached to the EKS workers. | | workers_asg_arns | IDs of the autoscaling groups containing workers. | diff --git a/local.tf b/local.tf index 9c87d73..87611ec 100644 --- a/local.tf +++ b/local.tf @@ -8,8 +8,7 @@ locals { worker_security_group_id = "${coalesce(join("", aws_security_group.workers.*.id), var.worker_security_group_id)}" workstation_external_cidr = "${chomp(data.http.workstation_external_ip.body)}/32" workstation_cidr = "${coalesce(var.workstation_cidr, local.workstation_external_cidr)}" - - kubeconfig_name = "${var.kubeconfig_name == "" ? "eks_${var.cluster_name}" : var.kubeconfig_name}" + kubeconfig_name = "${var.kubeconfig_name == "" ? "eks_${var.cluster_name}" : var.kubeconfig_name}" # Mapping from the node type that we selected and the max number of pods that it can run # Taken from https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/amazon-eks-nodegroup.yaml diff --git a/variables.tf b/variables.tf index fc80514..762a89a 100644 --- a/variables.tf +++ b/variables.tf @@ -8,7 +8,7 @@ variable "cluster_security_group_id" { } variable "workstation_cidr" { - description = "Override the default ingress rule that allows communication with the EKS cluster API. If not given, will use current IP/32. " + description = "Override the default ingress rule that allows communication with the EKS cluster API. If not given, will use current IP/32. " default = "" } @@ -105,18 +105,18 @@ variable "worker_sg_ingress_from_port" { } variable "kubeconfig_aws_authenticator_command" { - description = "Command to use to to fetch AWS EKS credentials" + description = "Command to use to to fetch AWS EKS credentials." default = "aws-iam-authenticator" } variable "kubeconfig_aws_authenticator_additional_args" { - description = "Any additional arguments to pass to the authenticator such as the role to assume [\"-r\", \"MyEksRole\"]" + description = "Any additional arguments to pass to the authenticator such as the role to assume. e.g. [\"-r\", \"MyEksRole\"]." type = "list" default = [] } variable "kubeconfig_aws_authenticator_env_variables" { - description = "Environment variables that should be used when executing the authenticator i.e. { AWS_PROFILE = \"eks\"}" + description = "Environment variables that should be used when executing the authenticator. e.g. { AWS_PROFILE = \"eks\"}." type = "map" default = {} } diff --git a/version b/version index 79127d8..18fa8e7 100644 --- a/version +++ b/version @@ -1 +1 @@ -v1.2.0 +v1.3.0 From 66e34033872cfbd9e406024f30effbeb54a14de1 Mon Sep 17 00:00:00 2001 From: Brandon O'Connor Date: Wed, 11 Jul 2018 23:32:48 -0700 Subject: [PATCH 2/3] test fixture produced an error for the path of kubectl being .// removed the extra slash to fix --- .gitignore | 4 ++-- aws_auth.tf | 4 ++-- kubectl.tf | 2 +- variables.tf | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8382e2a..9c5b19c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,8 @@ .kitchen.local.yml Gemfile.lock terraform.tfstate.d/ -kubeconfig -config-map-aws-auth.yaml eks-admin-cluster-role-binding.yaml eks-admin-service-account.yaml .idea/ +config-map-aws-auth*.yaml +kubeconfig_* diff --git a/aws_auth.tf b/aws_auth.tf index 6b19dbc..b0bbb32 100644 --- a/aws_auth.tf +++ b/aws_auth.tf @@ -1,12 +1,12 @@ resource "local_file" "config_map_aws_auth" { content = "${data.template_file.config_map_aws_auth.rendered}" - filename = "${var.config_output_path}/config-map-aws-auth_${var.cluster_name}.yaml" + filename = "${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml" count = "${var.manage_aws_auth ? 1 : 0}" } resource "null_resource" "update_config_map_aws_auth" { provisioner "local-exec" { - command = "kubectl apply -f ${var.config_output_path}/config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}/kubeconfig_${var.cluster_name}" + command = "kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name}" } triggers { diff --git a/kubectl.tf b/kubectl.tf index ec39963..e39cc8c 100644 --- a/kubectl.tf +++ b/kubectl.tf @@ -1,5 +1,5 @@ resource "local_file" "kubeconfig" { content = "${data.template_file.kubeconfig.rendered}" - filename = "${var.config_output_path}/kubeconfig_${var.cluster_name}" + filename = "${var.config_output_path}kubeconfig_${var.cluster_name}" count = "${var.write_kubeconfig ? 1 : 0}" } diff --git a/variables.tf b/variables.tf index 762a89a..45369c4 100644 --- a/variables.tf +++ b/variables.tf @@ -18,7 +18,7 @@ variable "cluster_version" { } variable "config_output_path" { - description = "Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory." + description = "Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory. Should end in a forward slash / ." default = "./" } From 69d7a3ce4a5d51c91569b078947efdbd10e3b1eb Mon Sep 17 00:00:00 2001 From: Brandon O'Connor Date: Wed, 11 Jul 2018 23:47:35 -0700 Subject: [PATCH 3/3] releasing 1.3.0 --- CHANGELOG.md | 8 ++++++-- README.md | 4 ++-- main.tf | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b905aeb..7e21051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,11 @@ project adheres to [Semantic Versioning](http://semver.org/). ### Added -- Some excellent feature. (you're on fire, @me 🔥) +- A tiny but mighty feature. (you're on fire, @me 🔥) ### Changed -- A very thoughtful change. (Boomshakalaka, @self 🏀) +- A subtle but thoughtful change. (Boomshakalaka, @self 🏀) ## [[v1.3.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.2.0...v1.3.0)] - 2018-07-11] @@ -23,6 +23,10 @@ project adheres to [Semantic Versioning](http://semver.org/). - kubelet_node_labels worker group option allows setting --node-labels= in kubelet. (Hat-tip, @bshelton229 👒) - `worker_iam_role_arn` added to outputs. Sweet, @hatemosphere 🔥 +### Changed + +- Worker subnets able to be specified as a dedicated list per autoscaling group. (up top, @bshelton229 🙏) + ## [[v1.2.0](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v1.1.0...v1.2.0)] - 2018-07-01] ### Added diff --git a/README.md b/README.md index 45e6f36..788c906 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Generate them like so: ```bash go get github.com/segmentio/terraform-docs -terraform-docs md ./ | cat -s | ghead -n -1 > README.md +terraform-docs md ./ | cat -s | tail -r | tail -n +2 | tail -r > README.md ``` ## Contributing @@ -97,7 +97,7 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a | cluster_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string | - | yes | | cluster_security_group_id | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the workers and provide API access to your current IP/32. | string | `` | no | | cluster_version | Kubernetes version to use for the EKS cluster. | string | `1.10` | no | -| config_output_path | Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory. | string | `./` | no | +| config_output_path | Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory. Should end in a forward slash / . | string | `./` | no | | kubeconfig_aws_authenticator_additional_args | Any additional arguments to pass to the authenticator such as the role to assume. e.g. ["-r", "MyEksRole"]. | list | `` | no | | kubeconfig_aws_authenticator_command | Command to use to to fetch AWS EKS credentials. | string | `aws-iam-authenticator` | no | | kubeconfig_aws_authenticator_env_variables | Environment variables that should be used when executing the authenticator. e.g. { AWS_PROFILE = "eks"}. | map | `` | no | diff --git a/main.tf b/main.tf index 085c0c4..4cdb012 100644 --- a/main.tf +++ b/main.tf @@ -64,7 +64,7 @@ * ```bash * go get github.com/segmentio/terraform-docs -* terraform-docs md ./ | cat -s | ghead -n -1 > README.md +* terraform-docs md ./ | cat -s | tail -r | tail -n +2 | tail -r > README.md * ``` * ## Contributing