diff --git a/README.md b/README.md index ea20e4d..b99533b 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,22 @@ This is a Terraform module to install a cron job on a Kubernetes cluster that us | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [additional\_protected\_namespaces](#input\_additional\_protected\_namespaces) | List of additional namespaces where the controller should not manage the scale of deployments. | `list(string)` | `[]` | no | +| [cluster\_role\_binding\_name](#input\_cluster\_role\_binding\_name) | Name of the cluster role binding. | `string` | `"custom:application-sleep-cycles:controller"` | no | | [cluster\_role\_name\_prefix](#input\_cluster\_role\_name\_prefix) | Name of the cluster role. | `string` | `"custom:application-sleep-cycles:controller"` | no | | [configmap\_name\_prefix](#input\_configmap\_name\_prefix) | Name prefix for the Config Maps. | `string` | `"application-sleep-cycles-config"` | no | | [create\_namespace](#input\_create\_namespace) | Create namespace. If false, the namespace must be created before using this module. | `bool` | `true` | no | | [cronjob\_timezone](#input\_cronjob\_timezone) | Timezone to use for the cron jobs. | `string` | `"Europe/Rome"` | no | -| [deployments\_label\_selector](#input\_deployments\_label\_selector) | Label selector for the Deployments to be scaled. | `map(string)` |
{| no | +| [deployments\_label\_selector](#input\_deployments\_label\_selector) | Label selector for the Deployments to be scaled during working-hours. | `map(string)` |
"sparkfabrik.com/application-availability": "working-hours"
}
{| no | | [k8s\_additional\_labels](#input\_k8s\_additional\_labels) | Set of additional labels to apply to all resources. | `map(string)` | `{}` | no | | [k8s\_labels](#input\_k8s\_labels) | Set of labels to apply to all resources. | `map(string)` |
"sparkfabrik.com/application-availability": "working-hours"
}
{| no | | [managed\_namespaces](#input\_managed\_namespaces) | List of namespaces where the controller should manage the scale of deployments. The namespaces defined here will be merged with the namespaces fetched by the `managed_namespaces_label_selector` variable. | `list(string)` | `[]` | no | +| [managed\_namespaces\_all\_label\_selector](#input\_managed\_namespaces\_all\_label\_selector) | Label selector for all resources in the namespaces where the controller should manage the scale of deployments. The namespace must have `managed_namespaces_label_selector` set. | `map(string)` |
"managed-by": "terraform",
"scope": "finops"
}
{| no | | [managed\_namespaces\_label\_selector](#input\_managed\_namespaces\_label\_selector) | Label selector for the namespaces where the controller should manage the scale of deployments. The namespaces fetched by this selector will be merged with the `managed_namespaces` variable. **WARNING:** remember that if the labels specified here are added to new namespaces, the module will send the Terraform state into drift, as the list of namespaces is retrieved dynamically. You must then re-apply your Terraform configuration to fix the drift.. | `map(string)` |
"sparkfabrik.com/application-availability": "working-hours"
}
{| no | | [namespace](#input\_namespace) | Namespace to create resources. | `string` | `"application-sleep-cycles"` | no | -| [role\_binding\_name](#input\_role\_binding\_name) | Name of the role binding. | `string` | `"custom:application-sleep-cycles:controller"` | no | +| [protected\_namespaces](#input\_protected\_namespaces) | List of namespaces where the controller should not manage the scale of deployments. Use additional\_protected\_namespaces to add custom protected namespaces. | `list(string)` |
"sparkfabrik.com/application-sleep-cycles": "enabled"
}
[| no | | [service\_account\_name](#input\_service\_account\_name) | Name of the service account. | `string` | `"application-sleep-cycles-sa"` | no | +| [statefulsets\_label\_selector](#input\_statefulsets\_label\_selector) | Label selector for the Statefulsets to be scaled during working-hours. | `map(string)` |
"kube-node-lease",
"kube-public",
"kube-system",
"gmp-system",
"gmp-public"
]
{| no | | [working\_hours\_docker\_image](#input\_working\_hours\_docker\_image) | Docker image to use for the working hours CronJobs. | `string` | `"bitnami/kubectl:1.29"` | no | | [working\_hours\_resource\_prefix](#input\_working\_hours\_resource\_prefix) | Prefix for the working hours resources. | `string` | `"application-sleep-cycles-working-hours"` | no | | [working\_hours\_scale\_down\_schedule](#input\_working\_hours\_scale\_down\_schedule) | Cron schedule to scale down the Deployments. Remember that this is relative to the timezone defined in the `cronjob_timezone` variable. | `string` | `"0 20 * * *"` | no | @@ -51,13 +55,11 @@ This is a Terraform module to install a cron job on a Kubernetes cluster that us |------|------| | [kubernetes_cluster_role_binding_v1.cluster_scoped](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_binding_v1) | resource | | [kubernetes_cluster_role_v1.cluster_scoped](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_v1) | resource | -| [kubernetes_cluster_role_v1.namespace_scoped](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/cluster_role_v1) | resource | | [kubernetes_config_map_v1.app](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map_v1) | resource | | [kubernetes_config_map_v1.app_env](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map_v1) | resource | | [kubernetes_manifest.scale_down](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/manifest) | resource | | [kubernetes_manifest.scale_up](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/manifest) | resource | | [kubernetes_namespace_v1.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace_v1) | resource | -| [kubernetes_role_binding_v1.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/role_binding_v1) | resource | | [kubernetes_secret_v1.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret_v1) | resource | | [kubernetes_service_account_v1.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service_account_v1) | resource | | [kubernetes_namespace_v1.this](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/namespace_v1) | data source |
"sparkfabrik.com/application-availability": "working-hours"
}