Skip to content

Commit

Permalink
Update keda component (#863)
Browse files Browse the repository at this point in the history
Co-authored-by: cloudpossebot <[email protected]>
  • Loading branch information
max-lobur and cloudpossebot authored Sep 25, 2023
1 parent eac7f89 commit 5c63af5
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 18 deletions.
30 changes: 16 additions & 14 deletions modules/eks/keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,14 @@ components:
eks/keda:
vars:
enabled: true
name: "keda"
kubernetes_namespace: "keda"
name: keda
create_namespace: true
timeout: 90
wait: true
atomic: true
cleanup_on_fail: true
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 1000m
memory: 1024Mi
kubernetes_namespace: "keda"
chart_repository: "https://kedacore.github.io/charts"
chart: "keda"
chart_version: "2.11.2"
chart_values: {}
timeout: 180

```

Expand Down Expand Up @@ -116,7 +110,15 @@ components:

| Name | Description |
|------|-------------|
| <a name="output_metadata"></a> [metadata](#output\_metadata) | Block status of the deployed release |
| <a name="output_metadata"></a> [metadata](#output\_metadata) | Block status of the deployed release. |
| <a name="output_service_account_name"></a> [service\_account\_name](#output\_service\_account\_name) | Kubernetes Service Account name |
| <a name="output_service_account_namespace"></a> [service\_account\_namespace](#output\_service\_account\_namespace) | Kubernetes Service Account namespace |
| <a name="output_service_account_policy_arn"></a> [service\_account\_policy\_arn](#output\_service\_account\_policy\_arn) | IAM policy ARN |
| <a name="output_service_account_policy_id"></a> [service\_account\_policy\_id](#output\_service\_account\_policy\_id) | IAM policy ID |
| <a name="output_service_account_policy_name"></a> [service\_account\_policy\_name](#output\_service\_account\_policy\_name) | IAM policy name |
| <a name="output_service_account_role_arn"></a> [service\_account\_role\_arn](#output\_service\_account\_role\_arn) | IAM role ARN |
| <a name="output_service_account_role_name"></a> [service\_account\_role\_name](#output\_service\_account\_role\_name) | IAM role name |
| <a name="output_service_account_role_unique_id"></a> [service\_account\_role\_unique\_id](#output\_service\_account\_role\_unique\_id) | IAM role unique ID |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

## References
Expand Down
12 changes: 10 additions & 2 deletions modules/eks/keda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ module "keda" {
service_account_name = module.this.name
service_account_namespace = var.kubernetes_namespace

iam_role_enabled = false
iam_policy_statements = {}
iam_role_enabled = true

iam_policy_statements = [
{
sid = "KedaOperatorSQS"
effect = "Allow"
actions = ["SQS:GetQueueAttributes"]
resources = ["*"]
}
]

values = compact([
yamlencode({
Expand Down
48 changes: 46 additions & 2 deletions modules/eks/keda/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
## eks_iam_role

output "service_account_namespace" {
value = module.keda.service_account_namespace
description = "Kubernetes Service Account namespace"
}

output "service_account_name" {
value = module.keda.service_account_name
description = "Kubernetes Service Account name"
}

output "service_account_role_name" {
value = module.keda.service_account_role_name
description = "IAM role name"
}

output "service_account_role_unique_id" {
value = module.keda.service_account_role_unique_id
description = "IAM role unique ID"
}

output "service_account_role_arn" {
value = module.keda.service_account_role_arn
description = "IAM role ARN"
}

output "service_account_policy_name" {
value = module.keda.service_account_policy_name
description = "IAM policy name"
}

output "service_account_policy_id" {
value = module.keda.service_account_policy_id
description = "IAM policy ID"
}

output "service_account_policy_arn" {
value = module.keda.service_account_policy_arn
description = "IAM policy ARN"
}

## keda

output "metadata" {
value = try(one(module.keda.metadata), null)
description = "Block status of the deployed release"
description = "Block status of the deployed release."
value = module.keda.metadata
}

0 comments on commit 5c63af5

Please sign in to comment.