Skip to content

Commit

Permalink
style: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MonolithProjects committed Jul 28, 2023
1 parent 3b7016f commit c0a0bef
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 18 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We help companies build, run, deploy and scale software and infrastructure by em

## Description

A Terraform module to deploy the node-local-dns on Amazon EKS cluster.
A Terraform module to deploy the node-local-dns on Amazon EKS cluster. The upgrade process of this module is using the `create before destroy` feature, and the already running daemonset will be terminated after the new one is already running.

## Related Projects

Expand Down Expand Up @@ -56,6 +56,7 @@ See [Basic example](examples/basic/README.md) for further information.
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.19.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.6.0 |
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 2.16.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.5.0 |
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.17.0 |

## Modules
Expand All @@ -77,6 +78,9 @@ No modules.
| [kubernetes_role.helm_argo_application_wait](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/role) | resource |
| [kubernetes_role_binding.helm_argo_application_wait](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/role_binding) | resource |
| [kubernetes_service_account.helm_argo_application_wait](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account) | resource |
| [random_integer.metrics_port](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/integer) | resource |
| [random_pet.release_name_suffix](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_iam_policy_document.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.this_assume](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.this_irsa](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
Expand All @@ -100,7 +104,7 @@ No modules.
| <a name="input_argo_kubernetes_manifest_computed_fields"></a> [argo\_kubernetes\_manifest\_computed\_fields](#input\_argo\_kubernetes\_manifest\_computed\_fields) | List of paths of fields to be handled as "computed". The user-configured value for the field will be overridden by any different value returned by the API after apply. | `list(string)` | <pre>[<br> "metadata.labels",<br> "metadata.annotations",<br> "metadata.finalizers"<br>]</pre> | no |
| <a name="input_argo_kubernetes_manifest_field_manager_force_conflicts"></a> [argo\_kubernetes\_manifest\_field\_manager\_force\_conflicts](#input\_argo\_kubernetes\_manifest\_field\_manager\_force\_conflicts) | Forcibly override any field manager conflicts when applying the kubernetes manifest resource | `bool` | `false` | no |
| <a name="input_argo_kubernetes_manifest_field_manager_name"></a> [argo\_kubernetes\_manifest\_field\_manager\_name](#input\_argo\_kubernetes\_manifest\_field\_manager\_name) | The name of the field manager to use when applying the kubernetes manifest resource. Defaults to Terraform | `string` | `"Terraform"` | no |
| <a name="input_argo_kubernetes_manifest_wait_fields"></a> [argo\_kubernetes\_manifest\_wait\_fields](#input\_argo\_kubernetes\_manifest\_wait\_fields) | A map of fields and a corresponding regular expression with a pattern to wait for. The provider will wait until the field matches the regular expression. Use * for any value. | `map(string)` | `{}` | no |
| <a name="input_argo_kubernetes_manifest_wait_fields"></a> [argo\_kubernetes\_manifest\_wait\_fields](#input\_argo\_kubernetes\_manifest\_wait\_fields) | A map of fields and a corresponding regular expression with a pattern to wait for. The provider will wait until the field matches the regular expression. Use * for any value. | `map(string)` | <pre>{<br> "status.health.status": "Healthy",<br> "status.operationState.phase": "Succeeded",<br> "status.sync.status": "Synced"<br>}</pre> | no |
| <a name="input_argo_metadata"></a> [argo\_metadata](#input\_argo\_metadata) | ArgoCD Application metadata configuration. Override or create additional metadata parameters | `any` | <pre>{<br> "finalizers": [<br> "resources-finalizer.argocd.argoproj.io"<br> ]<br>}</pre> | no |
| <a name="input_argo_namespace"></a> [argo\_namespace](#input\_argo\_namespace) | Namespace to deploy ArgoCD application CRD to | `string` | `"argo"` | no |
| <a name="input_argo_project"></a> [argo\_project](#input\_argo\_project) | ArgoCD Application project | `string` | `"default"` | no |
Expand All @@ -109,7 +113,7 @@ No modules.
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Variable indicating whether deployment is enabled | `bool` | `true` | no |
| <a name="input_helm_atomic"></a> [helm\_atomic](#input\_helm\_atomic) | If set, installation process purges chart on fail. The wait flag will be set automatically if atomic is used | `bool` | `false` | no |
| <a name="input_helm_chart_name"></a> [helm\_chart\_name](#input\_helm\_chart\_name) | Helm chart name to be installed | `string` | `"node-local-dns"` | no |
| <a name="input_helm_chart_version"></a> [helm\_chart\_version](#input\_helm\_chart\_version) | Version of the Helm chart | `string` | `"1.3.2"` | no |
| <a name="input_helm_chart_version"></a> [helm\_chart\_version](#input\_helm\_chart\_version) | Version of the Helm chart | `string` | `"1.4.0"` | no |
| <a name="input_helm_cleanup_on_fail"></a> [helm\_cleanup\_on\_fail](#input\_helm\_cleanup\_on\_fail) | Allow deletion of new resources created in this helm upgrade when upgrade fails | `bool` | `false` | no |
| <a name="input_helm_create_namespace"></a> [helm\_create\_namespace](#input\_helm\_create\_namespace) | Create the namespace if it does not yet exist | `bool` | `true` | no |
| <a name="input_helm_dependency_update"></a> [helm\_dependency\_update](#input\_helm\_dependency\_update) | Runs helm dependency update before installing the chart | `bool` | `false` | no |
Expand Down Expand Up @@ -138,7 +142,7 @@ No modules.
| <a name="input_helm_set_sensitive"></a> [helm\_set\_sensitive](#input\_helm\_set\_sensitive) | Value block with custom sensitive values to be merged with the values yaml that won't be exposed in the plan's diff | `map(any)` | `{}` | no |
| <a name="input_helm_skip_crds"></a> [helm\_skip\_crds](#input\_helm\_skip\_crds) | If set, no CRDs will be installed before helm release | `bool` | `false` | no |
| <a name="input_helm_timeout"></a> [helm\_timeout](#input\_helm\_timeout) | Time in seconds to wait for any individual kubernetes operation (like Jobs for hooks) | `number` | `300` | no |
| <a name="input_helm_wait"></a> [helm\_wait](#input\_helm\_wait) | Will wait until all helm release resources are in a ready state before marking the release as successful. It will wait for as long as timeout | `bool` | `false` | no |
| <a name="input_helm_wait"></a> [helm\_wait](#input\_helm\_wait) | Will wait until all helm release resources are in a ready state before marking the release as successful. It will wait for as long as timeout | `bool` | `true` | no |
| <a name="input_helm_wait_for_jobs"></a> [helm\_wait\_for\_jobs](#input\_helm\_wait\_for\_jobs) | If wait is enabled, will wait until all helm Jobs have been completed before marking the release as successful. It will wait for as long as timeout | `bool` | `false` | no |
| <a name="input_irsa_additional_policies"></a> [irsa\_additional\_policies](#input\_irsa\_additional\_policies) | Map of the additional policies to be attached to default role. Where key is arbitrary id and value is policy arn. | `map(string)` | `{}` | no |
| <a name="input_irsa_assume_role_arn"></a> [irsa\_assume\_role\_arn](#input\_irsa\_assume\_role\_arn) | Assume role arn. Assume role must be enabled. | `string` | `""` | no |
Expand Down
2 changes: 1 addition & 1 deletion argo-helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data "utils_deep_merge_yaml" "argo_helm_values" {
local.argo_application_metadata
),
yamlencode({
"spec" : {"source": { "helm": {"releaseName" : local.release_name_suffixed}}}
"spec" : { "source" : { "helm" : { "releaseName" : local.release_name_suffixed } } }
})
])
}
Expand Down
2 changes: 1 addition & 1 deletion argo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "kubernetes_manifest" "this" {
"kind" = "Application"
"metadata" = merge(
local.argo_application_metadata,
{ "name" = "${local.release_name_suffixed}" },
{ "name" = local.release_name_suffixed },
{ "namespace" = var.argo_namespace },
)
"spec" = merge(
Expand Down
2 changes: 1 addition & 1 deletion helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "helm_release" "this" {

values = [
data.utils_deep_merge_yaml.values[0].output,
jsonencode({serviceAccount: {name: local.release_name_suffixed}}),
jsonencode({ serviceAccount : { name : local.release_name_suffixed } }),
]

dynamic "set" {
Expand Down
10 changes: 5 additions & 5 deletions values.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ locals {
})

metrics_port = yamlencode({
"metrics" : {
"prometheusScrape" : "true",
"port" : random_integer.metrics_port[0].result
}
"metrics" : {
"prometheusScrape" : "true",
"port" : random_integer.metrics_port[0].result
}
})

release_name_suffixed = "${var.helm_release_name}-${one(random_pet.release_name_suffix[*].id)}"
Expand All @@ -145,7 +145,7 @@ resource "random_integer" "metrics_port" {
resource "random_pet" "release_name_suffix" {
count = var.enabled ? 1 : 0
keepers = {
var_values = jsonencode(var.values),
var_values = jsonencode(var.values),
default_values = jsonencode(local.values_default)
}
}
Expand Down
12 changes: 6 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ variable "argo_kubernetes_manifest_field_manager_force_conflicts" {
}

variable "argo_kubernetes_manifest_wait_fields" {
type = map(string)
default = {
"status.sync.status" = "Synced"
"status.health.status" = "Healthy"
"status.operationState.phase" = "Succeeded"
}
type = map(string)
default = {
"status.sync.status" = "Synced"
"status.health.status" = "Healthy"
"status.operationState.phase" = "Succeeded"
}
description = "A map of fields and a corresponding regular expression with a pattern to wait for. The provider will wait until the field matches the regular expression. Use * for any value."
}

Expand Down
5 changes: 5 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@ terraform {
source = "cloudposse/utils"
version = ">= 0.17.0"
}

random = {
source = "hashicorp/random"
version = ">= 3.5.0"
}
}
}

0 comments on commit c0a0bef

Please sign in to comment.