Skip to content

Commit

Permalink
feature(istio): min/max autoscaling from ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
msfidelis committed Aug 23, 2023
1 parent abb6544 commit b555099
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 14 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 3.76.1 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.9.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.10.1 |
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | 1.14.0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | 2.18.1 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | 2.23.0 |
| <a name="provider_tls"></a> [tls](#provider\_tls) | 3.1.0 |

## Modules
Expand Down Expand Up @@ -181,21 +181,24 @@ No modules.
| <a name="input_argo_rollouts_toggle"></a> [argo\_rollouts\_toggle](#input\_argo\_rollouts\_toggle) | Enable Argo Rollouts Installation | `bool` | `true` | no |
| <a name="input_auto_scale_options"></a> [auto\_scale\_options](#input\_auto\_scale\_options) | n/a | `map` | <pre>{<br> "desired": 6,<br> "max": 10,<br> "min": 4<br>}</pre> | no |
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | n/a | `string` | `"us-east-1"` | no |
| <a name="input_chaos_mesh_toggle"></a> [chaos\_mesh\_toggle](#input\_chaos\_mesh\_toggle) | Enable Chaos Mesh Installation | `bool` | `true` | no |
| <a name="input_chaos_mesh_toggle"></a> [chaos\_mesh\_toggle](#input\_chaos\_mesh\_toggle) | Enable Chaos Mesh Installation | `bool` | `false` | no |
| <a name="input_cluster_autoscaler_toggle"></a> [cluster\_autoscaler\_toggle](#input\_cluster\_autoscaler\_toggle) | Enable Cluster Autoscaler Installation | `bool` | `true` | no |
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | n/a | `string` | `"eks-cluster"` | no |
| <a name="input_cluster_private_zone"></a> [cluster\_private\_zone](#input\_cluster\_private\_zone) | n/a | `string` | `"k8s.cluster"` | no |
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | n/a | `map` | <pre>{<br> "Environment": "prod",<br> "Foo": "Bar",<br> "Ping": "Pong"<br>}</pre> | no |
| <a name="input_descheduler_toggle"></a> [descheduler\_toggle](#input\_descheduler\_toggle) | Enable Descheduler Installation | `bool` | `false` | no |
| <a name="input_enable_cross_zone_load_balancing"></a> [enable\_cross\_zone\_load\_balancing](#input\_enable\_cross\_zone\_load\_balancing) | n/a | `bool` | `false` | no |
| <a name="input_grafana_virtual_service_host"></a> [grafana\_virtual\_service\_host](#input\_grafana\_virtual\_service\_host) | n/a | `string` | `"grafana.k8s.raj.ninja"` | no |
| <a name="input_istio_ingress_max_pods"></a> [istio\_ingress\_max\_pods](#input\_istio\_ingress\_max\_pods) | Maximum pods for istio-ingress-gateway | `number` | `9` | no |
| <a name="input_istio_ingress_min_pods"></a> [istio\_ingress\_min\_pods](#input\_istio\_ingress\_min\_pods) | Minimum pods for istio-ingress-gateway | `number` | `3` | no |
| <a name="input_jaeger_virtual_service_host"></a> [jaeger\_virtual\_service\_host](#input\_jaeger\_virtual\_service\_host) | n/a | `string` | `"jaeger.k8s.raj.ninja"` | no |
| <a name="input_k8s_version"></a> [k8s\_version](#input\_k8s\_version) | n/a | `string` | `"1.27"` | no |
| <a name="input_keda_toggle"></a> [keda\_toggle](#input\_keda\_toggle) | Enable Keda Installation | `bool` | `true` | no |
| <a name="input_kiali_virtual_service_host"></a> [kiali\_virtual\_service\_host](#input\_kiali\_virtual\_service\_host) | n/a | `string` | `"kiali.k8s.raj.ninja"` | no |
| <a name="input_nlb_ingress_enable_termination_protection"></a> [nlb\_ingress\_enable\_termination\_protection](#input\_nlb\_ingress\_enable\_termination\_protection) | n/a | `bool` | `false` | no |
| <a name="input_nlb_ingress_internal"></a> [nlb\_ingress\_internal](#input\_nlb\_ingress\_internal) | n/a | `bool` | `false` | no |
| <a name="input_nlb_ingress_type"></a> [nlb\_ingress\_type](#input\_nlb\_ingress\_type) | n/a | `string` | `"network"` | no |
| <a name="input_node_termination_handler_toggle"></a> [node\_termination\_handler\_toggle](#input\_node\_termination\_handler\_toggle) | Enable AWS Node Termination Handler Setup | `bool` | `false` | no |
| <a name="input_nodes_instances_sizes"></a> [nodes\_instances\_sizes](#input\_nodes\_instances\_sizes) | n/a | `list` | <pre>[<br> "t3.large"<br>]</pre> | no |
| <a name="input_proxy_protocol_v2"></a> [proxy\_protocol\_v2](#input\_proxy\_protocol\_v2) | n/a | `bool` | `false` | no |

Expand Down
26 changes: 18 additions & 8 deletions helm_istio.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ resource "helm_release" "istio_ingress" {
value = "NodePort"
}

set {
name = "autoscaling.minReplicas"
value = var.istio_ingress_min_pods
}

set {
name = "autoscaling.maxReplicas"
value = var.istio_ingress_max_pods
}

set {
name = "service.ports[0].name"
value = "status-port"
Expand Down Expand Up @@ -205,32 +215,32 @@ resource "helm_release" "kiali-server" {
set {
name = "external_services.tracing.enabled"
value = true
}
}

set {
name = "external_services.tracing.in_cluster_url"
value = "http://jaeger-query.jaeger.svc.cluster.local:80"
}
}

set {
name = "external_services.tracing.use_grpc"
value = false
}
}

set {
name = "external_services.prometheus.url"
value = "http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090"
}
}

set {
name = "external_services.grafana.enabled"
value = true
}
}

set {
set {
name = "external_services.grafana.url"
value = "http://prometheus-grafana.prometheus.svc.cluster.local:80"
}
}


depends_on = [
Expand Down Expand Up @@ -302,4 +312,4 @@ YAML
helm_release.istiod
]

}
}
23 changes: 20 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ variable "nlb_ingress_type" {
}

variable "proxy_protocol_v2" {
type = bool
type = bool
default = false
}

Expand All @@ -57,7 +57,13 @@ variable "cluster_private_zone" {
variable "chaos_mesh_toggle" {
type = bool
description = "Enable Chaos Mesh Installation"
default = true
default = false
}

variable "node_termination_handler_toggle" {
type = bool
description = "Enable AWS Node Termination Handler Setup"
default = false
}

variable "argo_rollouts_toggle" {
Expand Down Expand Up @@ -87,6 +93,17 @@ variable "jaeger_virtual_service_host" {
default = "jaeger.k8s.raj.ninja"
}

variable "istio_ingress_min_pods" {
type = number
default = 3
description = "Minimum pods for istio-ingress-gateway"
}

variable "istio_ingress_max_pods" {
type = number
default = 9
description = "Maximum pods for istio-ingress-gateway"
}

variable "cluster_autoscaler_toggle" {
type = bool
Expand Down Expand Up @@ -130,4 +147,4 @@ variable "default_tags" {
Foo = "Bar"
Ping = "Pong"
}
}
}

0 comments on commit b555099

Please sign in to comment.