This commit is contained in:
2024-05-15 16:25:58 +02:00
parent 7123655dc6
commit 2d6463dcce
2 changed files with 9 additions and 1 deletions

View File

@@ -335,7 +335,7 @@ resource "kubectl_manifest" "dashboards-workload" {
}
resource "kubectl_manifest" "pvc-autoresizer" {
count = var.pvc-autoresizer.enable ? 1 : 0
count = var.pvc-autoresizer.enable && ! var.conditions.only_localpath ? 1 : 0
yaml_body = <<-EOF
apiVersion: "vynil.solidite.fr/v1"
kind: "Install"

View File

@@ -0,0 +1,8 @@
const DEST=dest;
fn post_template() {
let scs = list_storage_class()["items"];
save_to_tf(`${global::DEST}/conditions.tf`, "conditions", #{
have_servicemonitors: have_crd("servicemonitors.monitoring.coreos.com"),
only_localpath: scs.some(|sc| sc["metadata"]["name"]=="local-path") && scs.len == 1
});
}