Skip to content

Commit

Permalink
Feature/disable option (#81)
Browse files Browse the repository at this point in the history
* option to disable federated metastore during issues

* fix

* update readme

Co-authored-by: Raj Poluri <[email protected]>
  • Loading branch information
rpoluri and Raj Poluri authored Mar 15, 2021
1 parent 6b110cc commit 7f7e12f
Show file tree
Hide file tree
Showing 6 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).

## [3.2.3] - 2021-03-15
### Changed
- Option to disable metastore to mitigate issues.

## [3.2.2] - 2021-01-27
### Changed
- Update k8s memory limit to 120% memory request to prevent k8s from killing waggle-dance containers.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ module "apiary-waggledance" {
prefix = "metastore2"
subnets = "subnet-3"
mapped-databases = "test"
enabled = false //option to enable/disable metastore in waggle-dance without removing vpc endpoint.
},
]
}
Expand Down
3 changes: 3 additions & 0 deletions templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ data "template_file" "local_metastores_yaml" {
mapped_databases = lookup(var.local_metastores[count.index], "mapped-databases", "")
database_name_mapping = lookup(var.local_metastores[count.index], "database-name-mapping", "")
writable_whitelist = lookup(var.local_metastores[count.index], "writable-whitelist", "")
metastore_enabled = lookup(var.local_metastores[count.index], "enabled", true)
}
}

Expand All @@ -70,6 +71,7 @@ data "template_file" "remote_metastores_yaml" {
mapped_databases = lookup(var.remote_metastores[count.index], "mapped-databases", "")
database_name_mapping = lookup(var.remote_metastores[count.index], "database-name-mapping", "")
writable_whitelist = lookup(var.remote_metastores[count.index], "writable-whitelist", "")
metastore_enabled = lookup(var.remote_metastores[count.index], "enabled", true)
}
}

Expand All @@ -87,6 +89,7 @@ data "template_file" "ssh_metastores_yaml" {
mapped_databases = lookup(var.ssh_metastores[count.index], "mapped-databases", "")
database_name_mapping = lookup(var.ssh_metastores[count.index], "database-name-mapping", "")
writable_whitelist = lookup(var.ssh_metastores[count.index], "writable-whitelist", "")
metastore_enabled = lookup(var.ssh_metastores[count.index], "enabled", true)
}
}

Expand Down
2 changes: 2 additions & 0 deletions templates/waggle-dance-federation-local.yml.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%{if metastore_enabled~}
- name: ${prefix}
access-control-type: ${ writable_whitelist == "" ? "READ_ONLY" : "READ_AND_WRITE_ON_DATABASE_WHITELIST" }
database-prefix: ${prefix}_
Expand All @@ -8,3 +9,4 @@ ${ database_name_mapping == "" ? "" : " database-name-mapping:" }
${ database_name_mapping == "" ? "" : join("\n", formatlist(" %s", split(",", replace(replace(database_name_mapping, " ", ""), ":", ": ")))) }
${ writable_whitelist == "" ? "" : " writable-database-white-list:" }
${ writable_whitelist == "" ? "" : join("\n",formatlist(" - %s",split(",",writable_whitelist))) }
%{~endif}
2 changes: 2 additions & 0 deletions templates/waggle-dance-federation-remote.yml.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%{if metastore_enabled~}
- name: ${prefix}
access-control-type: ${ writable_whitelist == "" ? "READ_ONLY" : "READ_AND_WRITE_ON_DATABASE_WHITELIST" }
database-prefix: ${prefix}_
Expand All @@ -8,3 +9,4 @@ ${ database_name_mapping == "" ? "" : " database-name-mapping:" }
${ database_name_mapping == "" ? "" : join("\n", formatlist(" %s", split(",", replace(replace(database_name_mapping, " ", ""), ":", ": ")))) }
${ writable_whitelist == "" ? "" : " writable-database-white-list:" }
${ writable_whitelist == "" ? "" : join("\n",formatlist(" - %s",split(",",writable_whitelist))) }
%{~endif}
2 changes: 2 additions & 0 deletions templates/waggle-dance-federation-ssh.yml.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%{if metastore_enabled~}
- name: ${prefix}
access-control-type: ${ writable_whitelist == "" ? "READ_ONLY" : "READ_AND_WRITE_ON_DATABASE_WHITELIST" }
database-prefix: ${prefix}_
Expand All @@ -14,3 +15,4 @@ ${ database_name_mapping == "" ? "" : " database-name-mapping:" }
${ database_name_mapping == "" ? "" : join("\n", formatlist(" %s", split(",", replace(replace(database_name_mapping, " ", ""), ":", ": ")))) }
${ writable_whitelist == "" ? "" : " writable-database-white-list:" }
${ writable_whitelist == "" ? "" : join("\n",formatlist(" - %s",split(",",writable_whitelist))) }
%{~endif}

0 comments on commit 7f7e12f

Please sign in to comment.