Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle phase1 mode #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ resource "castai_node_template" "this" {
}

resource "castai_node_configuration_default" "this" {
count = var.readonly ? 0: 1
cluster_id = castai_eks_cluster.my_castai_cluster.id
configuration_id = var.default_node_configuration
}
Expand Down Expand Up @@ -190,6 +191,7 @@ resource "helm_release" "castai_cluster_controller" {
create_namespace = true
cleanup_on_fail = true
wait = true
count = var.readonly ? 0: 1

version = var.cluster_controller_version
values = var.cluster_controller_values
Expand Down Expand Up @@ -306,6 +308,7 @@ resource "helm_release" "castai_spot_handler" {
}

resource "castai_autoscaler" "castai_autoscaler_policies" {
count = var.readonly ? 0: 1
autoscaler_policies_json = var.autoscaler_policies_json
cluster_id = castai_eks_cluster.my_castai_cluster.id

Expand Down
7 changes: 6 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ variable "autoscaler_policies_json" {
variable "delete_nodes_on_disconnect" {
type = bool
description = "Optionally delete Cast AI created nodes when the cluster is destroyed"
default = false
default = null
}

variable "aws_assume_role_arn" {
Expand Down Expand Up @@ -143,3 +143,8 @@ variable "kvisor_version" {
type = string
default = null
}

variable "readonly" {
type = bool
default = false
}