Skip to content

Commit

Permalink
make fallback backend a var (#27)
Browse files Browse the repository at this point in the history
* make fallback backend a var
  • Loading branch information
razvan-moj authored Apr 8, 2022
1 parent 4549467 commit 0825b1e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ No Modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| backend\_repo | repository for the default backend app | `string` | `"ministryofjustice/cloud-platform-custom-error-pages"` | no |
| backend\_tag | tag of the default backend app | `string` | `"0.6"` | no |
| cluster\_domain\_name | The cluster domain used for externalDNS annotations and certmanager | `any` | n/a | yes |
| controller\_name | Will be used as the ingress controller name and the class annotation | `string` | n/a | yes |
| default\_cert | Useful if you want to use a default certificate for your ingress controller. Format: namespace/secretName | `string` | `"ingress-controllers/default-certificate"` | no |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ data "template_file" "nginx_ingress_default_certificate" {
alt_name = var.is_live_cluster ? format("- '*.%s'", var.live_domain) : ""
apps_alt_name = var.is_live_cluster ? format("- '*.apps.%s'", var.live_domain) : ""
live1_dns = var.live1_cert_dns_name
backend_repo = var.backend_repo
backend_tag = var.backend_tag
}
}

Expand Down
4 changes: 2 additions & 2 deletions templates/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ defaultBackend:
enabled: true
name: default-backend
image:
repository: ministryofjustice/cloud-platform-custom-error-pages
tag: "0.6"
repository: "${backend_repo}"
tag: "${backend_tag}"

rbac:
create: true
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ variable "live1_cert_dns_name" {
default = ""
}

variable "backend_repo" {
description = "repository for the default backend app"
default = "ministryofjustice/cloud-platform-custom-error-pages"
}

variable "backend_tag" {
description = "tag of the default backend app"
default = "0.6"
}

variable "replica_count" {
type = string
description = "Number of replicas set in deployment"
Expand Down

0 comments on commit 0825b1e

Please sign in to comment.