From d5c05f578fa43672f070f8fe5c2e01193e1081ca Mon Sep 17 00:00:00 2001 From: jaygridley Date: Tue, 26 Aug 2025 00:14:59 +0000 Subject: [PATCH 1/2] feat(sync): sync universal-addon changes Signed-off-by: jaygridley --- .terraform.lock.hcl | 29 ++++------------------------- addon.tf | 6 ++---- docs/.addon.md | 14 ++++++-------- docs/.footer.md | 34 ++++++++++++++++++---------------- 4 files changed, 30 insertions(+), 53 deletions(-) diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl index c282877..15b1c75 100644 --- a/.terraform.lock.hcl +++ b/.terraform.lock.hcl @@ -3,7 +3,7 @@ provider "registry.terraform.io/cloudposse/utils" { version = "1.30.0" - constraints = ">= 1.0.0" + constraints = ">= 1.0.0, ~> 1.0" hashes = [ "h1:KmKu9rXFQIAvaXbwKYLR4QSUm5UBoh0wpftRKkG34Co=", "h1:be9bmaq5PJ1US+WtgVjhdUPU0eiWhQNYAIb81EI+/Dw=", @@ -27,7 +27,7 @@ provider "registry.terraform.io/cloudposse/utils" { provider "registry.terraform.io/hashicorp/aws" { version = "5.100.0" - constraints = ">= 5.0.0" + constraints = ">= 5.0.0, ~> 5.0" hashes = [ "h1:Ijt7pOlB7Tr7maGQIqtsLFbl7pSMIj06TVdkoSBcYOw=", "h1:edXOJWE4ORX8Fm+dpVpICzMZJat4AX0VRCAy/xkcOc0=", @@ -52,7 +52,7 @@ provider "registry.terraform.io/hashicorp/aws" { provider "registry.terraform.io/hashicorp/helm" { version = "2.17.0" - constraints = ">= 2.6.0" + constraints = ">= 2.6.0, ~> 2.6" hashes = [ "h1:0LSHBFqJvHTzQesUwagpDLsrzVliY+t2c26nDJizHFM=", "h1:K5FEjxvDnxb1JF1kG1xr8J3pNGxoaR3Z0IBG9Csm/Is=", @@ -74,7 +74,7 @@ provider "registry.terraform.io/hashicorp/helm" { provider "registry.terraform.io/hashicorp/kubernetes" { version = "2.37.1" - constraints = ">= 2.20.0" + constraints = ">= 2.20.0, ~> 2.20" hashes = [ "h1:+37jC6JlkPyPvDHudK3qaj7ZVJ0Zy9zc9+oq8h1WayA=", "h1:qo9Ue/rIEnvxOpiK9qizwRFV7rvb5gCziKVytIcZHyk=", @@ -93,24 +93,3 @@ provider "registry.terraform.io/hashicorp/kubernetes" { "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", ] } - -provider "registry.terraform.io/hashicorp/random" { - version = "3.7.2" - hashes = [ - "h1:356j/3XnXEKr9nyicLUufzoF4Yr6hRy481KIxRVpK0c=", - "h1:KG4NuIBl1mRWU0KD/BGfCi1YN/j3F7H4YgeeM7iSdNs=", - "h1:hkKSY5xI4R1H4Yrg10HHbtOoxZif2dXa9HFPSbaVg5o=", - "zh:14829603a32e4bc4d05062f059e545a91e27ff033756b48afbae6b3c835f508f", - "zh:1527fb07d9fea400d70e9e6eb4a2b918d5060d604749b6f1c361518e7da546dc", - "zh:1e86bcd7ebec85ba336b423ba1db046aeaa3c0e5f921039b3f1a6fc2f978feab", - "zh:24536dec8bde66753f4b4030b8f3ef43c196d69cccbea1c382d01b222478c7a3", - "zh:29f1786486759fad9b0ce4fdfbbfece9343ad47cd50119045075e05afe49d212", - "zh:4d701e978c2dd8604ba1ce962b047607701e65c078cb22e97171513e9e57491f", - "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:7b8434212eef0f8c83f5a90c6d76feaf850f6502b61b53c329e85b3b281cba34", - "zh:ac8a23c212258b7976e1621275e3af7099e7e4a3d4478cf8d5d2a27f3bc3e967", - "zh:b516ca74431f3df4c6cf90ddcdb4042c626e026317a33c53f0b445a3d93b720d", - "zh:dc76e4326aec2490c1600d6871a95e78f9050f9ce427c71707ea412a2f2f1a62", - "zh:eac7b63e86c749c7d48f527671c7aee5b4e26c10be6ad7232d6860167f99dbb0", - ] -} diff --git a/addon.tf b/addon.tf index b6eb12f..a490ea6 100644 --- a/addon.tf +++ b/addon.tf @@ -6,13 +6,12 @@ locals { addon_argo_name = var.argo_name != null ? var.argo_name : try(local.addon.argo_name, local.addon.name) addon_helm_release_name = var.helm_release_name != null ? var.helm_release_name : try(local.addon.helm_release_name, local.addon.name) - # CUSTOM config: We need to generate a unique name for the addon name to be able to deploy multiple instances - addon_name = "${local.addon_argo_source_helm_enabled ? local.addon_helm_release_name : local.addon_argo_name}-${one(random_pet.release_name_suffix[*].id)}" + addon_name = local.addon_argo_source_helm_enabled ? local.addon_helm_release_name : local.addon_argo_name addon_namespace = var.namespace != null ? var.namespace : try(local.addon.namespace, local.addon.name) } module "addon" { - source = "./modules/addon" # CUSTOM config: relative path to the addon module with create_before_destroy lifecycle + source = "git::https://github.com/lablabs/terraform-aws-eks-universal-addon.git//modules/addon?ref=v0.0.24" enabled = var.enabled @@ -96,7 +95,6 @@ data "utils_deep_merge_yaml" "values" { input = compact([ local.addon_values, - local.addon_metrics_values, # CUSTOM config: see main.tf for details var.values ]) } diff --git a/docs/.addon.md b/docs/.addon.md index 156c110..478e636 100644 --- a/docs/.addon.md +++ b/docs/.addon.md @@ -1,29 +1,27 @@ --- -## Related Projects +## Supported Terraform provider versions -Check out other [Terraform Kubernetes addons](https://github.com/orgs/lablabs/repositories?q=terraform-aws-eks&type=public&language=&sort=). - -[](https://lablabs.io/) - -We help companies build, run, deploy and scale software and infrastructure by embracing the right technologies and principles. Check out our website at . +While we are not setting upper bound on the Terraform providers used by the addon we are testing its functionality only against versions specified in the [`.terraform.lock.hcl`](.terraform.lock.hcl) file. ## Deployment methods ### Helm + Deploy Helm chart via Helm resource (default method, set `enabled = true`) ### Argo Kubernetes + Deploy Helm chart as ArgoCD Application via Kubernetes manifest resource (set `enabled = true` and `argo_enabled = true`) -> **Warning** -> +> [!WARNING] > When deploying with ArgoCD application, Kubernetes terraform provider requires access to Kubernetes cluster API during plan time. This introduces potential issue when you want to deploy the cluster with this addon at the same time, during the same Terraform run. > > To overcome this issue, the module deploys the ArgoCD application object using the Helm provider, which does not require API access during plan. If you want to deploy the application using this workaround, you can set the `argo_helm_enabled` variable to `true`. ### Argo Helm + Deploy Helm chart as ArgoCD Application via Helm resource (set `enabled = true`, `argo_enabled = true` and `argo_helm_enabled = true`) ## Examples diff --git a/docs/.footer.md b/docs/.footer.md index 971db04..cafb431 100644 --- a/docs/.footer.md +++ b/docs/.footer.md @@ -19,19 +19,21 @@ details. See [LICENSE](LICENSE) for full details. - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. +```plan +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +``` From d554ca4a0bf7090fb63ba731e6e7c709a5d1743e Mon Sep 17 00:00:00 2001 From: jaygridley Date: Tue, 26 Aug 2025 00:15:13 +0000 Subject: [PATCH 2/2] docs: update README.md --- README.md | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 383ac23..fccdf20 100644 --- a/README.md +++ b/README.md @@ -16,29 +16,27 @@ A Terraform module to deploy the [Node Local DNS](https://kubernetes.io/docs/tas --- -## Related Projects +## Supported Terraform provider versions -Check out other [Terraform Kubernetes addons](https://github.com/orgs/lablabs/repositories?q=terraform-aws-eks&type=public&language=&sort=). - -[](https://lablabs.io/) - -We help companies build, run, deploy and scale software and infrastructure by embracing the right technologies and principles. Check out our website at . +While we are not setting upper bound on the Terraform providers used by the addon we are testing its functionality only against versions specified in the [`.terraform.lock.hcl`](.terraform.lock.hcl) file. ## Deployment methods ### Helm + Deploy Helm chart via Helm resource (default method, set `enabled = true`) ### Argo Kubernetes + Deploy Helm chart as ArgoCD Application via Kubernetes manifest resource (set `enabled = true` and `argo_enabled = true`) -> **Warning** -> +> [!WARNING] > When deploying with ArgoCD application, Kubernetes terraform provider requires access to Kubernetes cluster API during plan time. This introduces potential issue when you want to deploy the cluster with this addon at the same time, during the same Terraform run. > > To overcome this issue, the module deploys the ArgoCD application object using the Helm provider, which does not require API access during plan. If you want to deploy the application using this workaround, you can set the `argo_helm_enabled` variable to `true`. ### Argo Helm + Deploy Helm chart as ArgoCD Application via Helm resource (set `enabled = true`, `argo_enabled = true` and `argo_helm_enabled = true`) ## Examples @@ -59,7 +57,7 @@ See [basic example](examples/basic) for further information. | Name | Source | Version | |------|--------|---------| -| [addon](#module\_addon) | ./modules/addon | n/a | +| [addon](#module\_addon) | git::https://github.com/lablabs/terraform-aws-eks-universal-addon.git//modules/addon | v0.0.24 | ## Resources | Name | Type | @@ -164,20 +162,22 @@ details. See [LICENSE](LICENSE) for full details. - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. +```plan +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +```