Skip to content

Commit 6a9524b

Browse files
authored
Merge pull request #64 from ExpediaGroup/feature/add-replicas-vars
Kubernetes variables to adjust number replicas on deployments
2 parents 9abc3bf + 82a11fc commit 6a9524b

5 files changed

Lines changed: 25 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33

44
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).
55

6+
## [5.1.1] - 2024-11-07
7+
### Added
8+
- Kubernetes variables to adjust number replicas on deployments.
9+
610
## [5.1.0] - 2024-08-30
711
### Added
812
- Added datadog annotations to send metrics from `scheduler-apiary`, `metadata-cleanup`, `path-cleanup` to DD.

k8s-metadata-cleanup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" {
2929

3030
spec {
3131
# setting the number of replicas to greater than 1 is currently untested
32-
replicas = 1
32+
replicas = var.k8s_metadata_cleanup_replicas
3333
selector {
3434
match_labels = local.metadata_cleanup_label_name_instance
3535
}

k8s-path-cleanup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "kubernetes_deployment_v1" "beekeeper_path_cleanup" {
2929

3030
spec {
3131
# setting the number of replicas to greater than 1 is currently untested
32-
replicas = 1
32+
replicas = var.k8s_path_cleanup_replicas
3333
selector {
3434
match_labels = local.path_cleanup_label_name_instance
3535
}

k8s-scheduler-apiary.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resource "kubernetes_deployment_v1" "beekeeper_scheduler_apiary" {
2929

3030
spec {
3131
# setting the number of replicas to greater than 1 is currently untested
32-
replicas = 1
32+
replicas = var.k8s_scheduler_apiary_replicas
3333
selector {
3434
match_labels = local.scheduler_apiary_label_name_instance
3535
}

variables.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ variable "k8s_ingress_tls_secret" {
395395

396396
# K8S - path cleanup deployment
397397

398+
variable "k8s_path_cleanup_replicas" {
399+
description = "Replicas for k8s-path-cleanup deployment."
400+
default = 1
401+
type = number
402+
}
403+
398404
variable "k8s_path_cleanup_memory" {
399405
description = "Total memory to allot to the Beekeeper Path Cleanup pod."
400406
default = "2Gi"
@@ -433,6 +439,12 @@ variable "k8s_path_cleanup_ingress_path" {
433439

434440
# K8S - metadata cleanup deployment
435441

442+
variable "k8s_metadata_cleanup_replicas" {
443+
description = "Replicas for k8s-metadata-cleanup deployment."
444+
default = 1
445+
type = number
446+
}
447+
436448
variable "k8s_metadata_cleanup_memory" {
437449
description = "Total memory to allot to the Beekeeper Metadata Cleanup pod."
438450
default = "2Gi"
@@ -509,6 +521,12 @@ variable "k8s_api_ingress_path" {
509521

510522
# K8S - Scheduler Apiary deployment
511523

524+
variable "k8s_scheduler_apiary_replicas" {
525+
description = "Replicas for k8s-scheduler-apiary deployment."
526+
default = 1
527+
type = number
528+
}
529+
512530
variable "k8s_scheduler_apiary_memory" {
513531
description = "Total memory to allot to the Beekeeper Scheduler Apiary pod."
514532
default = "2Gi"

0 commit comments

Comments
 (0)