From 885df768d908fce70514f389ddd4ae399c123a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20S=C3=A1nchez=20Beltr=C3=A1n?= <36443689+javsanbel2@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:43:52 +0200 Subject: [PATCH] feat: Add additional environment variables in hms-housekeeper (#263) * feat: Add additional environment variables in hms-housekeeper * version --- CHANGELOG.md | 4 ++++ VARIABLES.md | 1 + k8s-housekeeper.tf | 8 ++++++++ variables.tf | 6 ++++++ 4 files changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6309c6..93a697c 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). +## [7.1.8] - 2024-06-19 +### Added +- `hms_housekeeper_additional_environment_variables` variable to provide ability to add a list of environment variables in `hms-housekeeper` deployment. + ## [7.1.7] - 2024-06-04 ### Fixed - Fixed k8s IRSA. diff --git a/VARIABLES.md b/VARIABLES.md index 305d8da..733345a 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -56,6 +56,7 @@ | external\_database\_host | External Metastore database host to support legacy installations, MySQL database won't be created by Apiary when this option is specified. | `string` | `""` | no | | hive\_metastore\_port | Port on which both Hive Metastore readwrite and readonly will run. | `number` | `9083` | no | | hms\_additional\_environment\_variables | Additional environment variables for the Hive Metastore. | `map(any)` | `{}` | no | +| hms\_housekeeper\_additional\_environment\_variables | Additional environment variables for Hive Housekeeper. | `map(any)` | `{}` | no | | hms\_autogather\_stats | Read-write Hive metastore setting to enable/disable statistics auto-gather on table/partition creation. | `bool` | `true` | no | | hms\_docker\_image | Docker image ID for the Hive Metastore. | `string` | n/a | yes | | hms\_docker\_version | Version of the Docker image for the Hive Metastore. | `string` | n/a | yes | diff --git a/k8s-housekeeper.tf b/k8s-housekeeper.tf index 0f63843..99f3568 100644 --- a/k8s-housekeeper.tf +++ b/k8s-housekeeper.tf @@ -133,6 +133,14 @@ resource "kubernetes_deployment_v1" "apiary_hms_housekeeper" { name = "ENABLE_HIVE_LOCK_HOUSE_KEEPER" value = var.enable_hms_housekeeper ? "true" : "" } + dynamic "env" { + for_each = var.hms_housekeeper_additional_environment_variables + + content { + name = env.key + value = env.value + } + } liveness_probe { tcp_socket { diff --git a/variables.tf b/variables.tf index efe75d8..0da134f 100644 --- a/variables.tf +++ b/variables.tf @@ -690,6 +690,12 @@ variable "hms_additional_environment_variables" { default = {} } +variable "hms_housekeeper_additional_environment_variables" { + description = "Additional environment variables for Hive metastore." + type = map(any) + default = {} +} + variable "datadog_metrics_hms_readwrite_readonly" { description = "HMS metrics to be sent to Datadog." type = list(string)