diff --git a/armonik/README.md b/armonik/README.md index 74cfe2120..d8ae5fbab 100644 --- a/armonik/README.md +++ b/armonik/README.md @@ -131,7 +131,7 @@ | [metrics\_server\_chart\_name](#input\_metrics\_server\_chart\_name) | Name of the metrics-server Helm chart | `string` | `"metrics-server"` | no | | [namespace](#input\_namespace) | Namespace of ArmoniK resources | `string` | n/a | yes | | [partition\_metrics\_exporter\_secret\_name](#input\_partition\_metrics\_exporter\_secret\_name) | the name of the partition metrics exporter secret | `string` | `"partition-metrics-exporter"` | no | -| [pod\_deletion\_cost](#input\_pod\_deletion\_cost) | value |
object({| `null` | no | +| [pod\_deletion\_cost](#input\_pod\_deletion\_cost) | value |
image = string
tag = string
image_pull_policy = optional(string, "IfNotPresent")
image_pull_secrets = optional(string, "")
node_selector = optional(any, {})
annotations = optional(any, {})
name = optional(string, "pdc-update")
label_app = optional(string, "armonik")
prometheus_url = optional(string)
metrics_name = optional(string)
frequency = optional(number)
ignore_younger_than = optional(number)
concurrency = optional(number)
extra_conf = optional(map(string), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string)
}))
requests = optional(object({
cpu = optional(string)
memory = optional(string)
}))
})
object({| `null` | no | | [prometheus\_secret\_name](#input\_prometheus\_secret\_name) | the name of the prometheus secret | `string` | `"prometheus"` | no | | [pvc\_name](#input\_pvc\_name) | Name for the pvc to be used | `string` | `"nfsvolume"` | no | | [s3\_secret\_name](#input\_s3\_secret\_name) | the name of the S3 secret | `string` | `"s3"` | no | diff --git a/armonik/pdc.tf b/armonik/pdc.tf index 5e6819d66..19fb195c5 100644 --- a/armonik/pdc.tf +++ b/armonik/pdc.tf @@ -1,11 +1,10 @@ locals { pdc_env = var.pod_deletion_cost != null ? merge({ - PrometheusUrl = coalesce(var.pod_deletion_cost.prometheus_url, "http://prometheus.${var.namespace}.svc:9090/") - MetricsName = var.pod_deletion_cost.metrics_name - Period = var.pod_deletion_cost.period - IgnoreYoungerThan = var.pod_deletion_cost.ignore_younger_than - KubernetesNamespace = var.namespace - Concurrency = var.pod_deletion_cost.concurrency + PrometheusUrl = coalesce(var.pod_deletion_cost.prometheus_url, "http://prometheus.${var.namespace}.svc:9090/") + MetricsName = var.pod_deletion_cost.metrics_name + Period = var.pod_deletion_cost.period + IgnoreYoungerThan = var.pod_deletion_cost.ignore_younger_than + Concurrency = var.pod_deletion_cost.concurrency }, var.pod_deletion_cost.extra_conf) : {} } diff --git a/images/pdc-update/src/main.rs b/images/pdc-update/src/main.rs index 6653a062c..f68f40a67 100644 --- a/images/pdc-update/src/main.rs +++ b/images/pdc-update/src/main.rs @@ -38,10 +38,6 @@ struct Cli { #[arg(short, long, env = "IgnoreYoungerThan", default_value_t = 10.0)] ignore_younger_than: f64, - /// Namespace where the pods are located - #[arg(short, long, env = "KubernetesNamespace", default_value = "default")] - namespace: String, - /// Number of concurrent requests to Kubernetes #[arg(short, long, env = "Concurrency", default_value_t = 10)] concurrency: u32, @@ -54,12 +50,9 @@ async fn main() -> Result<(), Box
image = string
tag = string
image_pull_policy = optional(string, "IfNotPresent")
image_pull_secrets = optional(string, "")
node_selector = optional(any, {})
annotations = optional(any, {})
name = optional(string, "pdc-update")
label_app = optional(string, "armonik")
prometheus_url = optional(string)
metrics_name = optional(string)
period = optional(number)
ignore_younger_than = optional(number)
concurrency = optional(number)
extra_conf = optional(map(string), {})
limits = optional(object({
cpu = optional(string)
memory = optional(string)
}))
requests = optional(object({
cpu = optional(string)
memory = optional(string)
}))
})