From 66f6bccf110f31b1b06b73b40affc8640f75b76b Mon Sep 17 00:00:00 2001 From: rpoluri <38321430+rpoluri@users.noreply.github.com> Date: Tue, 6 Apr 2021 18:18:22 -0500 Subject: [PATCH] variable to configure k8s pod replicas (#85) * variable to configure k8s pod replicas * fix * update type * update README Co-authored-by: Raj Poluri --- CHANGELOG.md | 4 ++++ README.md | 1 + k8s.tf | 2 +- variables.tf | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bca6aad..6cdc4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [3.3.3] - 2021-04-06 +### Added +- Variable to configure k8s pod replicas. + ## [3.3.2] - 2021-03-30 ### Added - Fix alluxio path replacement regex to handle s3a:// and s3n:// urls. diff --git a/README.md b/README.md index c53769f..058d74f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ For more information please refer to the main [Apiary](https://github.com/Expedi | instance_name | Waggle Dance instance name to identify resources in multi-instance deployments. | string | `` | no | | k8s_namespace | K8s namespace to create waggle-dance deployment.| string | ``| no | | k8s_docker_registry_secret | Docker Registry authentication K8s secret name.| string | ``| no | +| k8s_replica_count | Number of k8s pod replicas to create. | number | `3` | no | | local_metastores | List of federated Metastore endpoints directly accessible on the local network. See section [`local_metastores`](#local_metastores) for more info.| list | `` | no | | memory | The amount of memory (in MiB) used to allocate for the Waggle Dance container. Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html | string | `4096` | no | | primary_metastore_host | Primary Hive Metastore hostname configured in Waggle Dance. | string | `localhost` | no | diff --git a/k8s.tf b/k8s.tf index 67edcc5..192d895 100644 --- a/k8s.tf +++ b/k8s.tf @@ -19,7 +19,7 @@ resource "kubernetes_deployment" "waggle_dance" { } spec { - replicas = 3 + replicas = var.k8s_replica_count selector { match_labels = { name = local.instance_alias diff --git a/variables.tf b/variables.tf index a83830d..d3980f6 100644 --- a/variables.tf +++ b/variables.tf @@ -57,6 +57,12 @@ variable "wd_ecs_task_count" { default = "1" } +variable "k8s_replica_count" { + description = "Number of k8s pod replicas to create." + type = number + default = 3 +} + variable "vpc_id" { description = "VPC ID." type = string