From d504292a0b09ded6b6f7b7030b8b6bafccee17fb Mon Sep 17 00:00:00 2001 From: andrejatcastai <101807823+andrejatcastai@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:44:04 +0200 Subject: [PATCH] feat: Add pod-pinner to CAST AI onboarding (#253) --- examples/aks/aks_cluster/castai.tf | 1 + examples/aks/aks_cluster/variables.tf | 6 ++++++ examples/aks/aks_cluster_arm_template/castai.tf | 1 + examples/aks/aks_cluster_arm_template/variables.tf | 6 ++++++ examples/aks/aks_cluster_autoscaler_policies/castai.tf | 1 + examples/aks/aks_cluster_autoscaler_policies/variables.tf | 6 ++++++ examples/aks/aks_cluster_azure_cni/castai.tf | 1 + examples/aks/aks_cluster_azure_cni/variables.tf | 6 ++++++ examples/aks/aks_cluster_existing/castai.tf | 1 + examples/aks/aks_cluster_existing/variables.tf | 6 ++++++ examples/eks/eks_cluster_assumerole/castai.tf | 1 + examples/eks/eks_cluster_assumerole/variables.tf | 6 ++++++ examples/eks/eks_cluster_autoscaler_policies/castai.tf | 1 + examples/eks/eks_cluster_autoscaler_policies/variables.tf | 6 ++++++ examples/eks/eks_cluster_custom_iam/castai.tf | 1 + examples/eks/eks_cluster_custom_iam/variables.tf | 6 ++++++ examples/eks/eks_cluster_existing/castai.tf | 1 + examples/eks/eks_cluster_existing/tf.vars.example | 1 + examples/eks/eks_cluster_existing/variables.tf | 6 ++++++ examples/gke/gke_cluster_autoscaler_policies/castai.tf | 1 + examples/gke/gke_cluster_autoscaler_policies/variables.tf | 6 ++++++ examples/gke/gke_cluster_existing/castai.tf | 1 + examples/gke/gke_cluster_existing/variables.tf | 6 ++++++ examples/gke/gke_cluster_zonal_autoscaler/castai.tf | 1 + examples/gke/gke_cluster_zonal_autoscaler/variables.tf | 6 ++++++ 25 files changed, 85 insertions(+) diff --git a/examples/aks/aks_cluster/castai.tf b/examples/aks/aks_cluster/castai.tf index e9a95c96..02d0c57e 100644 --- a/examples/aks/aks_cluster/castai.tf +++ b/examples/aks/aks_cluster/castai.tf @@ -23,6 +23,7 @@ module "castai-aks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aks_cluster_name = var.cluster_name diff --git a/examples/aks/aks_cluster/variables.tf b/examples/aks/aks_cluster/variables.tf index 893cb699..3413c6d7 100644 --- a/examples/aks/aks_cluster/variables.tf +++ b/examples/aks/aks_cluster/variables.tf @@ -27,6 +27,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/aks/aks_cluster_arm_template/castai.tf b/examples/aks/aks_cluster_arm_template/castai.tf index a92ad810..4aff6a45 100644 --- a/examples/aks/aks_cluster_arm_template/castai.tf +++ b/examples/aks/aks_cluster_arm_template/castai.tf @@ -23,6 +23,7 @@ module "castai-aks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aks_cluster_name = var.cluster_name diff --git a/examples/aks/aks_cluster_arm_template/variables.tf b/examples/aks/aks_cluster_arm_template/variables.tf index 893cb699..3413c6d7 100644 --- a/examples/aks/aks_cluster_arm_template/variables.tf +++ b/examples/aks/aks_cluster_arm_template/variables.tf @@ -27,6 +27,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/aks/aks_cluster_autoscaler_policies/castai.tf b/examples/aks/aks_cluster_autoscaler_policies/castai.tf index 139d0f03..3453ecb5 100644 --- a/examples/aks/aks_cluster_autoscaler_policies/castai.tf +++ b/examples/aks/aks_cluster_autoscaler_policies/castai.tf @@ -23,6 +23,7 @@ module "castai-aks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aks_cluster_name = var.cluster_name diff --git a/examples/aks/aks_cluster_autoscaler_policies/variables.tf b/examples/aks/aks_cluster_autoscaler_policies/variables.tf index 893cb699..3413c6d7 100644 --- a/examples/aks/aks_cluster_autoscaler_policies/variables.tf +++ b/examples/aks/aks_cluster_autoscaler_policies/variables.tf @@ -27,6 +27,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/aks/aks_cluster_azure_cni/castai.tf b/examples/aks/aks_cluster_azure_cni/castai.tf index e9a95c96..02d0c57e 100644 --- a/examples/aks/aks_cluster_azure_cni/castai.tf +++ b/examples/aks/aks_cluster_azure_cni/castai.tf @@ -23,6 +23,7 @@ module "castai-aks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aks_cluster_name = var.cluster_name diff --git a/examples/aks/aks_cluster_azure_cni/variables.tf b/examples/aks/aks_cluster_azure_cni/variables.tf index 6adb482d..90391e10 100644 --- a/examples/aks/aks_cluster_azure_cni/variables.tf +++ b/examples/aks/aks_cluster_azure_cni/variables.tf @@ -33,6 +33,12 @@ variable "castai_api_url" { default = "https://api.cast.ai" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/aks/aks_cluster_existing/castai.tf b/examples/aks/aks_cluster_existing/castai.tf index 984c2827..5f9fa0ed 100644 --- a/examples/aks/aks_cluster_existing/castai.tf +++ b/examples/aks/aks_cluster_existing/castai.tf @@ -26,6 +26,7 @@ module "castai-aks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aks_cluster_name = var.cluster_name diff --git a/examples/aks/aks_cluster_existing/variables.tf b/examples/aks/aks_cluster_existing/variables.tf index f0f68a8b..ffc549c8 100644 --- a/examples/aks/aks_cluster_existing/variables.tf +++ b/examples/aks/aks_cluster_existing/variables.tf @@ -26,6 +26,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/eks/eks_cluster_assumerole/castai.tf b/examples/eks/eks_cluster_assumerole/castai.tf index 6d06527e..506884d1 100644 --- a/examples/eks/eks_cluster_assumerole/castai.tf +++ b/examples/eks/eks_cluster_assumerole/castai.tf @@ -54,6 +54,7 @@ module "castai-eks-cluster" { source = "castai/eks-cluster/castai" api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aws_account_id = data.aws_caller_identity.current.account_id diff --git a/examples/eks/eks_cluster_assumerole/variables.tf b/examples/eks/eks_cluster_assumerole/variables.tf index fe7777ff..3616a8f4 100644 --- a/examples/eks/eks_cluster_assumerole/variables.tf +++ b/examples/eks/eks_cluster_assumerole/variables.tf @@ -27,6 +27,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/eks/eks_cluster_autoscaler_policies/castai.tf b/examples/eks/eks_cluster_autoscaler_policies/castai.tf index a5b3764d..e8fde652 100644 --- a/examples/eks/eks_cluster_autoscaler_policies/castai.tf +++ b/examples/eks/eks_cluster_autoscaler_policies/castai.tf @@ -56,6 +56,7 @@ module "castai-eks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aws_account_id = data.aws_caller_identity.current.account_id diff --git a/examples/eks/eks_cluster_autoscaler_policies/variables.tf b/examples/eks/eks_cluster_autoscaler_policies/variables.tf index 37d7cf1e..e13a47f1 100644 --- a/examples/eks/eks_cluster_autoscaler_policies/variables.tf +++ b/examples/eks/eks_cluster_autoscaler_policies/variables.tf @@ -27,6 +27,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/eks/eks_cluster_custom_iam/castai.tf b/examples/eks/eks_cluster_custom_iam/castai.tf index ca73472c..a050dd35 100644 --- a/examples/eks/eks_cluster_custom_iam/castai.tf +++ b/examples/eks/eks_cluster_custom_iam/castai.tf @@ -38,6 +38,7 @@ module "castai-eks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aws_account_id = data.aws_caller_identity.current.account_id diff --git a/examples/eks/eks_cluster_custom_iam/variables.tf b/examples/eks/eks_cluster_custom_iam/variables.tf index 37d7cf1e..e13a47f1 100644 --- a/examples/eks/eks_cluster_custom_iam/variables.tf +++ b/examples/eks/eks_cluster_custom_iam/variables.tf @@ -27,6 +27,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/eks/eks_cluster_existing/castai.tf b/examples/eks/eks_cluster_existing/castai.tf index 96f122e5..a46977da 100644 --- a/examples/eks/eks_cluster_existing/castai.tf +++ b/examples/eks/eks_cluster_existing/castai.tf @@ -54,6 +54,7 @@ module "castai-eks-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true aws_account_id = data.aws_caller_identity.current.account_id diff --git a/examples/eks/eks_cluster_existing/tf.vars.example b/examples/eks/eks_cluster_existing/tf.vars.example index 3f828d79..39bb654b 100644 --- a/examples/eks/eks_cluster_existing/tf.vars.example +++ b/examples/eks/eks_cluster_existing/tf.vars.example @@ -1,6 +1,7 @@ cluster_name = "" cluster_region = "" castai_api_token = "" +grpc_url = "" vpc_id = "" cluster_security_group_id = "" node_security_group_id = "" diff --git a/examples/eks/eks_cluster_existing/variables.tf b/examples/eks/eks_cluster_existing/variables.tf index d4e24172..24a6f4ee 100644 --- a/examples/eks/eks_cluster_existing/variables.tf +++ b/examples/eks/eks_cluster_existing/variables.tf @@ -26,6 +26,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section" } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/gke/gke_cluster_autoscaler_policies/castai.tf b/examples/gke/gke_cluster_autoscaler_policies/castai.tf index c3838c66..31b4ce4d 100644 --- a/examples/gke/gke_cluster_autoscaler_policies/castai.tf +++ b/examples/gke/gke_cluster_autoscaler_policies/castai.tf @@ -30,6 +30,7 @@ module "castai-gke-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true project_id = var.project_id diff --git a/examples/gke/gke_cluster_autoscaler_policies/variables.tf b/examples/gke/gke_cluster_autoscaler_policies/variables.tf index d332ebb0..a0e8b490 100644 --- a/examples/gke/gke_cluster_autoscaler_policies/variables.tf +++ b/examples/gke/gke_cluster_autoscaler_policies/variables.tf @@ -31,6 +31,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section." } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false." diff --git a/examples/gke/gke_cluster_existing/castai.tf b/examples/gke/gke_cluster_existing/castai.tf index 741cfab7..e42a324b 100644 --- a/examples/gke/gke_cluster_existing/castai.tf +++ b/examples/gke/gke_cluster_existing/castai.tf @@ -37,6 +37,7 @@ module "castai-gke-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true project_id = var.project_id diff --git a/examples/gke/gke_cluster_existing/variables.tf b/examples/gke/gke_cluster_existing/variables.tf index 0ff9ba7d..e2da8862 100644 --- a/examples/gke/gke_cluster_existing/variables.tf +++ b/examples/gke/gke_cluster_existing/variables.tf @@ -29,6 +29,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section." } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + # Variables required for connecting EKS cluster to CAST AI variable "delete_nodes_on_disconnect" { diff --git a/examples/gke/gke_cluster_zonal_autoscaler/castai.tf b/examples/gke/gke_cluster_zonal_autoscaler/castai.tf index dbbe49f6..d998603d 100644 --- a/examples/gke/gke_cluster_zonal_autoscaler/castai.tf +++ b/examples/gke/gke_cluster_zonal_autoscaler/castai.tf @@ -30,6 +30,7 @@ module "castai-gke-cluster" { api_url = var.castai_api_url castai_api_token = var.castai_api_token + grpc_url = var.castai_grpc_url wait_for_cluster_ready = true project_id = var.project_id gke_cluster_name = var.cluster_name diff --git a/examples/gke/gke_cluster_zonal_autoscaler/variables.tf b/examples/gke/gke_cluster_zonal_autoscaler/variables.tf index 20704b0e..db427260 100644 --- a/examples/gke/gke_cluster_zonal_autoscaler/variables.tf +++ b/examples/gke/gke_cluster_zonal_autoscaler/variables.tf @@ -31,6 +31,12 @@ variable "castai_api_token" { description = "CAST AI API token created in console.cast.ai API Access keys section." } +variable "castai_grpc_url" { + type = string + description = "CAST AI gRPC URL" + default = "grpc.cast.ai:443" +} + variable "delete_nodes_on_disconnect" { type = bool description = "Optional parameter, if set to true - CAST AI provisioned nodes will be deleted from cloud on cluster disconnection. For production use it is recommended to set it to false."