Skip to content

Commit

Permalink
split up deprecated resolve_conflicts to resolve_conflicts_on_create|…
Browse files Browse the repository at this point in the history
…update
  • Loading branch information
John Briscoe committed Jul 11, 2023
1 parent 0a17f65 commit 8e39e52
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
6 changes: 4 additions & 2 deletions docs/UPGRADE-19.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Please consult the `examples` directory for reference example configurations. If
- `cluster_encryption_config` previously defaulted to `[]` and now defaults to `{resources = ["secrets"]}` to encrypt secrets by default
- `cluster_endpoint_public_access` previously defaulted to `true` and now defaults to `false`. Clusters created with this module now default to private-only access to the cluster endpoint
- `cluster_endpoint_private_access` previously defaulted to `false` and now defaults to `true`
- The addon configuration now sets `"OVERWRITE"` as the default value for `resolve_conflicts` to ease add-on upgrade management. Users can opt out of this by instead setting `"NONE"` as the value for `resolve_conflicts`
- The addon configuration now sets `"OVERWRITE"` as the default value for `resolve_conflicts_on_create` to ease add-on upgrade management. Users can opt out of this by instead setting `"NONE"` as the value for `resolve_conflicts_on_create`
- The addon configuration now sets `"OVERWRITE"` as the default value for `resolve_conflicts_on_update` to ease add-on upgrade management. Users can opt out of this by instead setting `"NONE"` as the value for `resolve_conflicts_on_update`
- The `kms` module used has been updated from `v1.0.2` to `v1.1.0` - no material changes other than updated to latest
- The default value for EKS managed node group `update_config` has been updated to the recommended `{ max_unavailable_percentage = 33 }`
- The default value for the self-managed node group `instance_refresh` has been updated to the recommended:
Expand Down Expand Up @@ -190,7 +191,8 @@ EKS managed node groups on `v18.x` by default create a security group that does
}
kube-proxy = {}
vpc-cni = {
- resolve_conflicts = "OVERWRITE" # now the default
- resolve_conflicts_on_create = "OVERWRITE" # now the default
- resolve_conflicts_on_update = "OVERWRITE" # now the default
}
}

Expand Down
5 changes: 3 additions & 2 deletions docs/irsa_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ module "eks" {
cluster_addons = {
vpc-cni = {
resolve_conflicts = "OVERWRITE"
service_account_role_arn = module.vpc_cni_irsa.iam_role_arn
resolve_conflicts_on_create = "OVERWRITE"
resolve_conflicts_on_update = "OVERWRITE"
service_account_role_arn = module.vpc_cni_irsa.iam_role_arn
}
}
Expand Down
21 changes: 12 additions & 9 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,12 @@ resource "aws_eks_addon" "this" {
cluster_name = aws_eks_cluster.this[0].name
addon_name = try(each.value.name, each.key)

addon_version = try(each.value.addon_version, data.aws_eks_addon_version.this[each.key].version)
configuration_values = try(each.value.configuration_values, null)
preserve = try(each.value.preserve, null)
resolve_conflicts = try(each.value.resolve_conflicts, "OVERWRITE")
addon_version = try(each.value.addon_version, data.aws_eks_addon_version.this[each.key].version)
configuration_values = try(each.value.configuration_values, null)
preserve = try(each.value.preserve, null)
resolve_conflicts_on_create = try(each.value.resolve_conflicts_on_create, "OVERWRITE")
resolve_conflicts_on_update = try(each.value.resolve_conflicts_on_update, "OVERWRITE")

service_account_role_arn = try(each.value.service_account_role_arn, null)

timeouts {
Expand All @@ -414,11 +416,12 @@ resource "aws_eks_addon" "before_compute" {
cluster_name = aws_eks_cluster.this[0].name
addon_name = try(each.value.name, each.key)

addon_version = try(each.value.addon_version, data.aws_eks_addon_version.this[each.key].version)
configuration_values = try(each.value.configuration_values, null)
preserve = try(each.value.preserve, null)
resolve_conflicts = try(each.value.resolve_conflicts, "OVERWRITE")
service_account_role_arn = try(each.value.service_account_role_arn, null)
addon_version = try(each.value.addon_version, data.aws_eks_addon_version.this[each.key].version)
configuration_values = try(each.value.configuration_values, null)
preserve = try(each.value.preserve, null)
resolve_conflicts_on_create = try(each.value.resolve_conflicts_on_create, "OVERWRITE")
resolve_conflicts_on_update = try(each.value.resolve_conflicts_on_update, "OVERWRITE")
service_account_role_arn = try(each.value.service_account_role_arn, null)

timeouts {
create = try(each.value.timeouts.create, var.cluster_addons_timeouts.create, null)
Expand Down

0 comments on commit 8e39e52

Please sign in to comment.