Skip to content

Commit

Permalink
feat: Add support for istio-csr addon (#1100)
Browse files Browse the repository at this point in the history
Co-authored-by: Bryant Biggs <[email protected]>
  • Loading branch information
2 people authored and vara-bonthu committed Nov 11, 2022
1 parent 91dd105 commit 1eaf3be
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 1 deletion.
24 changes: 24 additions & 0 deletions docs/add-ons/cert-manager-istio-csr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# cert-manager-istio-csr

istio-csr is an agent that allows for Istio workload and control plane components to be secured using cert-manager.

For complete project documentation, please visit the [cert-manager documentation site](https://cert-manager.io/docs/usage/istio/).

## Usage

cert-manger-istio-csr can be deployed by enabling the add-on via the following.

```hcl
enable_cert_manager_istio_csr = true
```

### GitOps Configuration

The following properties are made available for use when managing the add-on via GitOps.

```
certManagerIstioCsr = {
enable = true
}
```
2 changes: 1 addition & 1 deletion docs/add-ons/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can optionally customize the Helm chart that deploys `nginx` via the followi

The following properties are made available for use when managing the add-on via GitOps.

Refer to [locals.tf](https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/modules/kubernetes-addons/ingress-nginx/locals.tf) for latest config. GitOps with ArgoCD Add-on repo is located [here](https://github.com/aws-samples/eks-blueprints-add-ons/blob/main/chart/values.yaml)
Refer to [main.tf](https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/modules/kubernetes-addons/ingress-nginx/main.tf) for latest config. GitOps with ArgoCD Add-on repo is located [here](https://github.com/aws-samples/eks-blueprints-add-ons/blob/main/chart/values.yaml)

``` hcl
argocd_gitops_config = {
Expand Down
3 changes: 3 additions & 0 deletions modules/kubernetes-addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
| <a name="module_calico"></a> [calico](#module\_calico) | ./calico | n/a |
| <a name="module_cert_manager"></a> [cert\_manager](#module\_cert\_manager) | ./cert-manager | n/a |
| <a name="module_cert_manager_csi_driver"></a> [cert\_manager\_csi\_driver](#module\_cert\_manager\_csi\_driver) | ./cert-manager-csi-driver | n/a |
| <a name="module_cert_manager_istio_csr"></a> [cert\_manager\_istio\_csr](#module\_cert\_manager\_istio\_csr) | ./cert-manager-istio-csr | n/a |
| <a name="module_chaos_mesh"></a> [chaos\_mesh](#module\_chaos\_mesh) | ./chaos-mesh | n/a |
| <a name="module_cilium"></a> [cilium](#module\_cilium) | ./cilium | n/a |
| <a name="module_cluster_autoscaler"></a> [cluster\_autoscaler](#module\_cluster\_autoscaler) | ./cluster-autoscaler | n/a |
Expand Down Expand Up @@ -143,6 +144,7 @@
| <a name="input_cert_manager_helm_config"></a> [cert\_manager\_helm\_config](#input\_cert\_manager\_helm\_config) | Cert Manager Helm Chart config | `any` | `{}` | no |
| <a name="input_cert_manager_install_letsencrypt_issuers"></a> [cert\_manager\_install\_letsencrypt\_issuers](#input\_cert\_manager\_install\_letsencrypt\_issuers) | Install Let's Encrypt Cluster Issuers | `bool` | `true` | no |
| <a name="input_cert_manager_irsa_policies"></a> [cert\_manager\_irsa\_policies](#input\_cert\_manager\_irsa\_policies) | Additional IAM policies for a IAM role for service accounts | `list(string)` | `[]` | no |
| <a name="input_cert_manager_istio_csr_helm_config"></a> [cert\_manager\_istio\_csr\_helm\_config](#input\_cert\_manager\_istio\_csr\_helm\_config) | Cert Manager Istio CSR Helm Chart config | `any` | `{}` | no |
| <a name="input_cert_manager_kubernetes_svc_image_pull_secrets"></a> [cert\_manager\_kubernetes\_svc\_image\_pull\_secrets](#input\_cert\_manager\_kubernetes\_svc\_image\_pull\_secrets) | list(string) of kubernetes imagePullSecrets | `list(string)` | `[]` | no |
| <a name="input_cert_manager_letsencrypt_email"></a> [cert\_manager\_letsencrypt\_email](#input\_cert\_manager\_letsencrypt\_email) | Email address for expiration emails from Let's Encrypt | `string` | `""` | no |
| <a name="input_chaos_mesh_helm_config"></a> [chaos\_mesh\_helm\_config](#input\_chaos\_mesh\_helm\_config) | Chaos Mesh Helm Chart config | `any` | `{}` | no |
Expand Down Expand Up @@ -189,6 +191,7 @@
| <a name="input_enable_calico"></a> [enable\_calico](#input\_enable\_calico) | Enable Calico add-on | `bool` | `false` | no |
| <a name="input_enable_cert_manager"></a> [enable\_cert\_manager](#input\_enable\_cert\_manager) | Enable Cert Manager add-on | `bool` | `false` | no |
| <a name="input_enable_cert_manager_csi_driver"></a> [enable\_cert\_manager\_csi\_driver](#input\_enable\_cert\_manager\_csi\_driver) | Enable Cert Manager CSI Driver add-on | `bool` | `false` | no |
| <a name="input_enable_cert_manager_istio_csr"></a> [enable\_cert\_manager\_istio\_csr](#input\_enable\_cert\_manager\_istio\_csr) | Enable Cert Manager istio-csr add-on | `bool` | `false` | no |
| <a name="input_enable_chaos_mesh"></a> [enable\_chaos\_mesh](#input\_enable\_chaos\_mesh) | Enable Chaos Mesh add-on | `bool` | `false` | no |
| <a name="input_enable_cilium"></a> [enable\_cilium](#input\_enable\_cilium) | Enable Cilium add-on | `bool` | `false` | no |
| <a name="input_enable_cluster_autoscaler"></a> [enable\_cluster\_autoscaler](#input\_enable\_cluster\_autoscaler) | Enable Cluster autoscaler add-on | `bool` | `false` | no |
Expand Down
41 changes: 41 additions & 0 deletions modules/kubernetes-addons/cert-manager-istio-csr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Cert-manager-istio-csr Helm Chart

istio-csr enables the use of cert-manager for issuing certificates in Istio service meshes

For more details checkout [cert-manager-istio-csr](https://github.com/cert-manager/istio-csr) on GitHub

<!-- 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 istio-csr. | `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 -->
17 changes: 17 additions & 0 deletions modules/kubernetes-addons/cert-manager-istio-csr/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module "helm_addon" {
source = "../helm-addon"
helm_config = merge(
{
name = "cert-manager-istio-csr"
chart = "cert-manager-istio-csr"
repository = "https://charts.jetstack.io"
version = "v0.5.0"
namespace = "cert-manager"
create_namespace = false
description = "Cert-manager-istio-csr Helm Chart deployment configuration"
},
var.helm_config
)
manage_via_gitops = var.manage_via_gitops
addon_context = var.addon_context
}
4 changes: 4 additions & 0 deletions modules/kubernetes-addons/cert-manager-istio-csr/outputs.tf
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 ? { enable = true } : null
}
28 changes: 28 additions & 0 deletions modules/kubernetes-addons/cert-manager-istio-csr/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
variable "helm_config" {
description = "Helm Config for istio-csr."
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
})
}
3 changes: 3 additions & 0 deletions modules/kubernetes-addons/cert-manager-istio-csr/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 1.0.0"
}
8 changes: 8 additions & 0 deletions modules/kubernetes-addons/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ module "cert_manager_csi_driver" {
addon_context = local.addon_context
}

module "cert_manager_istio_csr" {
count = var.enable_cert_manager_istio_csr ? 1 : 0
source = "./cert-manager-istio-csr"
helm_config = var.cert_manager_istio_csr_helm_config
manage_via_gitops = var.argocd_manage_add_ons
addon_context = local.addon_context
}

module "cluster_autoscaler" {
source = "./cluster-autoscaler"

Expand Down
12 changes: 12 additions & 0 deletions modules/kubernetes-addons/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,18 @@ variable "cert_manager_kubernetes_svc_image_pull_secrets" {
default = []
}

variable "enable_cert_manager_istio_csr" {
description = "Enable Cert Manager istio-csr add-on"
type = bool
default = false
}

variable "cert_manager_istio_csr_helm_config" {
description = "Cert Manager Istio CSR Helm Chart config"
type = any
default = {}
}

#-----------Argo Rollouts ADDON-------------
variable "enable_argo_rollouts" {
description = "Enable Argo Rollouts add-on"
Expand Down

0 comments on commit 1eaf3be

Please sign in to comment.