Skip to content

Commit

Permalink
fix: do not deploy pod-pinner-ext subchart separately
Browse files Browse the repository at this point in the history
  • Loading branch information
vladklokun committed Sep 25, 2024
1 parent 2ffc594 commit 6c42b7b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ No modules.
| [helm_release.castai_kvisor](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.castai_kvisor_self_managed](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.castai_pod_pinner](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.castai_pod_pinner_ext](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.castai_pod_pinner_self_managed](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.castai_spot_handler](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [helm_release.castai_workload_autoscaler](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
Expand Down Expand Up @@ -374,8 +373,6 @@ No modules.
| <a name="input_kvisor_version"></a> [kvisor\_version](#input\_kvisor\_version) | Version of kvisor chart. If not provided, latest version will be used. | `string` | `null` | no |
| <a name="input_node_configurations"></a> [node\_configurations](#input\_node\_configurations) | Map of GKE node configurations to create | `any` | `{}` | no |
| <a name="input_node_templates"></a> [node\_templates](#input\_node\_templates) | Map of node templates to create | `any` | `{}` | no |
| <a name="input_pod_pinner_ext_values"></a> [pod\_pinner\_ext\_values](#input\_pod\_pinner\_ext\_values) | List of YAML formatted string with pod-pinner-ext values | `list(string)` | `[]` | no |
| <a name="input_pod_pinner_ext_version"></a> [pod\_pinner\_ext\_version](#input\_pod\_pinner\_ext\_version) | Version of castai-pod-pinner-ext chart. Default latest | `string` | `null` | no |
| <a name="input_pod_pinner_values"></a> [pod\_pinner\_values](#input\_pod\_pinner\_values) | List of YAML formatted string values for agent helm chart | `list(string)` | `[]` | no |
| <a name="input_pod_pinner_version"></a> [pod\_pinner\_version](#input\_pod\_pinner\_version) | Version of pod-pinner helm chart. Default latest | `string` | `null` | no |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | The project id from GCP | `string` | n/a | yes |
Expand Down
27 changes: 1 addition & 26 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -468,15 +468,10 @@ resource "helm_release" "castai_pod_pinner" {
value = "0"
}

set {
name = "castai-pod-pinner-ext.enabled"
value = "false"
}

depends_on = [helm_release.castai_agent]

lifecycle {
ignore_changes = [set, version]
ignore_changes = [version]
}
}

Expand All @@ -499,11 +494,6 @@ resource "helm_release" "castai_pod_pinner_self_managed" {
value = castai_gke_cluster.castai_cluster.id
}

set {
name = "castai-pod-pinner-ext.enabled"
value = "false"
}

dynamic "set" {
for_each = var.api_url != "" ? [var.api_url] : []
content {
Expand Down Expand Up @@ -536,21 +526,6 @@ resource "helm_release" "castai_pod_pinner_self_managed" {
depends_on = [helm_release.castai_agent]
}

resource "helm_release" "castai_pod_pinner_ext" {
name = "castai-pod-pinner-ext"
repository = "https://castai.github.io/helm-charts"
chart = "castai-pod-pinner-ext"
namespace = "castai-agent"
create_namespace = false
cleanup_on_fail = true
wait = true

version = var.pod_pinner_ext_version
values = var.pod_pinner_ext_values

depends_on = [helm_release.castai_pod_pinner]
}

resource "helm_release" "castai_spot_handler" {
name = "castai-spot-handler"
repository = "https://castai.github.io/helm-charts"
Expand Down
12 changes: 0 additions & 12 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ variable "pod_pinner_version" {
default = null
}

variable "pod_pinner_ext_version" {
description = "Version of castai-pod-pinner-ext chart. Default latest"
type = string
default = null
}

variable "spot_handler_version" {
description = "Version of castai-spot-handler helm chart. Default latest"
type = string
Expand Down Expand Up @@ -198,12 +192,6 @@ variable "pod_pinner_values" {
default = []
}

variable "pod_pinner_ext_values" {
description = "List of YAML formatted string with pod-pinner-ext values"
type = list(string)
default = []
}

variable "kvisor_values" {
description = "List of YAML formatted string values for kvisor helm chart"
type = list(string)
Expand Down

0 comments on commit 6c42b7b

Please sign in to comment.