Skip to content

Commit e342b9d

Browse files
ankitm123rawlingsj
authored andcommitted
fix: make local exec interpreter configurable to support windows
Signed-off-by: ankitm123 <[email protected]>
1 parent ac75200 commit e342b9d

File tree

6 files changed

+23
-7
lines changed

6 files changed

+23
-7
lines changed

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ The following sections provide a full list of configuration in- and output varia
190190
| enable\_worker\_groups\_launch\_template | Flag to enable Worker Group Launch Templates | `bool` | `false` | no |
191191
| encrypt\_volume\_self | Encrypt the ebs and root volume for the self managed worker nodes. This is only valid for the worker group launch template | `bool` | `false` | no |
192192
| force\_destroy | Flag to determine whether storage buckets get forcefully destroyed. If set to false, empty the bucket first in the aws s3 console, else terraform destroy will fail with BucketNotEmpty error | `bool` | `false` | no |
193+
| force\_destroy\_subdomain | Flag to determine whether subdomain zone get forcefully destroyed. If set to false, empty the sub domain first in the aws Route 53 console, else terraform destroy will fail with HostedZoneNotEmpty error | `bool` | `false` | no |
193194
| ignoreLoadBalancer | Flag to specify if jx boot will ignore loadbalancer DNS to resolve to an IP | `bool` | `false` | no |
194195
| install\_kuberhealthy | Flag to specify if kuberhealthy operator should be installed | `bool` | `true` | no |
195196
| iops | The IOPS value | `number` | `0` | no |
@@ -198,6 +199,7 @@ The following sections provide a full list of configuration in- and output varia
198199
| jx\_bot\_username | Bot username used to interact with the Jenkins X cluster git repository | `string` | `""` | no |
199200
| jx\_git\_url | URL for the Jenkins X cluster git repository | `string` | `""` | no |
200201
| key\_name | The ssh key pair name | `string` | `""` | no |
202+
| local-exec-interpreter | If provided, this is a list of interpreter arguments used to execute the command | `list(string)` | <pre>[<br> "/bin/bash",<br> "-c"<br>]</pre> | no |
201203
| lt\_desired\_nodes\_per\_subnet | The number of worker nodes in each Subnet (AZ) if using Launch Templates | `number` | `1` | no |
202204
| lt\_max\_nodes\_per\_subnet | The maximum number of worker nodes in each Subnet (AZ) if using Launch Templates | `number` | `2` | no |
203205
| lt\_min\_nodes\_per\_subnet | The minimum number of worker nodes in each Subnet (AZ) if using Launch Templates | `number` | `1` | no |
@@ -211,10 +213,10 @@ The following sections provide a full list of configuration in- and output varia
211213
| nginx\_chart\_version | nginx chart version | `string` | n/a | yes |
212214
| nginx\_namespace | Name of the nginx namespace | `string` | `"nginx"` | no |
213215
| nginx\_release\_name | Name of the nginx release name | `string` | `"nginx-ingress"` | no |
214-
| nginx\_values\_file | Name of the values file which holds the helm chart values | `string` | `"values.yaml"` | no |
216+
| nginx\_values\_file | Name of the values file which holds the helm chart values | `string` | `"nginx_values.yaml"` | no |
215217
| node\_group\_ami | ami type for the node group worker intances | `string` | `"AL2_x86_64"` | no |
216218
| node\_group\_disk\_size | node group worker disk size | `string` | `"50"` | no |
217-
| node\_groups\_managed | List of managed node groups to be created and their respective settings | <pre>map(object({<br> ami_type = string<br> disk_size = number<br> desired_capacity = number<br> max_capacity = number<br> min_capacity = number<br> instance_types = list(string)<br> launch_template_id = string<br> launch_template_version = string<br> k8s_labels = map(string)<br> }))</pre> | `{}` | no |
219+
| node\_groups\_managed | List of managed node groups to be created and their respective settings | `any` | <pre>{<br> "eks-jx-node-group": {}<br>}</pre> | no |
218220
| node\_machine\_type | The instance type to use for the cluster's worker nodes | `string` | `"m5.large"` | no |
219221
| private\_subnets | The private subnet CIDR block to use in the created VPC | `list(string)` | <pre>[<br> "10.0.4.0/24",<br> "10.0.5.0/24",<br> "10.0.6.0/24"<br>]</pre> | no |
220222
| production\_letsencrypt | Flag to use the production environment of letsencrypt in the `jx-requirements.yml` file | `bool` | `false` | no |
@@ -226,9 +228,9 @@ The following sections provide a full list of configuration in- and output varia
226228
| spot\_price | The spot price ceiling for spot instances | `string` | `"0.1"` | no |
227229
| subdomain | The subdomain to be added to the apex domain. If subdomain is set, it will be appended to the apex domain in `jx-requirements-eks.yml` file | `string` | `""` | no |
228230
| subnets | The subnet ids to create EKS cluster in if create\_vpc is false | `list(string)` | `[]` | no |
231+
| tls\_cert | TLS certificate encrypted with Base64 | `string` | `""` | no |
229232
| tls\_email | The email to register the LetsEncrypt certificate with. Added to the `jx-requirements.yml` file | `string` | `""` | no |
230-
| tls\_key | The customer's private key that he got from some CA. It could be as base64 encrypted content or path to file. | `string` | `""` | no |
231-
| tls\_cert | The customer's certificate that he got from some CA. It could be as base64 encrypted content or path to file. | `string` | `""` | no |
233+
| tls\_key | TLS key encrypted with Base64 | `string` | `""` | no |
232234
| use\_asm | Flag to specify if AWS Secrets manager is being used | `bool` | `false` | no |
233235
| use\_kms\_s3 | Flag to determine whether kms should be used for encrypting s3 buckets | `bool` | `false` | no |
234236
| use\_vault | Flag to control vault resource creation | `bool` | `true` | no |
@@ -241,7 +243,7 @@ The following sections provide a full list of configuration in- and output varia
241243
| volume\_size | The volume size in GB | `number` | `50` | no |
242244
| volume\_type | The volume type to use. Can be standard, gp2 or io1 | `string` | `"gp2"` | no |
243245
| vpc\_cidr\_block | The vpc CIDR block | `string` | `"10.0.0.0/16"` | no |
244-
| vpc\_id | The VPC to create EKS cluster in if create\_vpc is false | `string` | `""` | no |
246+
| vpc\_id | The VPC to create EKS cluster in if create\_vpc is false | `string` | `""` | no |
245247
| vpc\_name | The name of the VPC to be created for the cluster | `string` | `"tf-vpc-eks"` | no |
246248

247249
#### Outputs
@@ -258,6 +260,7 @@ The following sections provide a full list of configuration in- and output varia
258260
| cm\_cainjector\_iam\_role | The IAM Role that the CM CA Injector pod will assume to authenticate |
259261
| connect | "The cluster connection string to use once Terraform apply finishes,<br>this command is already executed as part of the apply, you may have to provide the region and<br>profile as environment variables " |
260262
| controllerbuild\_iam\_role | The IAM Role that the ControllerBuild pod will assume to authenticate |
263+
| eks\_module | The output of the terraform-aws-modules/eks/aws module for use in terraform |
261264
| external\_dns\_iam\_role | The IAM Role that the External DNS pod will assume to authenticate |
262265
| jx\_requirements | The jx-requirements rendered output |
263266
| lts\_logs\_bucket | The bucket where logs from builds will be stored |

examples/jx3/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ module "eks-jx" {
1010
is_jx2 = false
1111
install_kuberhealthy = true
1212
create_nginx = true
13-
cluster_version = "1.20"
13+
cluster_version = "1.21"
1414
nginx_chart_version = "3.12.0"
1515
}

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ module "cluster" {
9595
additional_tekton_role_policy_arns = var.additional_tekton_role_policy_arns
9696
tls_cert = var.tls_cert
9797
tls_key = var.tls_key
98+
local-exec-interpreter = var.local-exec-interpreter
9899
}
99100

100101
// ----------------------------------------------------------------------------

modules/cluster/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ resource "null_resource" "kubeconfig" {
149149
]
150150
provisioner "local-exec" {
151151
command = "aws eks update-kubeconfig --name ${var.cluster_name} --region=${var.region}"
152-
interpreter = ["/bin/bash", "-c"]
152+
interpreter = var.local-exec-interpreter
153153
}
154154
}
155155

modules/cluster/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,12 @@ variable "additional_tekton_role_policy_arns" {
386386
default = []
387387
}
388388

389+
variable "local-exec-interpreter" {
390+
description = "If provided, this is a list of interpreter arguments used to execute the command"
391+
type = list(string)
392+
default = ["/bin/bash", "-c"]
393+
}
394+
389395
// ----------------------------------------------------------------------------
390396
// Customer's Certificates
391397
// ----------------------------------------------------------------------------

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,12 @@ variable "additional_tekton_role_policy_arns" {
559559
default = []
560560
}
561561

562+
variable "local-exec-interpreter" {
563+
description = "If provided, this is a list of interpreter arguments used to execute the command"
564+
type = list(string)
565+
default = ["/bin/bash", "-c"]
566+
}
567+
562568
// ----------------------------------------------------------------------------
563569
// Customer's Certificates
564570
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)