Skip to content

Commit

Permalink
rename addon
Browse files Browse the repository at this point in the history
  • Loading branch information
Riqardos committed Nov 28, 2023
1 parent 1b4aa75 commit 1025090
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# AWS EKS <$addon-name> Terraform module
# AWS EKS Kube Green Terraform module

[<img src="https://lablabs.io/static/ll-logo.png" width=350px>](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 <https://lablabs.io/>

---

[![Terraform validate](https://github.com/lablabs/terraform-aws-eks-<$addon-name>/actions/workflows/validate.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-<$addon-name>/actions/workflows/validate.yaml)
[![pre-commit](https://github.com/lablabs/terraform-aws-eks-<$addon-name>/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-<$addon-name>/actions/workflows/pre-commit.yml)
[![Terraform validate](https://github.com/lablabs/terraform-aws-eks-kube-green/actions/workflows/validate.yaml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-kube-green/actions/workflows/validate.yaml)
[![pre-commit](https://github.com/lablabs/terraform-aws-eks-kube-green/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/lablabs/terraform-aws-eks-kube-green/actions/workflows/pre-commit.yml)

## Description

A Terraform module to deploy the <$addon-name> on Amazon EKS cluster.
A Terraform module to deploy the kube-green on Amazon EKS cluster.

## Related Projects

Expand Down Expand Up @@ -111,7 +111,7 @@ No modules.
| <a name="input_aws_partition"></a> [aws\_partition](#input\_aws\_partition) | AWS partition in which the resources are located. Available values are `aws`, `aws-cn`, `aws-us-gov` | `string` | `"aws"` | no |
| <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` | `"<$addon-name>"` | no |
| <a name="input_helm_chart_name"></a> [helm\_chart\_name](#input\_helm\_chart\_name) | Helm chart name to be installed | `string` | `"kube-green"` | no |
| <a name="input_helm_chart_version"></a> [helm\_chart\_version](#input\_helm\_chart\_version) | Version of the Helm chart | `string` | `"<helm_chart_version>"` | 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 |
Expand All @@ -127,7 +127,7 @@ No modules.
| <a name="input_helm_postrender"></a> [helm\_postrender](#input\_helm\_postrender) | Value block with a path to a binary file to run after helm renders the manifest which can alter the manifest contents | `map(any)` | `{}` | no |
| <a name="input_helm_recreate_pods"></a> [helm\_recreate\_pods](#input\_helm\_recreate\_pods) | Perform pods restart during helm upgrade/rollback | `bool` | `false` | no |
| <a name="input_helm_release_max_history"></a> [helm\_release\_max\_history](#input\_helm\_release\_max\_history) | Maximum number of release versions stored per release | `number` | `0` | no |
| <a name="input_helm_release_name"></a> [helm\_release\_name](#input\_helm\_release\_name) | Helm release name | `string` | `"<$addon-name>"` | no |
| <a name="input_helm_release_name"></a> [helm\_release\_name](#input\_helm\_release\_name) | Helm release name | `string` | `"kube-green"` | no |
| <a name="input_helm_render_subchart_notes"></a> [helm\_render\_subchart\_notes](#input\_helm\_render\_subchart\_notes) | If set, render helm subchart notes along with the parent | `bool` | `true` | no |
| <a name="input_helm_replace"></a> [helm\_replace](#input\_helm\_replace) | Re-use the given name of helm release, only if that name is a deleted release which remains in the history. This is unsafe in production | `bool` | `false` | no |
| <a name="input_helm_repo_ca_file"></a> [helm\_repo\_ca\_file](#input\_helm\_repo\_ca\_file) | Helm repositories cert file | `string` | `""` | no |
Expand All @@ -148,22 +148,22 @@ No modules.
| <a name="input_irsa_assume_role_enabled"></a> [irsa\_assume\_role\_enabled](#input\_irsa\_assume\_role\_enabled) | Whether IRSA is allowed to assume role defined by irsa\_assume\_role\_arn. | `bool` | `false` | no |
| <a name="input_irsa_policy_enabled"></a> [irsa\_policy\_enabled](#input\_irsa\_policy\_enabled) | Whether to create opinionated policy to allow operations on specified zones in `policy_allowed_zone_ids`. | `bool` | `true` | no |
| <a name="input_irsa_role_create"></a> [irsa\_role\_create](#input\_irsa\_role\_create) | Whether to create IRSA role and annotate service account | `bool` | `true` | no |
| <a name="input_irsa_role_name_prefix"></a> [irsa\_role\_name\_prefix](#input\_irsa\_role\_name\_prefix) | The IRSA role name prefix for <$addon-name> | `string` | `"<$addon-name>-irsa"` | no |
| <a name="input_irsa_role_name_prefix"></a> [irsa\_role\_name\_prefix](#input\_irsa\_role\_name\_prefix) | The IRSA role name prefix for kube-green | `string` | `"kube-green-irsa"` | no |
| <a name="input_irsa_tags"></a> [irsa\_tags](#input\_irsa\_tags) | IRSA resources tags | `map(string)` | `{}` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | The K8s namespace in which the <$addon-name> service account has been created | `string` | `"<$addon-name>"` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | The K8s namespace in which the kube-green service account has been created | `string` | `"kube-green"` | no |
| <a name="input_rbac_create"></a> [rbac\_create](#input\_rbac\_create) | Whether to create and use RBAC resources | `bool` | `true` | no |
| <a name="input_service_account_create"></a> [service\_account\_create](#input\_service\_account\_create) | Whether to create Service Account | `bool` | `true` | no |
| <a name="input_service_account_name"></a> [service\_account\_name](#input\_service\_account\_name) | The k8s <$addon-name> service account name | `string` | `"<$addon-name>"` | no |
| <a name="input_settings"></a> [settings](#input\_settings) | Additional helm sets which will be passed to the Helm chart values, see https://hub.helm.sh/charts/stable/<$addon-name> | `map(any)` | `{}` | no |
| <a name="input_values"></a> [values](#input\_values) | Additional yaml encoded values which will be passed to the Helm chart, see https://hub.helm.sh/charts/stable/<$addon-name> | `string` | `""` | no |
| <a name="input_service_account_name"></a> [service\_account\_name](#input\_service\_account\_name) | The k8s kube-green service account name | `string` | `"kube-green"` | no |
| <a name="input_settings"></a> [settings](#input\_settings) | Additional helm sets which will be passed to the Helm chart values, see https://hub.helm.sh/charts/stable/kube-green | `map(any)` | `{}` | no |
| <a name="input_values"></a> [values](#input\_values) | Additional yaml encoded values which will be passed to the Helm chart, see https://hub.helm.sh/charts/stable/kube-green | `string` | `""` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_helm_release_application_metadata"></a> [helm\_release\_application\_metadata](#output\_helm\_release\_application\_metadata) | Argo application helm release attributes |
| <a name="output_helm_release_metadata"></a> [helm\_release\_metadata](#output\_helm\_release\_metadata) | Helm release attributes |
| <a name="output_iam_role_attributes"></a> [iam\_role\_attributes](#output\_iam\_role\_attributes) | <$addon-name> IAM role atributes |
| <a name="output_iam_role_attributes"></a> [iam\_role\_attributes](#output\_iam\_role\_attributes) | Kube green IAM role atributes |
| <a name="output_kubernetes_application_attributes"></a> [kubernetes\_application\_attributes](#output\_kubernetes\_application\_attributes) | Argo kubernetes manifest attributes |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Expand Down
2 changes: 1 addition & 1 deletion argo-helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource "kubernetes_job" "helm_argo_application_wait" {
image = "bitnami/kubectl:latest"
command = ["/bin/bash", "-ecx"]
# Waits for ArgoCD Application to be "Healthy", see https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait
# i.e. kubectl wait --for=jsonpath='{.status.sync.status}'=Healthy application.argoproj.io <$addon-name>
# i.e. kubectl wait --for=jsonpath='{.status.sync.status}'=Healthy application.argoproj.io kube-green
args = [
<<-EOT
kubectl wait \
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/base.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "4.0.0"

name = "<$addon-name>-vpc"
name = "kube-green-vpc"
cidr = "10.0.0.0/16"
azs = ["eu-central-1a", "eu-central-1b"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24"]
Expand Down
4 changes: 2 additions & 2 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ data "aws_iam_policy_document" "this_assume" {
count = local.irsa_role_create && var.irsa_assume_role_enabled ? 1 : 0

statement {
sid = "AllowAssume<$addon-name>Role"
sid = "AllowAssumeKubeGreenRole"
effect = "Allow"
actions = [
"sts:AssumeRole"
Expand All @@ -37,7 +37,7 @@ resource "aws_iam_policy" "this" {

name = "${var.irsa_role_name_prefix}-${var.helm_chart_name}" # tflint-ignore: aws_iam_policy_invalid_name
path = "/"
description = "Policy for <$addon-name> service"
description = "Policy for kube-green service"
policy = var.irsa_assume_role_enabled ? data.aws_iam_policy_document.this_assume[0].json : data.aws_iam_policy_document.this[0].json

tags = var.irsa_tags
Expand Down
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ output "kubernetes_application_attributes" {
}

output "iam_role_attributes" {
description = "<$addon-name> IAM role atributes"
description = "Kube green IAM role atributes"
value = try(aws_iam_role.this[0], {})
}
20 changes: 10 additions & 10 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ variable "cluster_identity_oidc_issuer_arn" {

variable "helm_chart_name" {
type = string
default = "<$addon-name>"
default = "kube-green"
description = "Helm chart name to be installed"
}

Expand All @@ -30,7 +30,7 @@ variable "helm_chart_version" {

variable "helm_release_name" {
type = string
default = "<$addon-name>"
default = "kube-green"
description = "Helm release name"
}

Expand All @@ -48,20 +48,20 @@ variable "helm_create_namespace" {

variable "namespace" {
type = string
default = "<$addon-name>"
description = "The K8s namespace in which the <$addon-name> service account has been created"
default = "kube-green"
description = "The K8s namespace in which the kube-green service account has been created"
}

variable "settings" {
type = map(any)
default = {}
description = "Additional helm sets which will be passed to the Helm chart values, see https://hub.helm.sh/charts/stable/<$addon-name>"
description = "Additional helm sets which will be passed to the Helm chart values, see https://hub.helm.sh/charts/stable/kube-green"
}

variable "values" {
type = string
default = ""
description = "Additional yaml encoded values which will be passed to the Helm chart, see https://hub.helm.sh/charts/stable/<$addon-name>"
description = "Additional yaml encoded values which will be passed to the Helm chart, see https://hub.helm.sh/charts/stable/kube-green"
}

# ================ IRSA variables (optional) ================
Expand All @@ -80,8 +80,8 @@ variable "service_account_create" {

variable "service_account_name" {
type = string
default = "<$addon-name>"
description = "The k8s <$addon-name> service account name"
default = "kube-green"
description = "The k8s kube-green service account name"
}

variable "irsa_role_create" {
Expand Down Expand Up @@ -116,8 +116,8 @@ variable "irsa_additional_policies" {

variable "irsa_role_name_prefix" {
type = string
default = "<$addon-name>-irsa"
description = "The IRSA role name prefix for <$addon-name>"
default = "kube-green-irsa"
description = "The IRSA role name prefix for kube-green"
}

variable "irsa_tags" {
Expand Down

0 comments on commit 1025090

Please sign in to comment.