Skip to content

Commit

Permalink
Merge pull request #5 from Aguafrommars/user/ole
Browse files Browse the repository at this point in the history
User/ole
  • Loading branch information
aguacongas authored Mar 22, 2022
2 parents df2e3b5 + b5fb44d commit b470cd4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ This sampel setup the Email Sender url using environment variable.
### Override config
You can use the **override_setting** input to override the [TheIdServer helm chart](https://artifacthub.io/packages/helm/aguafrommars/theidserver).
You can use the **override_settings** input to override the [TheIdServer helm chart](https://artifacthub.io/packages/helm/aguafrommars/theidserver).
``` hcl
module "theidserver" {
Expand All @@ -120,7 +120,7 @@ module "theidserver" {
tls_issuer_name = "letsencrypt"
tls_issuer_kind = "ClusterIssuer"
override_setting = {
override_settings = {
appSettings = {
file = {
EmailApiAuthentication = {
Expand All @@ -140,7 +140,8 @@ This sample setup the Email Sender url using the appsettings.json file.
|host|The host|string||
|tls_issuer_name|The name of the certificat issuer to use|string||
|tls_issuer_kind|The kind of the certificat issuer to use (Issuer or ClusterIssuer)|string||
|chart_version|(Optional) The Helm chart version|string|"4.6.0"|
|chart|(Optional) The Helm chart|string|"theidserver"|
|chart_version|(Optional) The Helm chart version|string|"4.7.0"|
|namespace|(Optional) Kubernetes namespace|string|"theidserver"|
|create_namespace|(Optional) Creates the kubernetes namespace if not exists|bool|true|
|release_name|(Optional) Helm release name|string|"theidserver"|
Expand All @@ -149,7 +150,7 @@ This sample setup the Email Sender url using the appsettings.json file.
|wait|(Optional) Wait for helm release to be ready|bool|true|
|replica_count|(Optional) Number of server pod|number|3|
|env_settings|(Optional) Env var settings|map(string)|{}|
|override_setting|(Optional) Override helm chart settings|any|{}|
|override_settings|(Optional) Override helm chart settings|any|{}|
|image|(Optional) Override Helm chart image|map(string)|{}|
## Outputs
Expand Down
2 changes: 1 addition & 1 deletion examples/override-settings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "theidserver" {
tls_issuer_name = "letsencrypt"
tls_issuer_kind = "ClusterIssuer"
override_setting = {
override_settings = {
appSettings = {
file = {
EmailApiAuthentication = {
Expand Down
2 changes: 1 addition & 1 deletion examples/override-settings/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module "theidserver" {
tls_issuer_name = "letsencrypt"
tls_issuer_kind = "ClusterIssuer"

override_setting = {
override_settings = {
appSettings = {
file = {
EmailApiAuthentication = {
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ locals {
ports = {
https = 443
}
}
}
appSettings = {
env = var.env_settings
file = {
Expand Down Expand Up @@ -268,14 +268,14 @@ locals {
resource "helm_release" "theidserver" {
name = var.release_name
repository = "https://aguafrommars.github.io/helm"
chart = "C:\\Projects\\Perso\\helm\\charts\\theidserver"
chart = var.chart
version = var.chart_version
namespace = var.namespace
create_namespace = var.create_namespace

values = [
yamlencode(local.settings),
yamlencode(var.override_setting)
yamlencode(var.override_settings)
]

reuse_values = var.reuse_values
Expand Down
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ variable "tls_issuer_kind" {
description = "The kind of the certificat issuer to use (Issuer or ClusterIssuer)"
}

variable "chart" {
type = string
description = "(Optional) The Helm chart"
default = "theidserver"
}

variable "chart_version" {
type = string
description = "(Optional) The Helm chart version"
default = "4.6.0"
default = "4.7.0"
}

variable "namespace" {
Expand Down Expand Up @@ -68,7 +74,7 @@ variable "env_settings" {
default = {}
}

variable "override_setting" {
variable "override_settings" {
type = any
description = "Override helm settings"
default = {}
Expand Down

0 comments on commit b470cd4

Please sign in to comment.