From 79f84425cf95b56651b0d667ba5ac50c9875afc9 Mon Sep 17 00:00:00 2001 From: mglotov <37855803+mglotov@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:17:54 +0600 Subject: [PATCH] enh: delete cpu.limits from the limitrange configuration (#346) * enh: delete cpu.limits from the limitrange configuration * updated FAQ --------- Co-authored-by: Max Glotov --- docs/FAQ.md | 1 - .../eks-kubernetes-namespace/README.md | 48 ++++++++----------- .../eks-kubernetes-namespace/variables.tf | 1 - 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 46b11996..dc9019c9 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -43,7 +43,6 @@ We strongly recommend using our terraform module `kubernetes-namespace` to manag { type = "Container" default = { - cpu = "150m" memory = "128Mi" } default_request = { diff --git a/terraform/modules/eks-kubernetes-namespace/README.md b/terraform/modules/eks-kubernetes-namespace/README.md index d67b8253..979cea94 100644 --- a/terraform/modules/eks-kubernetes-namespace/README.md +++ b/terraform/modules/eks-kubernetes-namespace/README.md @@ -1,13 +1,12 @@ - ## Requirements No requirements. ## Providers -| Name | Version | -| ---------------------------------------------------------------------- | ------- | -| [kubernetes](#provider\_kubernetes) | n/a | +| Name | Version | +|------|---------| +| [kubernetes](#provider\_kubernetes) | n/a | ## Modules @@ -15,34 +14,29 @@ No modules. ## Resources -| Name | Type | -| ----------------------------------------------------------------------------------------------------------------------------------- | -------- | -| [kubernetes_limit_range.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/limit_range) | resource | -| [kubernetes_namespace.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource | +| Name | Type | +|------|------| +| [kubernetes_limit_range.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/limit_range) | resource | +| [kubernetes_namespace.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource | | [kubernetes_network_policy.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/network_policy) | resource | | [kubernetes_resource_quota.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/resource_quota) | resource | ## Inputs -| Name | Description | Type | Default | Required | -| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | -| [annotations](#input\_annotations) | An unstructured key value map stored with the namespace that may be used to store arbitrary metadata | `map(any)` | `{}` | no | -| [depends](#input\_depends) | Indicates the resource this resource depends on. | `any` | `null` | no | -| [enable](#input\_enable) | If set to true, create namespace | `bool` | `true` | no | -| [labels](#input\_labels) | Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. | `map(any)` | `{}` | no | -| [limits](#input\_limits) | n/a | `any` |
[
{
"default": {
"cpu": "150m",
"memory": "128Mi"
},
"default_request": {
"cpu": "100m",
"memory": "64Mi"
},
"type": "Container"
}
]
| no | -| [name](#input\_name) | Name of the namespace, must be unique. Cannot be updated. | `string` | n/a | yes | -| [network\_policies](#input\_network\_policies) | n/a | `any` | `[]` | no | -| [resource\_quotas](#input\_resource\_quotas) | n/a | `any` | `[]` | no | +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [annotations](#input\_annotations) | An unstructured key value map stored with the namespace that may be used to store arbitrary metadata | `map(any)` | `{}` | no | +| [depends](#input\_depends) | Indicates the resource this resource depends on. | `any` | `null` | no | +| [enable](#input\_enable) | If set to true, create namespace | `bool` | `true` | no | +| [labels](#input\_labels) | Map of string keys and values that can be used to organize and categorize (scope and select) namespaces. | `map(any)` | `{}` | no | +| [limits](#input\_limits) | n/a | `any` |
[
{
"default": {
"memory": "128Mi"
},
"default_request": {
"cpu": "100m",
"memory": "64Mi"
},
"type": "Container"
}
]
| no | +| [name](#input\_name) | Name of the namespace, must be unique. Cannot be updated. | `string` | n/a | yes | +| [network\_policies](#input\_network\_policies) | n/a | `any` | `[]` | no | +| [resource\_quotas](#input\_resource\_quotas) | n/a | `any` | `[]` | no | ## Outputs -| Name | Description | -| ----------------------------------------------------------------------- | -------------------------------------------------------- | -| [labels\_name](#output\_labels\_name) | The value of the name label | -| [name](#output\_name) | The name of the created namespace (from object metadata) | - - - - -# More details about using this module can be found [here](../../../docs/FAQ.md#k8s-namespace-features) +| Name | Description | +|------|-------------| +| [labels\_name](#output\_labels\_name) | The value of the name label | +| [name](#output\_name) | The name of the created namespace (from object metadata) | diff --git a/terraform/modules/eks-kubernetes-namespace/variables.tf b/terraform/modules/eks-kubernetes-namespace/variables.tf index e5a8500e..54bbc7aa 100644 --- a/terraform/modules/eks-kubernetes-namespace/variables.tf +++ b/terraform/modules/eks-kubernetes-namespace/variables.tf @@ -33,7 +33,6 @@ variable "limits" { { type = "Container" default = { - cpu = "150m" memory = "128Mi" } default_request = {