Skip to content

Commit 8b2e1c2

Browse files
Replacing enable_docker_bridge with a generic option called bootstrap_extra_args (#320)
* Replacing enable_docker_bridge with a generic option called bootstrap_extra_args * making breaking change more obvious
1 parent 806edb6 commit 8b2e1c2

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ project adheres to [Semantic Versioning](http://semver.org/).
1212
### Added
1313

1414
- Added support for eks public and private endpoints (by @stijndehaes)
15-
- Write your awesome addition here (by @you)
1615
- Added minimum inbound traffic rule to the cluster worker security group as per the [EKS security group requirements](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) (by @sc250024)
1716

1817
### Changed
1918

20-
- Write your awesome change here (by @you)
19+
- (Breaking Change) Replaced `enable_docker_bridge` with a generic option called `bootstrap_extra_args` to resolve [310](https://github.com/terraform-aws-modules/terraform-aws-eks/issues/310) (by @max-rocket-internet)
2120

2221
# History
2322

@@ -33,6 +32,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
3332
- Added output for generated kubeconfig filename (by @syst0m)
3433
- Added outputs for cluster role ARN and name (by @spingel)
3534
- Added optional name filter variable to be able to pin worker AMI to a release (by @max-rocket-internet)
35+
- Added `--enable-docker-bridge` option for bootstrap.sh in AMI (by @michaelmccord)
3636

3737
## [[v2.2.2](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v2.2.1...v2.2.2)] - 2019-02-25]
3838

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,13 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
113113
| cluster\_create\_security\_group | Whether to create a security group for the cluster or attach the cluster to `cluster_security_group_id`. | string | `"true"` | no |
114114
| cluster\_create\_timeout | Timeout value when creating the EKS cluster. | string | `"15m"` | no |
115115
| cluster\_delete\_timeout | Timeout value when deleting the EKS cluster. | string | `"15m"` | no |
116+
| cluster\_endpoint\_private\_access | Indicates whether or not the Amazon EKS private API server endpoint is enabled. | string | `"false"` | no |
117+
| cluster\_endpoint\_public\_access | Indicates whether or not the Amazon EKS public API server endpoint is enabled. | string | `"true"` | no |
116118
| cluster\_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string | n/a | yes |
117119
| 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 |
118120
| cluster\_version | Kubernetes version to use for the EKS cluster. | string | `"1.11"` | no |
119121
| config\_output\_path | Where to save the Kubectl config file (if `write_kubeconfig = true`). Should end in a forward slash `/` . | string | `"./"` | no |
122+
| iam\_path | If provided, all IAM roles will be created on this path. | string | `"/"` | no |
120123
| 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 |
121124
| kubeconfig\_aws\_authenticator\_command | Command to use to fetch AWS EKS credentials. | string | `"aws-iam-authenticator"` | no |
122125
| kubeconfig\_aws\_authenticator\_command\_args | Default arguments passed to the authenticator command. Defaults to [token -i $cluster_name]. | list | `[]` | no |
@@ -145,11 +148,12 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
145148
| worker\_groups\_launch\_template | A list of maps defining worker group configurations to be defined using AWS Launch Templates. See workers_group_defaults for valid keys. | list | `[ { "name": "default" } ]` | no |
146149
| worker\_security\_group\_id | If provided, all workers will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the EKS cluster. | string | `""` | no |
147150
| worker\_sg\_ingress\_from\_port | Minimum port number from which pods will accept communication. Must be changed to a lower value if some pods in your cluster will expose a port lower than 1025 (e.g. 22, 80, or 443). | string | `"1025"` | no |
151+
| workers\_additional\_policies | Additional policies to be added to workers | list | `[]` | no |
152+
| workers\_additional\_policies\_count | | string | `"0"` | no |
148153
| workers\_group\_defaults | Override default values for target groups. See workers_group_defaults_defaults in local.tf for valid keys. | map | `{}` | no |
149154
| workers\_group\_launch\_template\_defaults | Override default values for target groups. See workers_group_defaults_defaults in local.tf for valid keys. | map | `{}` | no |
150155
| write\_aws\_auth\_config | Whether to write the aws-auth configmap file. | string | `"true"` | no |
151156
| write\_kubeconfig | Whether to write a Kubectl config file containing the cluster configuration. Saved to `config_output_path`. | string | `"true"` | no |
152-
| iam\_path | If provided, all IAM roles will be created with path. | string | `"/"` | no |
153157
154158
## Outputs
155159

data.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ data "template_file" "userdata" {
8181
cluster_auth_base64 = "${aws_eks_cluster.this.certificate_authority.0.data}"
8282
pre_userdata = "${lookup(var.worker_groups[count.index], "pre_userdata", local.workers_group_defaults["pre_userdata"])}"
8383
additional_userdata = "${lookup(var.worker_groups[count.index], "additional_userdata", local.workers_group_defaults["additional_userdata"])}"
84-
enable_docker_bridge = "${lookup(var.worker_groups[count.index], "enable_docker_bridge", local.workers_group_defaults["enable_docker_bridge"])}"
84+
bootstrap_extra_args = "${lookup(var.worker_groups[count.index], "bootstrap_extra_args", local.workers_group_defaults["bootstrap_extra_args"])}"
8585
kubelet_extra_args = "${lookup(var.worker_groups[count.index], "kubelet_extra_args", local.workers_group_defaults["kubelet_extra_args"])}"
8686
}
8787
}
@@ -96,7 +96,7 @@ data "template_file" "launch_template_userdata" {
9696
cluster_auth_base64 = "${aws_eks_cluster.this.certificate_authority.0.data}"
9797
pre_userdata = "${lookup(var.worker_groups_launch_template[count.index], "pre_userdata", local.workers_group_launch_template_defaults["pre_userdata"])}"
9898
additional_userdata = "${lookup(var.worker_groups_launch_template[count.index], "additional_userdata", local.workers_group_launch_template_defaults["additional_userdata"])}"
99-
enable_docker_bridge = "${lookup(var.worker_groups_launch_template[count.index], "enable_docker_bridge", local.workers_group_launch_template_defaults["enable_docker_bridge"])}"
99+
bootstrap_extra_args = "${lookup(var.worker_groups_launch_template[count.index], "bootstrap_extra_args", local.workers_group_launch_template_defaults["bootstrap_extra_args"])}"
100100
kubelet_extra_args = "${lookup(var.worker_groups_launch_template[count.index], "kubelet_extra_args", local.workers_group_launch_template_defaults["kubelet_extra_args"])}"
101101
}
102102
}

local.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ locals {
2424
root_iops = "0" # The amount of provisioned IOPS. This must be set with a volume_type of "io1".
2525
key_name = "" # The key name that should be used for the instances in the autoscaling group
2626
pre_userdata = "" # userdata to pre-append to the default userdata.
27-
enable_docker_bridge = "false" # --enable-docker-bridge bootstrap.sh arg
27+
bootstrap_extra_args = "" # Extra arguments passed to the bootstrap.sh script from the EKS AMI.
2828
additional_userdata = "" # userdata to append to the default userdata.
2929
ebs_optimized = true # sets whether to use ebs optimization on supported types.
3030
enable_monitoring = true # Enables/disables detailed monitoring.
@@ -68,7 +68,7 @@ locals {
6868
kms_key_id = "" # KMS key ID used for encrypted block device. ASG must have access to this key. If not specified, the default KMS key will be used.
6969
key_name = "" # The key name that should be used for the instances in the autoscaling group
7070
pre_userdata = "" # userdata to pre-append to the default userdata.
71-
enable_docker_bridge = "false" # --enable-docker-bridge bootstrap.sh arg
71+
bootstrap_extra_args = "" # Extra arguments passed to the bootstrap.sh script from the EKS AMI.
7272
additional_userdata = "" # userdata to append to the default userdata.
7373
ebs_optimized = true # sets whether to use ebs optimization on supported types.
7474
enable_monitoring = true # Enables/disables detailed monitoring.

templates/userdata.sh.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
${pre_userdata}
55

66
# Bootstrap and join the cluster
7-
/etc/eks/bootstrap.sh --b64-cluster-ca '${cluster_auth_base64}' --apiserver-endpoint '${endpoint}' --enable-docker-bridge '${enable_docker_bridge}' --kubelet-extra-args '${kubelet_extra_args}' '${cluster_name}'
7+
/etc/eks/bootstrap.sh --b64-cluster-ca '${cluster_auth_base64}' --apiserver-endpoint '${endpoint}' ${bootstrap_extra_args} --kubelet-extra-args '${kubelet_extra_args}' '${cluster_name}'
88

99
# Allow user supplied userdata code
1010
${additional_userdata}

0 commit comments

Comments
 (0)