forked from aws-ia/terraform-aws-eks-blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
- Loading branch information
Showing
12 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Consul | ||
|
||
HashiCorp Consul is a service networking solution that enables teams to manage secure network connectivity between services and across on-prem and multi-cloud environments and runtimes. Consul offers service discovery, service mesh, traffic management, and automated updates to network infrastructure device. | ||
|
||
For complete project documentation, please visit the [consul](https://developer.hashicorp.com/consul/docs/k8s/installation/install). | ||
|
||
## Usage | ||
|
||
Consul can be deployed by enabling the add-on via the following. | ||
|
||
```hcl | ||
enable_consul = true | ||
``` | ||
|
||
You can optionally customize the Helm chart via the following configuration. | ||
|
||
```hcl | ||
enable_consul = true | ||
# Optional consul_helm_config | ||
consul_helm_config = { | ||
name = "consul" | ||
chart = "consul" | ||
repository = "https://helm.releases.hashicorp.com" | ||
version = "1.0.1" | ||
namespace = "consul" | ||
values = [templatefile("${path.module}/values.yaml", { | ||
... | ||
})] | ||
} | ||
``` | ||
|
||
### GitOps Configuration | ||
The following properties are made available for use when managing the add-on via GitOps. | ||
|
||
GitOps with ArgoCD Add-on repo is located [here](https://github.com/aws-samples/eks-blueprints-add-ons/blob/main/chart/values.yaml) | ||
|
||
```hcl | ||
consul = { | ||
enable = true | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Consul | ||
Deploying Consul on EKS cluster | ||
For more details checkout [Consul](https://https://developer.hashicorp.com/consul/tutorials/get-started-kubernetes/kubernetes-gs-deploy) docs | ||
|
||
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 | | ||
|
||
## Providers | ||
|
||
No providers. | ||
|
||
## Modules | ||
|
||
| Name | Source | Version | | ||
|------|--------|---------| | ||
| <a name="module_helm_addon"></a> [helm\_addon](#module\_helm\_addon) | ../helm-addon | n/a | | ||
|
||
## Resources | ||
|
||
No resources. | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_addon_context"></a> [addon\_context](#input\_addon\_context) | Input configuration for the addon | <pre>object({<br> aws_caller_identity_account_id = string<br> aws_caller_identity_arn = string<br> aws_eks_cluster_endpoint = string<br> aws_partition_id = string<br> aws_region_name = string<br> eks_cluster_id = string<br> eks_oidc_issuer_url = string<br> eks_oidc_provider_arn = string<br> tags = map(string)<br> irsa_iam_role_path = string<br> irsa_iam_permissions_boundary = string<br> })</pre> | n/a | yes | | ||
| <a name="input_helm_config"></a> [helm\_config](#input\_helm\_config) | Helm Config for consul. | `any` | `{}` | no | | ||
| <a name="input_manage_via_gitops"></a> [manage\_via\_gitops](#input\_manage\_via\_gitops) | Determines if the add-on should be managed via GitOps. | `bool` | `false` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_argocd_gitops_config"></a> [argocd\_gitops\_config](#output\_argocd\_gitops\_config) | Configuration used for managing the add-on with ArgoCD | | ||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
locals { | ||
name = "consul" | ||
|
||
default_helm_config = { | ||
name = local.name | ||
chart = local.name | ||
repository = "https://helm.releases.hashicorp.com" | ||
version = "1.0.1" | ||
namespace = local.name | ||
create_namespace = true | ||
description = "Consul helm Chart deployment configuration" | ||
values = [templatefile("${path.module}/values.yaml", {})] | ||
} | ||
|
||
helm_config = merge(local.default_helm_config, var.helm_config) | ||
|
||
argocd_gitops_config = { | ||
enable = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module "helm_addon" { | ||
source = "../helm-addon" | ||
helm_config = local.helm_config | ||
manage_via_gitops = var.manage_via_gitops | ||
addon_context = var.addon_context | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "argocd_gitops_config" { | ||
description = "Configuration used for managing the add-on with ArgoCD" | ||
value = var.manage_via_gitops ? local.argocd_gitops_config : null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
global: | ||
name: consul | ||
|
||
server: | ||
replicas: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
variable "helm_config" { | ||
description = "Helm Config for consul." | ||
type = any | ||
default = {} | ||
} | ||
|
||
variable "manage_via_gitops" { | ||
description = "Determines if the add-on should be managed via GitOps." | ||
type = bool | ||
default = false | ||
} | ||
|
||
variable "addon_context" { | ||
description = "Input configuration for the addon" | ||
type = object({ | ||
aws_caller_identity_account_id = string | ||
aws_caller_identity_arn = string | ||
aws_eks_cluster_endpoint = string | ||
aws_partition_id = string | ||
aws_region_name = string | ||
eks_cluster_id = string | ||
eks_oidc_issuer_url = string | ||
eks_oidc_provider_arn = string | ||
tags = map(string) | ||
irsa_iam_role_path = string | ||
irsa_iam_permissions_boundary = string | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
terraform { | ||
required_version = ">= 1.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters