Skip to content

Commit

Permalink
Fix k8s hive metastore cpu limits (#219)
Browse files Browse the repository at this point in the history
* fix k8s container cpu limits

* fix metastore cpu limits

Co-authored-by: Raj Poluri <[email protected]>
  • Loading branch information
rpoluri and Raj Poluri authored Jul 19, 2022
1 parent a187ab3 commit 6f76701
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## [6.14.1] - 2022-07-19
### Fixed
- Fix k8s metastore cpu limits.

## [6.14.0] - 2022-07-18
### Added
- Add support for enabling RDS Performance Insights and Enhanced Monitoring. Both will apply to both reader and writer RDS instances.
Expand Down
6 changes: 6 additions & 0 deletions common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ locals {
hms_rw_minthreads = max(25, ceil((var.hms_rw_heapsize * 12.5) / 100))
hms_rw_maxthreads = max(100, ceil((var.hms_rw_heapsize * 50) / 100))

k8s_ro_cpu = var.hms_ro_cpu / 1024
k8s_ro_cpu_limit = (var.hms_ro_cpu / 1024) * 1.25

k8s_rw_cpu = var.hms_rw_cpu / 1024
k8s_rw_cpu_limit = (var.hms_rw_cpu / 1024) * 1.25

hms_alias = var.instance_name == "" ? "hms" : "hms-${var.instance_name}"

ro_ingress_cidr = var.ingress_cidr
Expand Down
2 changes: 2 additions & 0 deletions k8s-readonly.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,11 @@ resource "kubernetes_deployment" "apiary_hms_readonly" {

resources {
limits {
cpu = local.k8s_ro_cpu_limit
memory = "${var.hms_ro_heapsize}Mi"
}
requests {
cpu = local.k8s_ro_cpu
memory = "${var.hms_ro_heapsize}Mi"
}
}
Expand Down
2 changes: 2 additions & 0 deletions k8s-readwrite.tf
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ resource "kubernetes_deployment" "apiary_hms_readwrite" {

resources {
limits {
cpu = local.k8s_rw_cpu_limit
memory = "${var.hms_rw_heapsize}Mi"
}
requests {
cpu = local.k8s_rw_cpu
memory = "${var.hms_rw_heapsize}Mi"
}
}
Expand Down

0 comments on commit 6f76701

Please sign in to comment.