Skip to content

Commit 8170620

Browse files
rmakram-imsmax-rocket-internet
authored andcommitted
Add wait_nodes_max_tries to wait for nodes to be available before applying the kubernetes configurations (#187)
* Add wait_nodes_max_tries to wait for nodes to be available before applying the kubernetes configurations * Format variables.tf and aws_auth.tf * Fix template expansion for wait-nodes-ready.tpl * Ensuring that kubeconfig is created before its use * Cleanup wait-nodes-ready script * Simplify logic to retry application of kubernetes config if failed * Revert file permission change
1 parent cddac92 commit 8170620

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1212
- `suspended_processes` to `worker_groups` input (by @bkmeneguello)
1313
- `target_group_arns` to `worker_groups` input (by @zihaoyu)
1414
- `force_detach_policies` to `aws_iam_role` `cluster` and `workers` (by @marky-mark)
15+
- Added sleep while trying to apply the kubernetes configurations if failed, up to 50 seconds (by @rmakram-ims)
1516

1617
### Changed
1718

aws_auth.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resource "null_resource" "update_config_map_aws_auth" {
88
depends_on = ["aws_eks_cluster.this"]
99

1010
provisioner "local-exec" {
11-
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}"
11+
command = "for i in {1..5}; do kubectl apply -f ${var.config_output_path}config-map-aws-auth_${var.cluster_name}.yaml --kubeconfig ${var.config_output_path}kubeconfig_${var.cluster_name} && break || sleep 10; done"
1212
}
1313

1414
triggers {

0 commit comments

Comments
 (0)