Skip to content

Commit

Permalink
Merge pull request #8 from castai/fix/missing-spot-handler
Browse files Browse the repository at this point in the history
fix: install castai spot handler
  • Loading branch information
aldor007 authored May 12, 2022
2 parents 7da021e + d5b35c4 commit d9bb615
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,41 @@ resource "helm_release" "castai_cluster_controller" {
depends_on = [helm_release.castai_agent]
}

resource "helm_release" "castai_spot_handler" {
name = "castai-spot-handler"
repository = "https://castai.github.io/helm-charts"
chart = "castai-spot-handler"
namespace = "castai-agent"
create_namespace = true
cleanup_on_fail = true
wait = true

set {
name = "castai.provider"
value = "gke"
}

set {
name = "createNamespace"
value = "false"
}

dynamic "set" {
for_each = var.api_url != "" ? [var.api_url] : []
content {
name = "castai.apiURL"
value = var.api_url
}
}

set {
name = "castai.clusterID"
value = castai_gke_cluster.castai_cluster.id
}

depends_on = [helm_release.castai_agent]
}

resource "castai_autoscaler" "castai_autoscaler_policies" {
autoscaler_policies_json = var.autoscaler_policies_json
cluster_id = castai_gke_cluster.castai_cluster.id
Expand Down

0 comments on commit d9bb615

Please sign in to comment.